seeddms-code/views/bootstrap/class.PasswordForgotten.php

111 lines
2.9 KiB
PHP
Raw Permalink Normal View History

2012-12-14 07:53:13 +00:00
<?php
/**
* Implementation of PasswordForgotten view
*
* @category DMS
* @package SeedDMS
2012-12-14 07:53:13 +00:00
* @license GPL 2
* @version @version@
* @author Uwe Steinmann <uwe@steinmann.cx>
* @copyright Copyright (C) 2002-2005 Markus Westphal,
* 2006-2008 Malcolm Cowe, 2010 Matteo Lucarelli,
* 2010-2012 Uwe Steinmann
* @version Release: @package_version@
*/
/**
* Include parent class
*/
//require_once("class.Bootstrap.php");
2012-12-14 07:53:13 +00:00
/**
* Class which outputs the html page for PasswordForgotten view
*
* @category DMS
* @package SeedDMS
2012-12-14 07:53:13 +00:00
* @author Markus Westphal, Malcolm Cowe, Uwe Steinmann <uwe@steinmann.cx>
* @copyright Copyright (C) 2002-2005 Markus Westphal,
* 2006-2008 Malcolm Cowe, 2010 Matteo Lucarelli,
* 2010-2012 Uwe Steinmann
* @version Release: @package_version@
*/
class SeedDMS_View_PasswordForgotten extends SeedDMS_Theme_Style {
2012-12-14 07:53:13 +00:00
function js() { /* {{{ */
header('Content-Type: application/javascript; charset=UTF-8');
2021-05-27 19:57:12 +00:00
parent::jsTranslations(array('js_form_error', 'js_form_errors'));
?>
$(document).ready(function() {
2021-05-27 19:57:12 +00:00
$("#form1").validate({
rules: {
email: {
email: true
}
},
messages: {
login: "<?php printMLText("js_no_login");?>",
email: "<?php printMLText("js_no_email");?>"
},
});
});
document.form1.email.focus();
<?php
} /* }}} */
2012-12-14 07:53:13 +00:00
function show() { /* {{{ */
$referrer = $this->params['referrer'];
2021-05-27 19:57:12 +00:00
$this->htmlAddHeader('<script type="text/javascript" src="../views/'.$this->theme.'/vendors/jquery-validation/jquery.validate.js"></script>'."\n", 'js');
$this->htmlAddHeader('<script type="text/javascript" src="../views/'.$this->theme.'/styles/validation-default.js"></script>'."\n", 'js');
2014-10-31 12:03:20 +00:00
$this->htmlStartPage(getMLText("password_forgotten"), "passwordforgotten");
2012-12-14 07:53:13 +00:00
$this->globalBanner();
$this->contentStart();
2023-05-22 14:21:31 +00:00
echo "<div id=\"login_wrapper\">\n";
2012-12-14 07:53:13 +00:00
$this->pageNavigation(getMLText("password_forgotten"));
?>
2017-01-01 18:21:22 +00:00
<form class="form-horizontal" action="../op/op.PasswordForgotten.php" method="post" id="form1" name="form1">
2012-12-14 07:53:13 +00:00
<?php
if ($referrer) {
echo "<input type='hidden' name='referuri' value='".$referrer."'/>";
}
$this->infoMsg(getMLText("password_forgotten_text"));
$this->contentContainerStart();
2018-04-23 13:50:46 +00:00
$this->formField(
getMLText("user_login"),
array(
'element'=>'input',
'type'=>'text',
'id'=>'login',
'name'=>'login',
'placeholder'=>'login',
'autocomplete'=>'off',
'required'=>true
)
2018-04-23 13:50:46 +00:00
);
$this->formField(
getMLText("email"),
array(
'element'=>'input',
'type'=>'text',
'id'=>'email',
'name'=>'email',
'placeholder'=>'email',
'autocomplete'=>'off',
'required'=>true
)
2018-04-23 13:50:46 +00:00
);
$this->contentContainerEnd();
2018-04-23 13:50:46 +00:00
$this->formSubmit(getMLText('submit_password_forgotten'));
?>
2012-12-14 07:53:13 +00:00
</form>
<p><a href="../out/out.Login.php"><?php echo getMLText("login"); ?></a></p>
<?php
2023-05-22 14:21:31 +00:00
echo "</div>\n";
$this->contentEnd();
2012-12-14 07:53:13 +00:00
$this->htmlEndPage();
} /* }}} */
}
?>