plugin.php 1.4 KB

123456789101112131415161718192021222324252627282930313233343536
  1. <?php
  2. /**
  3. * This script is a configuration file for the date plugin. You can use it as a master for other platform plugins (course plugins are slightly different).
  4. * These settings will be used in the administration interface for plugins (Chamilo configuration settings->Plugins).
  5. *
  6. * @package chamilo.plugin
  7. *
  8. * @author Julio Montoya <gugli100@gmail.com>
  9. */
  10. /**
  11. * Plugin details (must be present).
  12. */
  13. //the plugin title
  14. $plugin_info['title'] = 'Hide/Unhide the Login/Password default form';
  15. //the comments that go with the plugin
  16. $plugin_info['comment'] = "If you use another way of authentication than local, you may want to hide the Login/Password default Form to avoid users mistakes. This plugin replace the Login/Password form with a text that unhide the Login/Password form if you click on it.";
  17. //the plugin version
  18. $plugin_info['version'] = '1.0';
  19. //the plugin author
  20. $plugin_info['author'] = 'Hubert Borderiou';
  21. //the plugin configuration
  22. $form = new FormValidator('add_cas_button_form');
  23. $form->addElement('text', 'label', 'Text label', '');
  24. //get default value
  25. $tab_default_formLogin_hide_unhide_label = api_get_setting('formLogin_hide_unhide_label');
  26. $defaults = [];
  27. $defaults['label'] = $tab_default_formLogin_hide_unhide_label['formLogin_hide_unhide'];
  28. $form->setDefaults($defaults);
  29. //display form
  30. $plugin_info['settings_form'] = $form;
  31. //set the templates that are going to be used
  32. $plugin_info['templates'] = ['template.tpl'];