Project

General

Profile

« Previous | Next » 

Revision 68ffe3ea

Added by Scott Ullrich over 18 years ago

DHCP Relay - server textbox field doesn't toggle properly

Ticket #1313

View differences:

usr/local/www/services_dhcp_relay.php
146 146

  
147 147
<script language="JavaScript">
148 148
<!--
149
function enable_change(enable_over) {
150
	if (document.iform.enable.checked || enable_over) {
151
		document.iform.server.disabled = 0;
152
		document.iform.agentoption.disabled = 0;
153
		document.iform.proxydhcp.disabled = 0;
154
	} else {
155
		document.iform.server.disabled = 1;
156
		document.iform.agentoption.disabled = 1;
157
		document.iform.proxydhcp.disabled = 1;
158
	}
159
	if (document.iform.proxydhcp.checked) {
160
		document.iform.server.disabled = 1;
161
	}
149
function enable_change() {
150
	document.iform.agentoption.disabled  = !document.iform.enable.checked;
151
	document.iform.proxydhcp.disabled    = !document.iform.enable.checked;
152
	document.iform.server.disabled       = !(document.iform.enable.checked && document.iform.proxydhcp.checked);
162 153
}
163 154
//-->
164 155
</script>
......
194 185
                      <tr>
195 186
                        <td width="22%" valign="top" class="vtable">&nbsp;</td>
196 187
                        <td width="78%" class="vtable">
197
<input name="enable" type="checkbox" value="yes" <?php if ($pconfig['enable']) echo "checked"; ?> onClick="enable_change(false)">
188
<input name="enable" type="checkbox" value="yes" <?php if ($pconfig['enable']) echo "checked"; ?> onClick="enable_change()">
198 189
                          <strong>Enable DHCP relay on
199 190
                          <?=htmlspecialchars($iflist[$if]);?>
200 191
                          interface</strong></td>
......
204 195
                      <td width="78%" class="vtable">
205 196
<input name="agentoption" type="checkbox" value="yes" <?php if ($pconfig['agentoption']) echo "checked"; ?>>
206 197
                      <strong>Append circuit ID and agent ID to requests</strong><br>
207
                      If this is checked, the DHCP relay will append the circuit ID (pfSense interface number) and the agent ID to the DHCP request.</td>
198
                      If this is checked, the DHCP relay will append the circuit ID (SolidCache interface number) and the agent ID to the DHCP request.</td>
208 199
        		  </tr>
209 200
                      <tr>
210 201
                        <td width="22%" valign="top" class="vncell">Destination server</td>
211 202
                        <td width="78%" class="vtable">
212
			<input name="proxydhcp" type="checkbox" value="yes" <?php if ($pconfig['proxydhcp']) echo "checked"; ?> onClick="enable_change(false)">  Proxy requests to DHCP server on WAN subnet
203
			<input name="proxydhcp" type="checkbox" value="yes" <?php if ($pconfig['proxydhcp']) echo "checked"; ?> onClick="enable_change()">  Proxy requests to DHCP server on WAN subnet
213 204
                          <br><br><input name="server" type="text" class="formfld" id="server" size="20" value="<?=htmlspecialchars($pconfig['server']);?>">
214 205
                          <br>
215 206
			  This is the IP address of the server to which the DHCP packet is relayed.  Select "Proxy requests to DHCP server on WAN subnet" to relay DHCP packets to the server that was used on the WAN interface.
......
219 210
                        <td width="22%" valign="top">&nbsp;</td>
220 211
                        <td width="78%">
221 212
                          <input name="if" type="hidden" value="<?=$if;?>">
222
                          <input name="Submit" type="submit" class="formbtn" value="Save" onclick="enable_change(true)">
213
                          <input name="Submit" type="submit" class="formbtn" value="Save" onclick="enable_change()">
223 214
                        </td>
224 215
                      </tr>
225 216
                    </table>
......
230 221
</form>
231 222
<script language="JavaScript">
232 223
<!--
233
enable_change(false);
224
enable_change();
234 225
//-->
235 226
</script>
236 227
<?php include("fend.inc"); ?>

Also available in: Unified diff