add validation rule attribute to input field for interger attributes

This commit is contained in:
Uwe Steinmann 2016-09-06 15:33:26 +02:00
parent 0977ed0a76
commit e4aba9ae25

View File

@ -1105,7 +1105,7 @@ $('#acceptkeywords').click(function(ev) {
if (strlen($objvalue) > 80) {
echo '<textarea class="input-xxlarge" name="'.$fieldname.'['.$attrdef->getId().']"'.($attrdef->getMinValues() > 0 ? ' required' : '').'>'.htmlspecialchars($objvalue).'</textarea>';
} else {
echo "<input type=\"text\" name=\"".$fieldname."[".$attrdef->getId()."]\" value=\"".htmlspecialchars($objvalue)."\"".($attrdef->getMinValues() > 0 ? ' required' : '')." />";
echo "<input type=\"text\" name=\"".$fieldname."[".$attrdef->getId()."]\" value=\"".htmlspecialchars($objvalue)."\"".($attrdef->getMinValues() > 0 ? ' required' : '').($attrdef->getType() == SeedDMS_Core_AttributeDefinition::type_int ? ' data-rule-digits="true"' : '')." />";
}
}
break;