2 if( isset($errors) && count($errors) > 0 )
4 print( "<p><strong>The following errors occured:</strong>" );
5 print( "<font color='red' size='-1'><ul>\n" );
6 foreach( $errors as $err )
10 print( "</ul></font>\n" );
13 <script language="javascript">
14 function initNodeTypeFields() {
15 var regular=document.getElementById("regular_checked");
16 var reservable=document.getElementById("reservable_checked");
17 if ( regular.checked || reservable.checked) return;
20 function updateMethodFields() {
21 var dhcp=document.getElementById("dhcp_checked");
22 var static=document.getElementById("static_checked");
23 // set dhcp as default
24 if ( ! dhcp.checked && ! static.checked) dhcp.checked=true;
25 var is_dhcp=dhcp.checked;
27 document.fm.netmask.disabled= is_dhcp;
28 document.fm.network.disabled= is_dhcp;
29 document.fm.gateway.disabled= is_dhcp;
30 document.fm.broadcast.disabled= is_dhcp;
31 document.fm.dns1.disabled= is_dhcp;
32 document.fm.dns2.disabled= is_dhcp;
35 <div class="plroundedconfirm">
36 <h3>Confirm Node Information</h3>
37 <?= form_open("register/stage45_mappcu/$pcu_id/$site_id/$node_id", array('method'=>'post')) ?>
38 <table border=0 cellpadding=3>
41 Please review the information below, and if it is correct, then Proceed to the
42 next stage. Otherwise, please Update the information as appropriate.
47 <input type=hidden name='pcu_id' value='<?= $pcu_id ?>'>
48 <input type=hidden name='node_id' value='<?= $node_id ?>'>
49 <input type=hidden name='site_id' value='<?= $site_id ?>'>
50 <input type=submit name='node_confirm' value='Confirm & Proceed'>
60 <div class="plroundedupdate">
61 <?= form_open("register/stage4_confirmnode/$pcu_id/$site_id/$node_id", array('name'=>'fm', 'method'=>'post')) ?>
62 <table border=0 cellpadding=3>
66 <?php if ( !empty($site) )
68 <tr><th>Site: </th><td> <?= $site['name'] ?> </td>
72 <th width=200>Hostname:</td>
73 <td><input type="text" name="hostname" value="<?= $node->hostname ?>"
74 size="40" maxlength="256">
75 <?= ( $this->disp_errors ? $this->validation->hostname_error : "") ?>
79 <th valign='top' width="200">Node Type</th>
81 <input type="radio" name="node_type" value="regular" id="regular_checked"
82 <?= ( $this->validation->node_type == 'regular' ? "checked" : "" ) ?>>regular
83 <input type="radio" name="node_type" value="reservable" id="reservable_checked"
84 <?= ( $this->validation->node_type == 'reservable' ? "checked" : "" ) ?>>reservable
90 <input type="text" name="model" value="<?= $node->model ?>"
91 size="40" maxlength="256">
92 <?= ( $this->disp_errors ? $this->validation->model_error : "") ?>
97 <th valign='top' width="200">Addressing Method</th>
99 <input type="radio" name="method" value="dhcp" id="dhcp_checked" onChange='updateMethodFields()'
100 <?= ( $this->validation->method == 'dhcp' ? "checked" : "" ) ?>>DHCP
101 <input type="radio" name="method" value="static" id='static_checked' onChange='updateMethodFields()'
102 <?= ( $this->validation->method == 'static' ? "checked" : "" ) ?>>Static
106 <th valign='top'>IP Address</th>
107 <td><input type="text" name="ip" value="<?= $node->ip ?>">
108 <?= ( $this->disp_errors ? $this->validation->ip_error : "") ?>
113 <th valign='top'>Netmask</font></th>
114 <td><input type="text" name="netmask" value="<?= $node->netmask ?>">
115 <?= ( $this->disp_errors ? $this->validation->netmask_error : "") ?>
120 <th valign='top'>Network address</th>
121 <td><input type="text" name="network" value="<?= $node->network ?>">
122 <?= ( $this->disp_errors ? $this->validation->network_error : "") ?>
127 <th valign='top'>Gateway Address</th>
128 <td><input type="text" name="gateway" value="<?= $node->gateway ?>">
129 <?= ( $this->disp_errors ? $this->validation->gateway_error : "") ?>
134 <th valign='top'>Broadcast address</th>
135 <td><input type="text" name="broadcast" value="<?= $node->broadcast ?>">
136 <?= ( $this->disp_errors ? $this->validation->broadcast_error : "") ?>
141 <th valign='top'>Primary DNS</th>
142 <td><input type="text" name="dns1" value="<?= $node->dns1 ?>">
143 <?= ( $this->disp_errors ? $this->validation->dns1_error : "") ?>
148 <th valign='top'>Secondary DNS</th>
149 <td><input type="text" name="dns2" value="<?= $node->dns2 ?>">
150 <?= ( $this->disp_errors ? $this->validation->dns2_error : "") ?>
157 <input type=hidden name='pcu_id' value='<?= $pcu_id ?>'>
158 <input type=hidden name='node_id' value='<?= $node_id ?>'>
159 <input type=hidden name='site_id' value='<?= $site_id ?>'>
160 <input type=submit name='node_update' value='Update & Return'>
167 <a href='/db/sites/index.php?id=<?= $site_id ?>'>Back to Home Site</a>
170 <script language="javascript">
171 initNodeTypeFields();
172 updateMethodFields();