Commit b9472639 authored by tbrehm's avatar tbrehm

disable some fields in edit mode.

parent 32f2ded5
......@@ -111,6 +111,13 @@ class page_action extends tform_actions {
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();
}
......
......@@ -8,7 +8,7 @@
<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>
......
......@@ -7,7 +7,7 @@
<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>
......
......@@ -185,6 +185,13 @@ class page_action extends tform_actions {
}
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();
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment