Custom fields: alpha version.

SVN:trunk[3943]
This commit is contained in:
Romain Quetiez
2016-03-10 16:55:13 +00:00
parent 67c92ab946
commit e6887ab317
19 changed files with 1047 additions and 197 deletions

View File

@@ -1,3 +1,20 @@
// Copyright (C) 2010-2016 Combodo SARL
//
// This file is part of iTop.
//
// iTop is free software; you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// iTop is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU Affero General Public License for more details.
//
// You should have received a copy of the GNU Affero General Public License
// along with iTop. If not, see <http://www.gnu.org/licenses/>
// ID of the (hidden) form field used to store the JSON representation of the
// object being edited in this page
var sJsonFieldId = 'json_object';
@@ -417,6 +434,15 @@ function ValidateRedundancySettings(sFieldId, sFormId)
return bValid;
}
//Special validation function for custom fields
function ValidateCustomFields(sFieldId, sFormId)
{
var oFieldSet = $('#'+sFieldId+'_console_form').console_form_handler('option', 'field_set');
bValid = oFieldSet.triggerHandler('validate');
ReportFieldValidationStatus(sFieldId, sFormId, bValid, '');
return bValid;
}
// Manage a 'duration' field
function UpdateDuration(iId)
{