Jump to:

5513 Posts in 1732 Topics by 1218 members

Customising the CMS

SilverStripe Forums » Customising the CMS » Custom requirements for Login/Password recovery Form

Moderators: martimiz, Sean, biapar, Willr, Ingo, swaiba, simon_w

Page: 1
Go to End
Author Topic: 1302 Views
  • Tonyair
    Avatar
    Community Member
    81 Posts

    Custom requirements for Login/Password recovery Form Link to this post

    Hello, I managed to add custom requirements to Login form, but how can i add them to password recovery form?

    Object::useCustomClass('MemberLoginForm', 'CustomLoginForm');

    class CustomLoginForm extends MemberLoginForm {

       function custom_requirements() {
          Requirements::combine_files("comb_member_login.css",array(
                                        'themes/'.SSViewer::current_theme().'/css/member_login.css',
                                        'mysite/javascript/niceforms/niceforms.css'
                                     ));
          Requirements::combine_files('comb_forms.js',array('mysite/javascript/niceforms/niceforms.js'));
       }
       
       function __construct($controller, $name, $fields = null, $actions = null,
                                      $checkCurrentUser = true) {
          self::custom_requirements();
          parent::__construct($controller, $name, $fields = null, $actions = null,$checkCurrentUser = true);
       }

    }

    1302 Views
Page: 1
Go to Top

Want to know more about the company that brought you SilverStripe? Then check out SilverStripe.com

Comments on this website? Please give feedback.