mirror of
https://github.com/silverstripe/silverstripe-userforms.git
synced 2024-10-22 15:05:42 +00:00
bugfix + enhancement to support modeladmin
Update to allow UserDefinedForm pages to be managed through ModelAdmin. * Needed to update the ID of the form. * Bug on the form data serialisation (missing ampersand breaks security token.)
This commit is contained in:
parent
17bc3bce93
commit
45a3131caa
@ -116,10 +116,12 @@
|
||||
*/
|
||||
$('div.FieldEditor .MenuHolder .action').entwine({
|
||||
onclick: function(e) {
|
||||
var form = $("#Form_EditForm"),
|
||||
var theform = $("#Form_EditForm"); // edit from page
|
||||
if ( theform.length < 1 ) theform = $("#Form_ItemEditForm"); // edit from modeladmin
|
||||
var form = theform,
|
||||
length = $(".FieldInfo").length + 1,
|
||||
fieldType = $(this).siblings("select").val(),
|
||||
formData = form.serialize()+'NewID='+ length +"&Type="+ fieldType,
|
||||
formData = form.serialize()+'&NewID='+ length +"&Type="+ fieldType,
|
||||
fieldEditor = $(this).closest('.FieldEditor');
|
||||
|
||||
e.preventDefault();
|
||||
|
Loading…
x
Reference in New Issue
Block a user