mirror of
https://github.com/Combodo/iTop.git
synced 2026-02-12 23:14:18 +01:00
N°3979 - Handle initial values on dependent fields (#325)
N°3979 - Handle initial values on dependent fields
This commit is contained in:
@@ -35,8 +35,7 @@ $(function()
|
||||
{
|
||||
var me = this;
|
||||
|
||||
this.element
|
||||
.append('<div class="last-error"></div>')
|
||||
this.element.append('<div class="last-error"></div>')
|
||||
.addClass('console_form_handler');
|
||||
|
||||
this.options.oWizardHelper = window[this.options.wizard_helper_var_name];
|
||||
@@ -48,13 +47,13 @@ $(function()
|
||||
// revert other modifications here
|
||||
_destroy: function()
|
||||
{
|
||||
this.element
|
||||
.removeClass('console_form_handler');
|
||||
this.element.removeClass('console_form_handler');
|
||||
this._super();
|
||||
},
|
||||
_onUpdateFields: function(event, data)
|
||||
{
|
||||
var me = this;
|
||||
me._updatePreviousValues();
|
||||
var sFormPath = data.form_path;
|
||||
var sUpdateUrl = GetAbsoluteUrlAppRoot()+'pages/ajax.render.php';
|
||||
|
||||
@@ -64,7 +63,6 @@ $(function()
|
||||
{
|
||||
operation: 'custom_fields_update',
|
||||
attcode: this.options.custom_field_attcode,
|
||||
//current_values: this.getCurrentValues(),
|
||||
requested_fields: data.requested_fields,
|
||||
form_path: sFormPath,
|
||||
json_obj: this.options.oWizardHelper.UpdateWizardToJSON()
|
||||
@@ -85,6 +83,7 @@ $(function()
|
||||
me.element.find('.last-error').text(data.error);
|
||||
}
|
||||
me._onUpdateAlways(data, sFormPath);
|
||||
me.element.find('[data-field-id="previous_values"]').find('input[type="hidden"]').val('{}');
|
||||
});
|
||||
},
|
||||
// On initialization or update
|
||||
|
||||
Reference in New Issue
Block a user