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.

We've moved the forum!

Please use forum.silverstripe.org for any new questions (announcement).
The forum archive will stick around, but will be read only.

You can also use our Slack channel or StackOverflow to ask for help.
Check out our community overview for more options to contribute.

General Questions /

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

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

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


Go to End


3 Posts   1668 Views

Avatar
swaiba

Forum Moderator, 1899 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, 97 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, 97 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();