mirror of
https://github.com/silverstripe/silverstripe-cms
synced 2024-10-22 08:05:56 +02:00
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:
parent
d03eb541ef
commit
59999e197e
@ -155,6 +155,14 @@
|
|||||||
});
|
});
|
||||||
|
|
||||||
this.html(html);
|
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')) {
|
if(this.hasClass('validationerror')) {
|
||||||
statusMessage(ss.i18n._t('ModelAdmin.VALIDATIONERROR', 'Validation Error'), 'bad');
|
statusMessage(ss.i18n._t('ModelAdmin.VALIDATIONERROR', 'Validation Error'), 'bad');
|
||||||
|
Loading…
Reference in New Issue
Block a user