BUG 7042 Solved the validation of the field date in dynaform Grid

The problem was solved modificating the validation of the field date
This commit is contained in:
Douglas Medrano Chura
2011-06-09 15:26:24 -04:00
parent cbd51f9f00
commit ae3f158d2c
2 changed files with 13 additions and 3 deletions

View File

@@ -270,6 +270,16 @@ var G_Grid = function(oForm, sGridName){
}
//Create new 'a' to trigger DatePicker
var a2 = document.createElement('a');
if( a2.style.setAttribute ) {
var styleText = "position:relative;top:0px;left:-19px;";
a2.style.setAttribute("cssText", styleText );
}
else {
var styleText = "position:relative;top:0px;left:-22px;";
a2.setAttribute("style", styleText );
}
a2.id = datePickerTriggerId;
a2.innerHTML = img2;
oNewRow.getElementsByTagName('td')[i].appendChild(a2);

View File

@@ -3356,7 +3356,7 @@ class XmlForm_Field_Date extends XmlForm_Field_SimpleText
} else {
$isRequired = '0';
}
$html = '<input class="module_app_input___gray" id="form[' . $owner->name . '][' . $r . '][' . $this->name . ']" name="form[' . $owner->name . '][' . $r . '][' . $this->name . ']" type ="text" size="' . $this->size . '" maxlength="' . $this->maxLength . '" value="' . $this->htmlentities ( $v, ENT_COMPAT, 'utf-8' ) . '" required="' . $isRequired . '" style="display:none;' . htmlentities ( $this->style, ENT_COMPAT, 'utf-8' ) . '"/>' . htmlentities ( $v, ENT_COMPAT, 'utf-8' );
$html = '<input '.$this->NSRequiredValue().' class="module_app_input___gray" id="form[' . $owner->name . '][' . $r . '][' . $this->name . ']" name="form[' . $owner->name . '][' . $r . '][' . $this->name . ']" type ="text" size="' . $this->size . '" maxlength="' . $this->maxLength . '" value="' . $this->htmlentities ( $v, ENT_COMPAT, 'utf-8' ) . '" required="' . $isRequired . '" style="display:none;' . htmlentities ( $this->style, ENT_COMPAT, 'utf-8' ) . '"/>' . htmlentities ( $v, ENT_COMPAT, 'utf-8' );
} else {
$id = 'form[' . $owner->name . '][' . $r . '][' . $this->name . ']';
$html = $this->__draw_widget ( $id, $v, $owner );
@@ -3554,7 +3554,7 @@ class XmlForm_Field_Date extends XmlForm_Field_SimpleText
}
if ( $this->editable != "0") {
$html = '<input id="'.$pID.'" name="'.$pID.'" pm:mask="'.$mask.'" pm:start="'.$startDate.'" pm:end="'.$endDate.'" pm:time="'.$Time.'" '.$onchange.' class="module_app_input___gray" size="'.$sizeend.'" value="'.$value.'" pm:defaultvalue="'.$value1.'" required="' . $isRequired . '"/>'
$html = '<input pm:required="'. $isRequired .'" id="'.$pID.'" name="'.$pID.'" pm:mask="'.$mask.'" pm:start="'.$startDate.'" pm:end="'.$endDate.'" pm:time="'.$Time.'" '.$onchange.' class="module_app_input___gray" size="'.$sizeend.'" value="'.$value.'" pm:defaultvalue="'.$value1.'" required="' . $isRequired . '"/>'
. '<a onclick="removeValue(\''.$pID.'\'); return false;" style="position:relative;left:-17px;top:5px;" >'
. ' <img src="/images/icons_silk/calendar_x_button.png" />'
. '</a>'
@@ -3563,7 +3563,7 @@ class XmlForm_Field_Date extends XmlForm_Field_SimpleText
. '</a>'
. '<script>datePicker4("", \''.$pID.'\', \''.$mask.'\', \''.$startDate.'\', \''.$endDate.'\','.$Time.')</script>';
} else {
$html = '<input id="'.$pID.'" name="'.$pID.'" pm:mask="'.$mask.'" pm:start="'.$startDate.'" pm:end="'.$endDate.'" pm:time="'.$Time.'" '.$onchange.' class="module_app_input___gray" size="'.$sizeend.'" value="'.$value.'"pm:defaultvalue="'.$value1.'" readonly="readonly" required="' . $isRequired . '"/>'
$html = '<input pm:required="'. $isRequired .'" id="'.$pID.'" name="'.$pID.'" pm:mask="'.$mask.'" pm:start="'.$startDate.'" pm:end="'.$endDate.'" pm:time="'.$Time.'" '.$onchange.' class="module_app_input___gray" size="'.$sizeend.'" value="'.$value.'"pm:defaultvalue="'.$value1.'" readonly="readonly" required="' . $isRequired . '"/>'
. '<a onclick="removeValue(\''.$pID.'\'); return false;" style="position:relative;left:-17px;top:5px;" >'
. ' <img src="/images/icons_silk/calendar_x_button.png" />'
. '</a>'