disable some fields in edit mode.
| | |
| | | unset($policy_select); |
| | | unset($tmp_user); |
| | | |
| | | if($this->id > 0) { |
| | | //* we are editing a existing record |
| | | $app->tpl->setVar("edit_disabled", 'disabled="disabled"'); |
| | | } else { |
| | | $app->tpl->setVar("edit_disabled", ''); |
| | | } |
| | | |
| | | parent::onShowEnd(); |
| | | } |
| | | |
| | |
| | | <tmpl_if name="is_admin">
|
| | | <span class="wf_oneField">
|
| | | <label for="server_id" class="wf_preField">{tmpl_var name='server_id_txt'}</label>
|
| | | <select id="server_id" name="server_id">{tmpl_var name='server_id'}</select>
|
| | | <select id="server_id" name="server_id" {tmpl_var name='edit_disabled'}>{tmpl_var name='server_id'}</select> |
| | | </span>
|
| | | <span class="wf_oneField">
|
| | | <label for="client_group_id" class="wf_preField">{tmpl_var name='client_txt'}</label>
|
| | |
| | | <tmpl_if name="is_admin"> |
| | | <span class="wf_oneField"> |
| | | <label for="server_id" class="wf_preField">{tmpl_var name='server_id_txt'}</label> |
| | | <select id="server_id" name="server_id" onChange="loadContentInto('ip_address','sites/ajax_get_ip.php?server_id='+document.getElementById('server_id').value)">{tmpl_var name='server_id'}</select> |
| | | <select id="server_id" name="server_id" onChange="loadContentInto('ip_address','sites/ajax_get_ip.php?server_id='+document.getElementById('server_id').value)" {tmpl_var name='edit_disabled'}>{tmpl_var name='server_id'}</select> |
| | | </span> |
| | | <span class="wf_oneField"> |
| | | <label for="client_group_id" class="wf_preField">{tmpl_var name='client_txt'}</label> |
| | |
| | | |
| | | } |
| | | |
| | | if($this->id > 0) { |
| | | //* we are editing a existing record |
| | | $app->tpl->setVar("edit_disabled", 'disabled="disabled"'); |
| | | } else { |
| | | $app->tpl->setVar("edit_disabled", ''); |
| | | } |
| | | |
| | | parent::onShowEnd(); |
| | | } |
| | | |