// GNU General Public License for more details. // // You should have received a copy of the GNU General Public License // along with this program. If not, see <http://www.gnu.org/licenses/>. // /////////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////// // Load dependencies /////////////////////////////////////////////////////////////////////////////// $this->lang->load('web_proxy'); /////////////////////////////////////////////////////////////////////////////// // Form handler /////////////////////////////////////////////////////////////////////////////// if ($form_type === 'edit') { $read_only = FALSE; $buttons = array(form_submit_update('submit'), anchor_cancel('/app/web_proxy')); } else { $read_only = TRUE; $buttons = array(anchor_edit('/app/web_proxy/authentication/edit')); } /////////////////////////////////////////////////////////////////////////////// // Form /////////////////////////////////////////////////////////////////////////////// // This is a bit unusual... the edit mode combines two fields (transparent and // user authentication). echo form_open('web_proxy/authentication/edit'); echo form_header(lang('web_proxy_authentication')); if (!$transparent_capable) { echo field_toggle_enable_disable('user_authentication', $user_authentication, lang('web_proxy_user_authentication'), $read_only); if ($ntlm_available) { echo field_toggle_enable_disable('ntlm', $ntlm, lang('web_proxy_ntlm_mode'), $read_only);
/////////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////// // Load dependencies /////////////////////////////////////////////////////////////////////////////// $this->lang->load('base'); $this->lang->load('pptpd'); /////////////////////////////////////////////////////////////////////////////// // Form handler /////////////////////////////////////////////////////////////////////////////// if ($auto_configure) { $read_only = TRUE; $buttons = array(); } else { if ($form_type === 'edit') { $read_only = FALSE; $buttons = array(form_submit_update('submit'), anchor_cancel('/app/pptpd/settings')); } else { $read_only = TRUE; $buttons = array(anchor_edit('/app/pptpd/settings/edit')); } } /////////////////////////////////////////////////////////////////////////////// // Auto configure help /////////////////////////////////////////////////////////////////////////////// $options['buttons'] = array(anchor_custom('/app/pptpd/settings/disable_auto_configure', lang('base_disable_auto_configuration'))); if ($auto_configure) { echo infobox_highlight(lang('base_automatic_configuration_enabled'), lang('pptpd_auto_configure_help'), $options); } /////////////////////////////////////////////////////////////////////////////// // Form ///////////////////////////////////////////////////////////////////////////////
// Load dependencies /////////////////////////////////////////////////////////////////////////////// $this->lang->load('web_proxy'); $this->lang->load('network'); /////////////////////////////////////////////////////////////////////////////// // Form handler /////////////////////////////////////////////////////////////////////////////// if ($form_type === 'view') { $read_only = TRUE; $form_path = '/web_proxy/exceptions/view'; $buttons = array(form_submit_add('submit'), anchor_cancel('/app/web_proxy/exceptions')); } else { if ($form_type === 'add') { $read_only = FALSE; $form_path = '/web_proxy/exceptions/add'; $buttons = array(form_submit_add('submit'), anchor_cancel('/app/web_proxy/exceptions/')); } else { $read_only = FALSE; $form_path = '/web_proxy/exceptions/edit'; $buttons = array(form_submit_update('submit'), anchor_cancel('/app/web_proxy/exceptions/'), anchor_delete('/app/web_proxy/exceptions/delete/' . $interface)); } } /////////////////////////////////////////////////////////////////////////////// // Form /////////////////////////////////////////////////////////////////////////////// echo form_open($form_path); echo form_header(lang('web_proxy_exception_sites')); echo field_input('site', $site, lang('web_proxy_site'), $read_only); echo field_button_set($buttons); echo form_footer(); echo form_close();
$this->lang->load('base'); $this->lang->load('apcups'); if (isset($error)) { echo infobox_warning(lang('base_warning'), $error, array('id' => 'connection_error')); } /////////////////////////////////////////////////////////////////////////////// // Form open /////////////////////////////////////////////////////////////////////////////// echo form_open('apcups/settings/edit'); echo form_header(lang('base_summary')); /////////////////////////////////////////////////////////////////////////////// // Form fields and buttons /////////////////////////////////////////////////////////////////////////////// if ($mode === 'edit') { $read_only = FALSE; $buttons = array(form_submit_update('submit', 'important', array('id' => 'submit_update')), anchor_cancel('/app/apcups')); } else { $read_only = TRUE; // Only display edit button if connected to UPS if ($is_found) { $buttons = array(anchor_edit('/app/apcups/settings/edit')); } } echo field_input('model', $model, lang('apcups_model'), TRUE); echo field_input('status', $status, lang('apcups_status'), TRUE); echo field_input('load_percent', $loadpct, lang('apcups_load_percent'), TRUE); echo field_input('battery_charge', $bcharge, lang('apcups_battery_charge'), TRUE); echo field_input('battery_time_remaining', $timeleft, lang('apcups_battery_time_remaining'), TRUE); echo field_input('battery_age', $battage, lang('apcups_battery_age'), TRUE); echo field_dropdown('powerdown', $powerdown_options, $mbattchg, lang('apcups_powerdown'), $read_only); echo field_input('control_email', $control_email, lang('apcups_admin_email_address'), $read_only);