$errorMessage = '';
switch ($this->errorMessage) {
case 'wcf.condition.greaterThan.error.maxValue':
+ $errorMessage = WCF::getLanguage()->getDynamicVariable($this->errorMessage, array(
+ 'maxValue' => $this->maxValue - 1
+ ));
+ break;
+
case 'wcf.condition.lessThan.error.maxValue':
$errorMessage = WCF::getLanguage()->getDynamicVariable($this->errorMessage, array(
'maxValue' => $this->maxValue
break;
case 'wcf.condition.greaterThan.error.minValue':
- case 'wcf.condition.lessThan.error.minValue':
$errorMessage = WCF::getLanguage()->getDynamicVariable($this->errorMessage, array(
'minValue' => $this->minValue
));
break;
+ case 'wcf.condition.lessThan.error.minValue':
+ $errorMessage = WCF::getLanguage()->getDynamicVariable($this->errorMessage, array(
+ 'minValue' => $this->minValue + 1
+ ));
+ break;
+
default:
$errorMessage = WCF::getLanguage()->get($this->errorMessage);
break;
$lessThanPlaceHolder = WCF::getLanguage()->get('wcf.condition.lessThan');
return <<<HTML
-<input type="number" name="greaterThan_{$this->getIdentifier()}" value="{$this->greaterThan}" placeholder="{$greaterThanPlaceHolder}"{$this->getMinMaxAttributes('greaterThan')} />
-<input type="number" name="lessThan_{$this->getIdentifier()}" value="{$this->lessThan}" placeholder="{$lessThanPlaceHolder}"{$this->getMinMaxAttributes('lessThan')} />
+<input type="number" name="greaterThan_{$this->getIdentifier()}" value="{$this->greaterThan}" placeholder="{$greaterThanPlaceHolder}"{$this->getMinMaxAttributes('greaterThan')} class="medium" />
+<input type="number" name="lessThan_{$this->getIdentifier()}" value="{$this->lessThan}" placeholder="{$lessThanPlaceHolder}"{$this->getMinMaxAttributes('lessThan')} class="medium" />
HTML;
}
$attributes .= ' min="'.($this->getMinValue() + ($type == 'lessThan' ? 1 : 0)).'"';
}
if ($this->getMaxValue() !== null) {
- $attributes .= ' max="'.($this->getMaxValue() - ($type == 'lessThan' ? 1 : 0)).'"';
+ $attributes .= ' max="'.($this->getMaxValue() - ($type == 'greaterThan' ? 1 : 0)).'"';
}
return $attributes;
throw new UserInputException('lessThan', 'minValue');
}
else if ($this->getMaxValue() !== null && $this->lessThan > $this->getMaxValue()) {
- $this->errorMessages['lessThan'] = 'wcf.condition.lessThan.error.maxValue';
+ $this->errorMessage = 'wcf.condition.lessThan.error.maxValue';
throw new UserInputException('lessThan', 'maxValue');
}
}
if ($this->greaterThan !== null) {
if ($this->getMinValue() !== null && $this->greaterThan < $this->getMinValue()) {
- $this->errorMessages['greaterThan'] = 'wcf.condition.greaterThan.error.minValue';
+ $this->errorMessage = 'wcf.condition.greaterThan.error.minValue';
throw new UserInputException('greaterThan', 'minValue');
}
else if ($this->getMaxValue() !== null && $this->greaterThan >= $this->getMaxValue()) {
- $this->errorMessages['greaterThan'] = 'wcf.condition.greaterThan.error.maxValue';
+ $this->errorMessage = 'wcf.condition.greaterThan.error.maxValue';
throw new UserInputException('greaterThan', 'maxValue');
}
<category name="wcf.condition">
<item name="wcf.condition.greaterThan"><![CDATA[mehr als]]></item>
- <item name="wcf.condition.greaterThan.error.lessThan"><![CDATA[Der Minimalwert und der Maximalwert sind widersprüchlich.]]></item>
- <item name="wcf.condition.greaterThan.error.maxValue"><![CDATA[Der Maximalwert darf nicht größer sein als {#$maxValue}.]]></item>
- <item name="wcf.condition.greaterThan.error.minValue"><![CDATA[Der Maximalwert darf nicht kleiner sein als {#$minValue}.]]></item>
+ <item name="wcf.condition.greaterThan.error.lessThan"><![CDATA[Der „weniger als“-Wert und der „mehr als“-Wert sind widersprüchlich.]]></item>
+ <item name="wcf.condition.greaterThan.error.maxValue"><![CDATA[Der „mehr als“-Wert darf nicht größer sein als {#$maxValue}.]]></item>
+ <item name="wcf.condition.greaterThan.error.minValue"><![CDATA[Der „mehr als“-Wert darf nicht kleiner sein als {#$minValue}.]]></item>
<item name="wcf.condition.lessThan"><![CDATA[weniger als]]></item>
- <item name="wcf.condition.lessThan.error.maxValue"><![CDATA[Der Minimalwert darf nicht größer sein als {#$maxValue}.]]></item>
- <item name="wcf.condition.lessThan.error.minValue"><![CDATA[Der Minimalwert darf nicht kleiner sein als {#$minValue}.]]></item>
+ <item name="wcf.condition.lessThan.error.maxValue"><![CDATA[Der „weniger als“-Wert darf nicht größer sein als {#$maxValue}.]]></item>
+ <item name="wcf.condition.lessThan.error.minValue"><![CDATA[Der „weniger als“-Wert darf nicht kleiner sein als {#$minValue}.]]></item>
</category>
<category name="wcf.dashboard">
<category name="wcf.condition">
<item name="wcf.condition.greaterThan"><![CDATA[greater than]]></item>
- <item name="wcf.condition.greaterThan.error.lessThan"><![CDATA[The minimal value and the maximum value are conflicting.]]></item>
- <item name="wcf.condition.greaterThan.error.maxValue"><![CDATA[The maximum value may not be greater than {#$maxValue}.]]></item>
- <item name="wcf.condition.greaterThan.error.minValue"><![CDATA[The maximum value may not be less than {#$minValue}.]]></item>
+ <item name="wcf.condition.greaterThan.error.lessThan"><![CDATA[The “less than” value and the “greater than” value are conflicting.]]></item>
+ <item name="wcf.condition.greaterThan.error.maxValue"><![CDATA[The “greater than” value may not be greater than {#$maxValue}.]]></item>
+ <item name="wcf.condition.greaterThan.error.minValue"><![CDATA[The “greater than” value may not be less than {#$minValue}.]]></item>
<item name="wcf.condition.lessThan"><![CDATA[less than]]></item>
- <item name="wcf.condition.lessThan.error.maxValue"><![CDATA[The minimal value may not be greater than {#$maxValue}.]]></item>
- <item name="wcf.condition.lessThan.error.minValue"><![CDATA[The minimal value may not be less than {#$minValue}.]]></item>
+ <item name="wcf.condition.lessThan.error.maxValue"><![CDATA[The “less than” value may not be greater than {#$maxValue}.]]></item>
+ <item name="wcf.condition.lessThan.error.minValue"><![CDATA[The “less than” value may not be less than {#$minValue}.]]></item>
</category>
<category name="wcf.dashboard">