N°3678 - Portal : a modification of field cannot hide another one

This commit is contained in:
acognet
2021-06-24 10:34:09 +02:00
parent 5d994edd62
commit a940adc4ba
3 changed files with 37 additions and 3 deletions

View File

@@ -151,9 +151,16 @@ $(function()
// Intended for overloading in derived classes
_onUpdateSuccess: function(oData, sFormPath)
{
var me = this;
if(oData.form.hidden_fields !== undefined)
{
$.each(oData.form.hidden_fields, function( index, value ) {
me.element.find('[data-form-path="' + sFormPath + '"][data-field-id="'+value+'"][data-attribute-flag-hidden="false"]').remove();
});
}
if(oData.form.updated_fields !== undefined)
{
this.element.find('[data-form-path="' + sFormPath + '"]').trigger('update_form', {updated_fields: oData.form.updated_fields});
me.element.find('[data-form-path="' + sFormPath + '"]').trigger('update_form', {updated_fields: oData.form.updated_fields});
}
},
// Intended for overloading in derived classes