added images to make this an all-in-one package.
[www-register-wizard.git] / application / views / stage1_pcu_choose.php
1 <div class="plroundedconfirm">
2 <?= form_open('register/stage2_confirmpcu') ?>
3                 <table border=0 cellpadding=3>
4                         <tbody>
5                 <?php if ( !empty($pcu_list) ): ?>
6                                 <tr><td colspan='2'><h3>Choose an Existing PCU</h3></td></tr>
7                                 <tr><th>PCU Name: </th><td>
8                                                         <select name='pcu_id'>
9                                                         <?php foreach ( $pcu_list as $pcu ): ?>
10                                                                         <option value='<?= $pcu->data['pcu_id'] ?>' <?= ( $this->pcu_id == $pcu->data['pcu_id'] ? "selected" : "") ?>>
11                                                                                 <?= $pcu->pcu_name() ?>
12                                                                         </option>
13                                                         <?php endforeach; ?>
14                                                         </select>
15                                                 </td>
16                                 </tr>
17                                 <tr><td></td>
18                                         <td>
19                                                 <input type=submit name='pcu_choose' value='Continue'>
20                                         </td>
21                                 </tr>
22                 <?php endif; ?>
23                 </tbody>
24         </table>
25 </form>
26 </div>
27 <br>
28 <div class="plroundedupdate">
29 <?php if ( !isset($pcu_id) || $pcu_id == 0 ): ?>
30         <?= form_open('register/stage1_addpcu') ?>
31                         <table border=0 cellpadding=3>
32                                 <tbody>
33                                         <tr><td colspan='2'><h3>Or, Register a New PCU</h3></td></tr>
34                         <?php if ( !empty($site_list) ): ?>
35                                         <tr><th>Site: </th><td>
36                                                                 <select name='site_id'>
37                                                                 <?php 
38                                                                          foreach ( $site_list as $site ) 
39                                                                          { 
40                                                                                 if ( $site['site_id'] == $default_site_list[0] )
41                                                                                         $selected = " selected";
42                                                                                 else
43                                                                                         $selected = "";
44                                                                                 ?>
45                                                                                 <option value='<?= $site['site_id'] ?>' <?= $selected ?>>
46                                                                                         <?= $site['name'] ?>
47                                                                                 </option>
48                                                                 <?php } ?>
49                                                                 </select>
50                                                         </td>
51                                                         <td>
52                                                         </td>
53                                                 </tr>
54                         <?php else: ?>
55                                         <tr><th>ERROR:</th><td>No sites returned...</td></tr>
56                         <?php endif; ?>
57                                         <tr><th>Model: </th>
58                                                 <td>
59                         <select name='model'>
60                                 <option value='none-selected' 
61                                                 <?= $this->validation->set_select('model', 'none-selected') ?>>---</option>
62                                 <?php foreach( $pcu_types as $pcu_type ): ?>
63                                                 <option value='<?= $pcu_type['model'] ?>' 
64                                                         <?= $this->validation->set_select('model', $pcu_type['model']) ?>>
65                                                         <?= $pcu_type['name'] ?>
66                                                 </option>
67                                 <?php endforeach; ?>
68                         </select>
69                                                 </td>
70                                         </tr>
71                                         <tr>
72                                                 <th>Hostname: </th>
73                                                 <td nowrap>
74                                                         <input  type=text name='hostname' size=40 
75                                                                         value='<?= $this->validation->hostname ?>'>
76                                                         <?= $this->validation->hostname_error ?>
77                                                 </td>
78                                         </tr>
79                                         <tr><th>IP Address: </th>
80                                                 <td nowrap>
81                                                         <input type=text name='ip' 
82                                                                         value='<?= $this->validation->ip ?>'>
83                                                         <?= $this->validation->ip_error ?>
84                                                 </td>
85                                         </tr>
86                                         <tr><th>Username: </th>
87                                                 <td nowrap>
88                                                         <input type=text name='username' 
89                                                                         value='<?= $this->validation->username ?>'>
90                                                         <?= $this->validation->username_error ?>
91                                                 </td>
92                                         </tr>
93                                         <tr><th>Password: </th>
94                                                 <td nowrap>
95                                                         <input type=text name='password' 
96                                                                         value='<?= $this->validation->password ?>'>
97                                                         <?= $this->validation->password_error ?>
98                                                 </td>
99                                         </tr>
100                                         <tr><th>Notes: </th>
101                                                 <td><textarea name="notes" rows=5 cols=40></textarea></td>
102                                         </tr>
103                                         <tr><td></td>
104                                                 <td>
105                                                         <input type=submit name='pcu_register' value='Add New PCU'>
106                                                 </td>
107                                         </tr>
108                                 </tbody>
109                                 </table>
110         </form>
111 </div>
112 <?php else: ?>
113         <table border=0 cellpadding=3>
114                 <tbody>
115                         <tr><td></td><td><h3>PCU Added Successfully!!!!</h3></td></tr>
116                         <?php if ( ! empty($error) ): ?>
117                         <tr><td></td><td><?= $error ?></td></tr>
118                         <?php endif; ?>
119                 </tbody>
120         </table>
121 <?php endif; ?>
122         <br /><p>
123                 <a href='/db/sites/index.php?id=<?= $default_site_list[0] ?>'>Back to Home Site</a>