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.

Customising the CMS /

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

Save Button In ModelAdmin


Go to End


984 Views

Avatar
anhtai063

Community Member, 1 Post

22 May 2014 at 9:32pm

Hi all, I have one problem about the save button. when i click on a item in seccond page, i dont found save button and delete button.
i use version 2.4.9.
i has required the MyModelAdmin.js file

(function($){
$(document).ready(function() {

// Hide goBack and goForward buttons on initial load
if(!this.future || !this.future.length) {
$('#Form_EditForm_action_goForward, #Form_ResultsForm_action_goForward').hide();
}
if(!this.history || this.history.length <= 1) {
$('#Form_EditForm_action_goBack, #Form_ResultsForm_action_goBack').hide();
}

/**
* This will create a url with data from the corresponding SearchForm of the Default DataObject.
* Don't use live to ensure this is run first on initial load.
*/
$('#right #Form_ResultsForm tbody td a:not(.deletelink,.downloadlink)').click(function(){
// Set history on initial load for default managed Model
if(!this.history || this.history.length < 1) {
var action = $('#Form_ResultsForm').attr('action').replace('ResultsForm?','SearchForm');
var form = $('form[action="'+action+'"]');
if(typeof $(form).attr('action') != 'undefined'){
var url = $(form).attr('action') + '?' + $(form).serialize();
$('#ModelAdminPanel').fn('addHistory', url);
}
}
});

})
})(jQuery);

tks all