Commits

jvaz...@debserverp4.com.ar  committed 117b78e Merge

Merged against head

  • Participants
  • Parent commits 576a744, ba3a938

Comments (0)

Files changed (3)

File application/modules/prospects/forms/Add.php

 			'label' => $element,
 			'required' => false,
 			'filters' => array ( 'StringTrim'),
-			'validators' => array ('validator' => array( 'regex', false, array('/^\d+(\.\d{1,2})?$/'))));
+			'validators' => array ('validator' => array( 'regex', false, array('/^\d+(\.\d{1,2})?$/','messages'=>array('regexNotMatch'=>'regexrentamount')))));
 		$this->addElement('text', $element, $opts);
 		$this->addDecoratorAndGroup( $element );
 	}
 			'label' => $element,
 			'required' => false,
 			'filters' => array ( 'StringTrim'),
-			'validators' => array ('validator' => array( 'regex', false, array('/^\d+(\.\d{1,2})?$/'))));
+			'validators' => array ('validator' => array( 'regex', false, array('/^\d+(\.\d{1,2})?$/','messages'=>array('regexNotMatch'=>'regexrentamount')))));
 		$this->addElement('text', $element, $opts);
 		$this->addDecoratorAndGroup( $element );
 	}
 	public function addOccupants()
 	{
 		$element = 'occupants';
-		$opts = array('label'=>'otherOccupantsForm','required'=>true);
+		$opts = array('label'=>'numOtherOccupantsForm',
+			      'required'=>true,
+			      'filters' => array ( 'StringTrim'),
+			      'validators' => array ('validator' => array( 'regex', false, array('/^[0-9]{1}$/','messages'=>array('regexNotMatch'=>'occregexnotmatch')))));
 		$this->addElement('text',$element,$opts);
 		$this->addDecoratorAndGroup($element);
 	}

File application/modules/prospects/views/scripts/view/detail.phtml

   			<td><?php echo $this->translate($this->prospect['prospect']['pets']);?></td>
   		</tr>
   		<tr>
-  			<td><i18n>otherOccupantsForm</i18n></td>
+  			<td><i18n>numOtherOccupantsForm</i18n></td>
   			<td><?php echo $this->translate($this->prospect['prospect']['occupants']);?></td>
   		</tr>
   		<tr>

File lang/translations.tmx

 				<seg>Su c&#243;nyugue</seg>
 			</tuv>
 		</tu>
-		<tu tuid="otherOccupantsForm">
-			<tuv xml:lang="en_US">
-				<seg>Other Occupants</seg>
-			</tuv>
-			<tuv xml:lang="es_AR">
-				<seg>Otros ocupantes</seg>
+		<tu tuid="numOtherOccupantsForm">
+			<tuv xml:lang="en_US">
+				<seg># Other Occupants</seg>
+			</tuv>
+			<tuv xml:lang="es_AR">
+				<seg># Otros ocupantes</seg>
 			</tuv>
 		</tu>
 		<tu tuid="otherOccupantsLabel">
 		<tuv xml:lang="en_US">
 			<seg>Prospect Save Failed.  Please contact customer support.</seg>
 		</tuv>		
-    </tu> 
+    </tu>
+    <tu tuid="occregexnotmatch">
+		<tuv xml:lang="en_US">
+			<seg>Enter the number of occupants between 0 and 9</seg>
+		</tuv>		
+    </tu>        
     </body>
 </tmx>