Commits

Ramiro Anacona Meneses committed 2378884 Merge

Merged christiansalazarh/cruge into master

Comments (0)

Files changed (2)

models/data/CrugeField.php

             );
         }
 
+		if($this->maxlength != -1)
         if (strlen($_val) > $this->maxlength) {
             $validateResult = false;
             $this->addError(
             array('fieldname', 'unique'),
             array('position', 'numerical', 'min' => 0, 'max' => 99),
             array('fieldsize', 'numerical', 'min' => 1, 'max' => 100),
-            array('maxlength', 'numerical', 'min' => 1, /*'max' => 512*/),
+            array('maxlength', 'numerical', 'min' => -1, /*'max' => 512*/),
             array('predetvalue', 'safe'),
             array('idfield, fieldname, longname, position, required, fieldtype', 'safe', 'on' => 'search'),
         );

views/ui/fieldsadminupdate.php

 		</div>
 		<div class='col'>
 			<?php echo $form->labelEx($model,'maxlength'); ?>
-			<?php echo $form->textField($model,'maxlength',array('size'=>5,'maxlength'=>5)); ?>
+			<?php echo $form->textField($model,'maxlength',array('size'=>8,'maxlength'=>20)); ?>
 			<?php echo $form->error($model,'maxlength'); ?>
+			<i><?php echo CrugeTranslator::t("maxlength = -1 causa que no se valide el tamano de este campo");?></i>
 		</div>
 	</div>