MINOR Supporting override attributes in hidden form fields in LeftAndMain.EditForm.js

git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/cms/trunk@92664 467b73ca-7a2a-4603-9d3b-597d59a354a9
This commit is contained in:
Ingo Schommer 2009-11-21 02:38:48 +00:00
parent d03eb541ef
commit 59999e197e

View File

@ -155,6 +155,14 @@
});
this.html(html);
// Optionally get the form attributes from embedded fields, see Form->formHtmlContent()
for(var overrideAttr in {'action':true,'method':true,'enctype':true,'name':true}) {
var el = this.find(':input[name='+ '_form_' + overrideAttr + ']');
if(el) {
this.attr(overrideAttr, el.val());
el.remove();
}
}
if(this.hasClass('validationerror')) {
statusMessage(ss.i18n._t('ModelAdmin.VALIDATIONERROR', 'Validation Error'), 'bad');