summaryrefslogtreecommitdiffstats
path: root/src/usr/local/www/firewall_aliases_edit.php
diff options
context:
space:
mode:
authorSteve Beaver <sbeaver@netgate.com>2017-01-19 11:18:59 -0500
committerSteve Beaver <sbeaver@netgate.com>2017-01-19 11:23:00 -0500
commit57026d17d43a096c3a594a248c183a6889e7956d (patch)
treebd942f8bb92759b42695987eaa9e89946d9e7fdf /src/usr/local/www/firewall_aliases_edit.php
parent173f1c0c14b6cb72c960ebcbe171bdd06244f53a (diff)
downloadpfsense-57026d17d43a096c3a594a248c183a6889e7956d.zip
pfsense-57026d17d43a096c3a594a248c183a6889e7956d.tar.gz
Fixed #7083
When composing an element with a form.class or via XML, prepend a '*' to the title to indicate a required field. This will cause the "element-required" class to be added to the label. pfSense.css contains the style associated with that class. (Currently a custom underline). e.g.: $section->addInput(new Form_Input( 'name', '*Name', 'text', $pconfig['name'] ))->setPattern('[a-zA-Z0-9_]+')->setHelp('The name of the alias may only consist '. 'of the characters "a-z, A-Z, 0-9 and _".');
Diffstat (limited to 'src/usr/local/www/firewall_aliases_edit.php')
-rw-r--r--src/usr/local/www/firewall_aliases_edit.php4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/usr/local/www/firewall_aliases_edit.php b/src/usr/local/www/firewall_aliases_edit.php
index b582911..7053390 100644
--- a/src/usr/local/www/firewall_aliases_edit.php
+++ b/src/usr/local/www/firewall_aliases_edit.php
@@ -646,9 +646,11 @@ if (isset($id) && $a_aliases[$id]) {
$section = new Form_Section('Properties');
+// Experiment: Pre-pending the input title/label with '*' causes the element-required class to be added to the label
+// which adds text decoration to indicate this is a required field. See pfSense.css
$section->addInput(new Form_Input(
'name',
- 'Name',
+ '*Name',
'text',
$pconfig['name']
))->setPattern('[a-zA-Z0-9_]+')->setHelp('The name of the alias may only consist '.
OpenPOWER on IntegriCloud