2 if( isset($errors) && count($errors) > 0 )
6 <script language="javascript">
7 function updateStaticFields()
9 var is_dhcp= document.fm.method[0].checked;
11 document.fm.netmask.disabled= is_dhcp;
12 document.fm.network.disabled= is_dhcp;
13 document.fm.gateway.disabled= is_dhcp;
14 document.fm.broadcast.disabled= is_dhcp;
15 document.fm.dns1.disabled= is_dhcp;
16 document.fm.dns2.disabled= is_dhcp;
19 <div class="plroundedconfirm">
20 <?= form_open("register/stage4_confirmnode/$pcu_id/$site_id") ?>
21 <table border=0 cellpadding=3>
23 <?php if ( !empty($node_list) && !isset($error) ): ?>
24 <tr><td colspan='2'><h3>Choose a Node to Associate with PCU</h3></td></tr>
26 <tr><th>Node Name: </th><td>
27 <select name='node_id'>
28 <option value='0'>--</option>
29 <?php foreach ( $node_list as $node): ?>
30 <option value='<?= $node->data['node_id'] ?>' <?= ( $this->node_id == $node->data['node_id'] ? "selected" : "" ) ?>>
31 <?= $node->hostname ?>
40 <input type=submit name='node_choose' value='Continue'>
45 <p><strong>The following errors occured:</strong>
46 <font color='red' size='-1'><ul>
47 <li><?= $error ?></li>
55 <div class="plroundedupdate">
56 <table border=0 cellpadding=3>
58 <?php if ( !isset($node_id) || $node_id == 0 || !isset($interface_id) || $interface_id == 0): ?>
59 <?= form_open("register/stage3_addnode/$pcu_id/$site_id", array('name'=>'fm', 'method'=>'post')) ?>
60 <tr><td colspan='2'><h3>Or, Add a Node</h3></td></tr>
61 <tr><th>Site: </th><td><?= $site['name'] ?></td>
64 <th width=200>Hostname:</td>
65 <td><input type="text" name="hostname" value="<?= $this->validation->hostname ?>"
66 size="40" maxlength="256">
67 <?= ( $this->disp_errors ? $this->validation->hostname_error : "") ?>
73 <input type="text" name="model" value="<?= $this->validation->model ?>"
74 size="40" maxlength="256">
75 <?= ( $this->disp_errors ? $this->validation->model_error : "") ?>
79 <td> <b>Network Settings</b> </td>
83 <th valign='top' width="200">Addressing Method</th>
85 <input type="radio" name="method" value="dhcp" onChange='updateStaticFields()'
86 <?= ( $this->validation->method == 'dhcp' ? "checked" : "" ) ?>>DHCP
87 <input type="radio" name="method" value="static" onChange='updateStaticFields()'
88 <?= ( $this->validation->method == 'static' ? "checked" : "" ) ?>>Static
92 <tr><th valign='top'>IP Address</td>
93 <td><input type="text" name="ip" value="<?= $this->validation->ip ?>">
94 <?= ( $this->disp_errors ? $this->validation->ip_error : "") ?>
99 <th valign='top'>Netmask</font></td>
100 <td><input type="text" name="netmask" value="<?= $this->validation->netmask ?>">
101 <?= ( $this->disp_errors ? $this->validation->netmask_error : "") ?>
106 <th valign='top'>Network address</td>
107 <td><input type="text" name="network" value="<?= $this->validation->network ?>">
108 <?= ( $this->disp_errors ? $this->validation->network_error : "") ?>
113 <th valign='top'>Gateway Address</td>
114 <td><input type="text" name="gateway" value="<?= $this->validation->gateway ?>">
115 <?= ( $this->disp_errors ? $this->validation->gateway_error : "") ?>
120 <th valign='top'>Broadcast address</td>
121 <td><input type="text" name="broadcast" value="<?= $this->validation->broadcast ?>">
122 <?= ( $this->disp_errors ? $this->validation->broadcast_error : "") ?>
127 <th valign='top'>Primary DNS</td>
128 <td><input type="text" name="dns1" value="<?= $this->validation->dns1 ?>">
129 <?= ( $this->disp_errors ? $this->validation->dns1_error : "") ?>
134 <th valign='top'>Secondary DNS</td>
135 <td><input type="text" name="dns2" value="<?= $this->validation->dns2 ?>">
136 <?= ( $this->disp_errors ? $this->validation->dns2_error : "") ?>
143 <input type=hidden name='pcu_id' value='<?= $pcu_id ?>'>
144 <input type=hidden name='site_id' value='<?= $site_id ?>'>
145 <input type=submit name='register_node' value='Add New Node'>
151 <table border=0 cellpadding=3>
153 <tr><td></td><td><h3>Node Added Successfully!!!!</h3></td></tr>
154 <?php if ( isset($errors) and ! empty ($errors) ): ?>
155 <?php foreach ( $errors as $error ): ?>
156 <tr><td></td><td><?= $error ?></td></tr>
164 <a href='/db/sites/index.php?id=<?= $default_site_list[0] ?>'>Back to Home Site</a>
167 <script language="javascript">
168 updateStaticFields();