Skip to main content

This site requires you to update your browser. Your browsing experience maybe affected by not having the most up to date version.

General Questions /

General questions about getting started with SilverStripe that don't fit in any of the categories above.

Moderators: martimiz, Sean, biapar, Willr, Ingo, swaiba, simon_w

Missing 'Save' label on $has_many field ModelAdmin edit button


Reply


3 Posts   1081 Views

Avatar
swaiba

Forum Moderator, 1799 Posts

21 July 2010 at 3:01am

Hi,

Has anyone noticed that the save button to a popup edit box on a has_many object is missing in 2.4?

Below my example code, with screen print attached...

class AccountsAdmin extends ModelAdmin
{
   static $managed_models = array(
'Company',
   );
...
}

class Company extends DataObject
{
...
   public static $has_many = array (
      'Reminder' => 'Reminder',
   );
...
}

class Reminder extends DataObject
{
   static $db = array(
      'Name' => 'Text',
      'Description' => 'Text',
      'Date' => 'Date',
   );
   static $has_one = array(
      'Company' => 'Company'
   );
}

Any help would be much appreciated :)

Barry

Attached Files
Avatar
BenWu

Community Member, 90 Posts

19 June 2012 at 11:28pm

I got the same kind of problem.

When I edit records on page 1, I got the save button. However, when i tried to edit records on page 2 onwards, there is no save button at the bottom.

I check the html source and I don't find the form actions at all.

Avatar
BenWu

Community Member, 90 Posts

20 June 2012 at 12:09am

Edited: 20/06/2012 12:14am

I solved it by force the doSave button to show in my customize MyModelAdmin.js

$('.ajaxActions').show();
$('#Form_EditForm_action_doSave').show();