1234567891011121314151617181920212223242526272829303132333435363738394041 |
- <?php
- $plugin_info['title'] = 'Add a button to logout from CAS';
- $plugin_info['comment'] = "If CAS is activated, this plugin add a text and a button on the user page to logout from a CAS session. Configure plugin to add title, comment and logo.";
- $plugin_info['version'] = '1.0';
- $plugin_info['author'] = 'Hubert Borderiou';
- $form = new FormValidator('add_cas_button_form');
- $form->addElement('text', 'cas_logout_label', 'CAS logout title', '');
- $form->addElement('text', 'cas_logout_comment', 'CAS logout description', '');
- $form->addElement('text', 'cas_logout_image_url', 'Logo URL if any (image, 50px height)');
- $form->addButtonSave(get_lang('Save'), 'submit_button');
- $tab_default_add_cas_logout_button_cas_logout_label = api_get_setting('add_cas_logout_button_cas_logout_label');
- $tab_default_add_cas_logout_button_cas_logout_comment = api_get_setting('add_cas_logout_button_cas_logout_comment');
- $tab_default_add_cas_logout_button_cas_logout_image_url = api_get_setting('add_cas_logout_button_cas_logout_image_url');
- $defaults['cas_logout_label'] = $tab_default_add_cas_logout_button_cas_logout_label['add_cas_logout_button'];
- $defaults['cas_logout_comment'] = $tab_default_add_cas_logout_button_cas_logout_comment['add_cas_logout_button'];
- $defaults['cas_logout_image_url'] = $tab_default_add_cas_logout_button_cas_logout_image_url['add_cas_logout_button'];
- $form->setDefaults($defaults);
- $plugin_info['settings_form'] = $form;
- $plugin_info['templates'] = ['template.tpl'];
|