mirror of
https://github.com/Combodo/iTop.git
synced 2026-02-13 07:24:13 +01:00
Protect against JS errors when the form is in read-only mode.
SVN:trunk[3482]
This commit is contained in:
@@ -344,8 +344,15 @@ $(function()
|
||||
var oWidget = me._get_widget($(this).closest('.itop-property-field'));
|
||||
if (oWidget)
|
||||
{
|
||||
oWidget._setOptions({can_apply: !me.bModified, parent_selector: '#'+me.element.attr('id') });
|
||||
oWidget.validate();
|
||||
try
|
||||
{
|
||||
oWidget._setOptions({can_apply: !me.bModified, parent_selector: '#'+me.element.attr('id') });
|
||||
oWidget.validate();
|
||||
}
|
||||
catch(e)
|
||||
{
|
||||
// Do nothing, form in read-only mode
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user