fix: mark inputs of styling plugin as required

While this cannot ensure that the value is valid, it should prevent
accidental saving of an empty field, which crashes the less compiler.

Fixes #2246
This commit is contained in:
Michael Große 2018-04-06 14:39:06 +02:00 committed by Andreas Gohr
parent a7e2efd2e2
commit 626992ac3e
1 changed files with 1 additions and 1 deletions

View File

@ -86,7 +86,7 @@ class admin_plugin_styling extends DokuWiki_Admin_Plugin
echo '<tr>';
echo '<td><label for="tpl__'.hsc($key).'">'.$name.'</label></td>';
echo '<td><input type="'.$this->colorType($value).'" name="tpl['.hsc($key).']" id="tpl__'.hsc($key).'"
value="'.hsc($this->colorValue($value)).'" dir="ltr" /></td>';
value="'.hsc($this->colorValue($value)).'" dir="ltr" required="required"/></td>';
echo '</tr>';
}
echo '</tbody></table>';