/** * Static method that returns a login form * */ public static function loginForm($req_controller, $req_action, $request) { // Get the current action URL (use the config to obtain the base URL) // Get the utilitary objects from the registry $registry = Zend_registry::getInstance(); $zmax_context = $registry->get("zmax_context"); $module_name = $request->getModuleName(); if (!empty($module_name)) { $module = $request->getModuleName() . "/"; } else { $module = ""; } $url = $zmax_context->config->app->base_url . "/" . $module . $request->getControllerName() . "/" . $request->getActionName() . "?1=1"; // The form always refers to the current controller // and to the current action $current_action = $request->getActionName(); $form = new Zmax_HTML_Form($url); $form->champCache("zmax_req_controller", $req_controller); $form->champCache("zmax_req_action", $req_action); $form->debutTable(); $form->champTexte($zmax_context->texts->zmax->login, "zmax_login", "", 20); $form->champMotDePasse($zmax_context->texts->zmax->password, "zmax_password", "", 20); $form->champValider($zmax_context->texts->zmax->submit, "submit_login"); $form->finTable(); return $form->fin(); }