mirror of
https://github.com/processwire/processwire.git
synced 2025-08-09 08:17:12 +02:00
Update to previous commit
This commit is contained in:
@@ -160,7 +160,6 @@ class InputfieldInteger extends Inputfield {
|
|||||||
if($key === 'value') {
|
if($key === 'value') {
|
||||||
$value = $this->sanitizeValue($value);
|
$value = $this->sanitizeValue($value);
|
||||||
if(strlen("$value") && !$this->isInRange($value)) {
|
if(strlen("$value") && !$this->isInRange($value)) {
|
||||||
if($value) {
|
|
||||||
// apply the following only for non-zero values
|
// apply the following only for non-zero values
|
||||||
$min = (string) $this->attr('min');
|
$min = (string) $this->attr('min');
|
||||||
$max = (string) $this->attr('max');
|
$max = (string) $this->attr('max');
|
||||||
@@ -168,8 +167,7 @@ class InputfieldInteger extends Inputfield {
|
|||||||
if(!strlen("$min")) $min = $any;
|
if(!strlen("$min")) $min = $any;
|
||||||
if(!strlen("$max")) $max = $any;
|
if(!strlen("$max")) $max = $any;
|
||||||
$this->error(sprintf($this->_('Specified value %3$s removed because it is out of bounds (min=%1$s, max=%2$s)'), $min, $max, $value));
|
$this->error(sprintf($this->_('Specified value %3$s removed because it is out of bounds (min=%1$s, max=%2$s)'), $min, $max, $value));
|
||||||
}
|
$value = $this->val();
|
||||||
$value = $this->val(); // restore previous value
|
|
||||||
}
|
}
|
||||||
} else if($key === 'min' || $key === 'max') {
|
} else if($key === 'min' || $key === 'max') {
|
||||||
if(strlen("$value")) {
|
if(strlen("$value")) {
|
||||||
|
Reference in New Issue
Block a user