[Vtigercrm-commits] [vtiger-commits] r6579 - /vtigercrm/trunk/modules/Quotes/EditView.php
vtigercrm-commits at vtiger.fosslabs.com
vtigercrm-commits at vtiger.fosslabs.com
Sun May 28 02:24:23 EDT 2006
Author: saraj
Date: Sun May 28 00:24:20 2006
New Revision: 6579
Log:
changes made to have validation for quotes
Modified:
vtigercrm/trunk/modules/Quotes/EditView.php
Modified: vtigercrm/trunk/modules/Quotes/EditView.php
==============================================================================
--- vtigercrm/trunk/modules/Quotes/EditView.php (original)
+++ vtigercrm/trunk/modules/Quotes/EditView.php Sun May 28 00:24:20 2006
@@ -195,46 +195,11 @@
$quote_tables = Array('quotes','quotesbillads','quotesshipads','quotescf');
$tabid = getTabid("Quotes");
$validationData = getDBValidationData($quote_tables,$tabid);
- $fieldName = '';
- $fieldLabel = '';
- $fldDataType = '';
-
- $rows = count($validationData);
- foreach($validationData as $fldName => $fldLabel_array)
- {
- if($fieldName == '')
- {
- $fieldName="'".$fldName."'";
- }
- else
- {
- $fieldName .= ",'".$fldName ."'";
- }
- foreach($fldLabel_array as $fldLabel => $datatype)
- {
- if($fieldLabel == '')
- {
-
- $fieldLabel = "'".$fldLabel ."'";
- }
- else
- {
- $fieldLabel .= ",'".$fldLabel ."'";
- }
- if($fldDataType == '')
- {
- $fldDataType = "'".$datatype ."'";
- }
- else
- {
- $fldDataType .= ",'".$datatype ."'";
- }
- }
- }
-
-$smarty->assign("VALIDATION_DATA_FIELDNAME",$fieldName);
-$smarty->assign("VALIDATION_DATA_FIELDDATATYPE",$fldDataType);
-$smarty->assign("VALIDATION_DATA_FIELDLABEL",$fieldLabel);
+ $data = split_validationdataArray($validationData);
+
+ $smarty->assign("VALIDATION_DATA_FIELDNAME",$data['fieldname']);
+ $smarty->assign("VALIDATION_DATA_FIELDDATATYPE",$data['datatype']);
+ $smarty->assign("VALIDATION_DATA_FIELDLABEL",$data['fieldlabel']);
$smarty->assign("MODULE", $module);
More information about the vtigercrm-commits
mailing list