Jump to content

how to add a checkbox field to backoffice login form from a module


Virgy

Recommended Posts

I working on a module and I need to add a checkbox field in the backoffice login form without adding code manually to  themes/default/template/controllers/login/content.tpl  I need to do it from my module code.

 

I didn't find a hook that lets my module add the checkbox field in the login form code and it's not possible for my module to override files from backoffice theme :S

 

Any help?

 

Thank you!

Link to comment
Share on other sites

You can overide initContent() function in AdminLoginController.php to change template

 

class AdminLoginController extends AdminLoginControllerCore
{
    public function initContent()
    {
        $this->override_folder = '';
        $this->template= '../../../../modules/[yourmodule]/views/templates/admin/content.tpl';
        return parent::initContent();
    }
}
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...