diff options
author | Steve Beaver <sbeaver@netgate.com> | 2017-01-19 11:45:26 -0500 |
---|---|---|
committer | Steve Beaver <sbeaver@netgate.com> | 2017-01-19 11:45:26 -0500 |
commit | 19fe69e675845a4a933b2b0a2df64a6f77d998da (patch) | |
tree | 4543d1270610e8f6aa53e687ef8c2a59d03bac74 | |
parent | 57026d17d43a096c3a594a248c183a6889e7956d (diff) | |
download | pfsense-19fe69e675845a4a933b2b0a2df64a6f77d998da.zip pfsense-19fe69e675845a4a933b2b0a2df64a6f77d998da.tar.gz |
fields with <required/> set now pre-pend an asterisk to the field title, thereby causing it to be displayed as a required field (currently an underline)
-rw-r--r-- | src/usr/local/www/pkg_edit.php | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/usr/local/www/pkg_edit.php b/src/usr/local/www/pkg_edit.php index 46711fc..d98b976 100644 --- a/src/usr/local/www/pkg_edit.php +++ b/src/usr/local/www/pkg_edit.php @@ -726,6 +726,12 @@ foreach ($pkg['fields']['field'] as $pkga) { $section = new Form_Section('General Options'); } + // If this is a required field, pre-pend a "*" to the field description + // This tells the system to add "element-required" class text decoration to the field label + if (isset($pkga['required'])) { + $pkga['fielddescr'] = "*" . $pkga['fielddescr']; + } + switch ($pkga['type']) { // Create an input element. The format is slightly different depending on whether we are composing a group, // section, or advanced section. This is true for every element type |