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   1060 Views

Avatar
swaiba

21 July 2010 at 3:01am Forum Moderator, 1796 Posts

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

19 June 2012 at 11:28pm Community Member, 90 Posts

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

20 June 2012 at 12:09am (Last edited: 20 June 2012 12:14am), Community Member, 90 Posts

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

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