reformat valueset if string is longer 30 chars

will put each value onto its one line. This is allowed since saving
the value set will trim each value
This commit is contained in:
Uwe Steinmann 2016-10-07 11:39:33 +02:00
parent 9bd1c111c8
commit 93ccbcf86e

View File

@ -222,7 +222,7 @@ $(document).ready( function() {
</td>
<td>
<?php if($attrdef && strlen($attrdef->getValueSet()) > 30) { ?>
<textarea name="valueset" rows="5"><?php echo $attrdef ? $attrdef->getValueSet() : '' ?></textarea>
<textarea name="valueset" rows="5"><?php echo ($attrdef && $attrdef->getValueSet()) ? $attrdef->getValueSetSeparator().implode("\n".$attrdef->getValueSetSeparator(), $attrdef->getValueSetAsArray()) : '' ?></textarea>
<?php } else { ?>
<input type="text" value="<?php echo $attrdef ? $attrdef->getValueSet() : '' ?>" name="valueset" />
<?php } ?>