Jump to:

23368 Posts in 18143 Topics by 2863 members

General Questions

SilverStripe Forums » General Questions » Missing 'Save' label on $has_many field ModelAdmin edit button

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

Page: 1
Go to End
Author Topic: 1035 Views
  • swaiba
    Avatar
    Forum Moderator
    1784 Posts

    Missing 'Save' label on $has_many field ModelAdmin edit button Link to this post

    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
  • BenWu
    Avatar
    Community Member
    87 Posts

    Re: Missing 'Save' label on $has_many field ModelAdmin edit button Link to this post

    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.

  • BenWu
    Avatar
    Community Member
    87 Posts

    Re: Missing 'Save' label on $has_many field ModelAdmin edit button Link to this post

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

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

    1035 Views
Page: 1
Go to Top

Want to know more about the company that brought you SilverStripe? Then check out SilverStripe.com

Comments on this website? Please give feedback.