Revision 11d8b2cd
Added by Jim Pingle almost 12 years ago
usr/local/www/wizards/setup_wizard.xml | ||
---|---|---|
138 | 138 |
<description>Enter the hostname (FQDN) of the time server.</description> |
139 | 139 |
<type>input</type> |
140 | 140 |
<bindstofield>system->timeservers</bindstofield> |
141 |
<validate>^[a-z0-9.|-]+$</validate> |
|
142 |
<message>Invalid Time Server Field</message> |
|
143 | 141 |
</field> |
144 | 142 |
<field> |
145 | 143 |
<name>Timezone</name> |
... | ... | |
153 | 151 |
</fields> |
154 | 152 |
<stepsubmitphpaction> |
155 | 153 |
<![CDATA[ |
156 |
if(!empty($_POST['timeserverhostname']) && !(is_hostname($_POST['timeserverhostname']) || is_ipaddr($_POST['timeserverhostname']))) { |
|
157 |
print_info_box_np("Invalid Time Server. Please press back in your browser window and correct."); |
|
158 |
die; |
|
154 |
foreach (explode(' ', $_POST['timeserverhostname']) as $ts) { |
|
155 |
if (!is_domain($ts)) { |
|
156 |
print_info_box_np(gettext("NTP Time Server names may only contain the characters a-z, 0-9, '-' and '.'. Entries may be separated by spaces. Please press back in your browser window and correct.")); |
|
157 |
die; |
|
158 |
} |
|
159 | 159 |
} |
160 | 160 |
]]> |
161 | 161 |
</stepsubmitphpaction> |
Also available in: Unified diff
Allow multiple valid time servers to be entered in the wizard, as they are allowed under System > General