Skip to content
Snippets Groups Projects
Commit 4b5fd66a authored by Jared Hancock's avatar Jared Hancock
Browse files

list: Fix ui update when list properties are deleted

parent adf252ed
No related branches found
No related tags found
No related merge requests found
...@@ -223,7 +223,7 @@ ...@@ -223,7 +223,7 @@
$.fn.translatable.defaults = { $.fn.translatable.defaults = {
menu: '<div class="translations"></div>', menu: '<div class="translations"></div>',
button: '<button class="translatable"><i class="fa fa-globe icon-globe"></i></button>' button: '<button type="button" class="translatable"><i class="fa fa-globe icon-globe"></i></button>'
}; };
$.fn.translatable.Constructor = Translatable; $.fn.translatable.Constructor = Translatable;
......
...@@ -44,10 +44,11 @@ if($_POST) { ...@@ -44,10 +44,11 @@ if($_POST) {
// Update properties // Update properties
if (!$errors && ($form = $list->getForm())) { if (!$errors && ($form = $list->getForm())) {
$names = array(); $names = array();
foreach ($form->getDynamicFields() as $field) { $fields = $form->getDynamicFields();
foreach ($fields as $field) {
$id = $field->get('id'); $id = $field->get('id');
if ($_POST["delete-prop-$id"] == 'on' && $field->isDeletable()) { if ($_POST["delete-prop-$id"] == 'on' && $field->isDeletable()) {
$field->delete(); $fields->remove($field);
// Don't bother updating the field // Don't bother updating the field
continue; continue;
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment