Add validation with masks in dates in view mode
This commit is contained in:
@@ -4030,7 +4030,7 @@ class XmlForm_Field_Date extends XmlForm_Field_SimpleText
|
|||||||
|
|
||||||
if ($this->renderMode != 'edit' && $value == 'today') {
|
if ($this->renderMode != 'edit' && $value == 'today') {
|
||||||
$mask = str_replace( "%", "", $this->mask );
|
$mask = str_replace( "%", "", $this->mask );
|
||||||
$value = date( $mask );
|
$value = date( masktophp($mask) );
|
||||||
return $value;
|
return $value;
|
||||||
}
|
}
|
||||||
return $this->__draw_widget( $id, $value, $owner );
|
return $this->__draw_widget( $id, $value, $owner );
|
||||||
@@ -4065,7 +4065,7 @@ class XmlForm_Field_Date extends XmlForm_Field_SimpleText
|
|||||||
}
|
}
|
||||||
if ($v == 'today') {
|
if ($v == 'today') {
|
||||||
$mask = str_replace( "%", "", $this->mask );
|
$mask = str_replace( "%", "", $this->mask );
|
||||||
$v = date( $mask );
|
$v = date( masktophp($mask) );
|
||||||
}
|
}
|
||||||
$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' );
|
$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 {
|
} else {
|
||||||
|
|||||||
Reference in New Issue
Block a user