[Git][noosfero/noosfero][master] 2 commits: Fix removal field inside survey edit form
Rodrigo Souto
gitlab at mg.gitlab.com
Tue Mar 27 10:22:34 BRT 2018
Rodrigo Souto pushed to branch master at Noosfero / noosfero
Commits:
f33869e0 by caiomnt at 2018-03-13T19:07:59Z
Fix removal field inside survey edit form
- - - - -
23aaaa81 by Rodrigo Souto at 2018-03-27T13:22:21Z
Merge branch 'fix-survey-edit-removal-field' into 'master'
Fix removal field inside survey edit form
See merge request noosfero/noosfero!1406
- - - - -
1 changed file:
- plugins/custom_forms/public/javascripts/field.js
Changes:
=====================================
plugins/custom_forms/public/javascripts/field.js
=====================================
--- a/plugins/custom_forms/public/javascripts/field.js
+++ b/plugins/custom_forms/public/javascripts/field.js
@@ -72,11 +72,18 @@ var customFormsPlugin = {
}
}
+/* Remove field */
$(document).ready(function() {
$("a.remove-field").live('click', function() {
var field = $(this).closest('li');
+ var destroy_field = jQuery('input.destroy-field', field);
field.fadeOut(500, function() {
- $(this).remove();
+ if(destroy_field.length >= 1){
+ destroy_field.val(1);
+ field.hide();
+ }
});
+ return false;
});
});
+
View it on GitLab: https://gitlab.com/noosfero/noosfero/compare/1c60f493a6d24d34d9508ef5e12d0792c7ff3aee...23aaaa811ae15c344fe9e8fa6d027b20a2108438
---
View it on GitLab: https://gitlab.com/noosfero/noosfero/compare/1c60f493a6d24d34d9508ef5e12d0792c7ff3aee...23aaaa811ae15c344fe9e8fa6d027b20a2108438
You're receiving this email because of your account on gitlab.com.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://listas.softwarelivre.org/pipermail/noosfero-dev/attachments/20180327/79da485f/attachment-0001.html>
More information about the Noosfero-dev
mailing list