Skip to content

Commit

Permalink
fix: mark inputs of styling plugin as required
Browse files Browse the repository at this point in the history
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
  • Loading branch information
micgro42 authored and splitbrain committed Oct 14, 2020
1 parent a7e2efd commit 626992a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/plugins/styling/admin.php
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ public function form()
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>';
Expand Down

0 comments on commit 626992a

Please sign in to comment.