/*+*********************************************************************************** * The contents of this file are subject to the vtiger CRM Public License Version 1.0 * ("License"); You may not use this file except in compliance with the License * The Original Code is: vtiger CRM Open Source * The Initial Developer of the Original Code is vtiger. * Portions created by vtiger are Copyright (C) vtiger. * All Rights Reserved. *************************************************************************************/ Vtiger_Field_Js("Webforms_Field_Js",{},{}) Vtiger_Field_Js('Webforms_Multipicklist_Field_Js',{},{ /** * Function to get the pick list values * @return key value pair of options */ getPickListValues : function() { return this.get('picklistvalues'); }, /** * Function to get the ui * @return - select element and chosen element */ getUi : function() { var html = ''; var selectContainer = jQuery(html); return selectContainer; } }); Vtiger_Field_Js('Webforms_Picklist_Field_Js',{},{ /** * Function to get the pick list values * @return key value pair of options */ getPickListValues : function() { return this.get('picklistvalues'); }, /** * Function to get the ui * @return - select element and chosen element */ getUi : function() { var html = ''; var selectContainer = jQuery(html); this.addValidationToElement(selectContainer); return selectContainer; } }); Vtiger_Field_Js('Webforms_Date_Field_Js',{},{ /** * Function to get the user date format */ getDateFormat : function(){ return this.get('date-format'); }, /** * Function to get the ui * @return - input text field */ getUi : function() { var html = '
'+ '
'+ ''+ ''+ '
'+ '
'; var element = jQuery(html); return this.addValidationToElement(element); } }); Vtiger_Field_Js('Webforms_Currency_Field_Js',{},{ /** * get the currency symbol configured for the user */ getCurrencySymbol : function() { return this.get('currency_symbol'); }, getUi : function() { var html = '
'+ ''+ this.getCurrencySymbol()+''+ ''+ '
'; var element = jQuery(html); return this.addValidationToElement(element); } }); Vtiger_Field_Js('Vtiger_Percentage_Field_Js',{},{ /** * Function to get the ui * @return - input percentage field */ getUi : function() { var html = '
'+ ''+ '%'+ '
'; var element = jQuery(html); return this.addValidationToElement(element); } }); Vtiger_Field_Js('Webforms_Time_Field_Js',{},{ /** * Function to get the ui * @return - input text field */ getUi : function() { var html = '
'+ ''+ ''+ '
'; var element = jQuery(html); return this.addValidationToElement(element); } }); Vtiger_Field_Js('Webforms_Reference_Field_Js',{},{ getReferenceModules : function(){ return this.get('referencemodules'); }, /** * Function to get the ui * @return - input text field */ getUi : function() { var referenceModules = this.getReferenceModules(); var html; var fieldName = this.getName(); var referredModuleName = referenceModules[0]; html = ''+ ''; html += '
'+ ''+ ''+ ''+ ''+ ''+ ''+ ''+ ''+ ''+ '' '
'; var referenceFieldNames = fieldName.split('[defaultvalue]'); var referredFieldName = referenceFieldNames[0]+'[referenceModule]'; html += ''; var element = jQuery(html); return this.addValidationToElement(element); } }); Vtiger_Field_Js('Webforms_Image_Field_Js',{},{ /** * Function to get the ui * @return - input text field */ getUi : function() { var html = ''; var element = jQuery(html); return this.addValidationToElement(element); } });