Skip to main content

This site requires you to update your browser. Your browsing experience maybe affected by not having the most up to date version.

Customising the CMS /

Custom requirements for Login/Password recovery Form


Go to End
Reply


1433 Views

Avatar
Tonyair

Community Member, 81 Posts

3 October 2010 at 6:50am

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);
	}

}