initial upload
This commit is contained in:
92
monaem/templates/default/login.pt
Normal file
92
monaem/templates/default/login.pt
Normal file
@@ -0,0 +1,92 @@
|
||||
<metal:block use-macro="main_template">
|
||||
<div metal:fill-slot="content">
|
||||
|
||||
<div class="container">
|
||||
<div id="bg" style="background:url('https://monespace.marietton.com/static/img/image-login.jpg');
|
||||
background-repeat:no-repeat;background-size:cover;background-position:center;"></div>
|
||||
<div class="col-md-offset-3 col-md-6 well">
|
||||
|
||||
<div style="font-size:26px; color: #2a6496;" align="center">
|
||||
Mon espace
|
||||
</div>
|
||||
<div style="margin: 0em 0em 2em 0em; " align="center">
|
||||
<a href="https://www.marietton.com/" target="_blank">
|
||||
<img src="${request.static_url('monaem:static/img/logo.png')}" />
|
||||
</a>
|
||||
</div>
|
||||
<div>
|
||||
<p class="text-warning" tal:content="message" />
|
||||
</div>
|
||||
|
||||
<form id="login-form" role="form" action="${url}" method="post">
|
||||
|
||||
<input type="hidden" name="came_from" value="${came_from}"/>
|
||||
|
||||
<div class="form-group">
|
||||
<label class="control-label">Mon code élève</label>
|
||||
<input class="form-control" name="login" value="${login}" placeholder="Code élève à 6 chiffres" type="text" />
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<!-- label class="control-label" for="password">Mot de passe</label -->
|
||||
<input class="form-control" type="password" id="password" name="password" value="${password}" placeholder="Mot de passe" />
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<button id="submitButton" class="btn btn-primary" type="submit" name="form.submitted">Se connecter</button>
|
||||
</div>
|
||||
|
||||
<p class="help-block">
|
||||
<a href="${request.route_url('email_password')}">Mot de passe oublié ?</a><br />
|
||||
<a href="${request.route_url('email_code')}">Code élève oublié ?</a><br />
|
||||
</p>
|
||||
</form>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
</div><!-- container -->
|
||||
|
||||
<script>
|
||||
$(document).ready(function() {
|
||||
$('#login-form').formValidation({
|
||||
framework: 'bootstrap',
|
||||
message: 'This value is not valid',
|
||||
icon: {
|
||||
valid: 'glyphicon glyphicon-ok',
|
||||
invalid: 'glyphicon glyphicon-remove',
|
||||
validating: 'glyphicon glyphicon-refresh'
|
||||
},
|
||||
fields: {
|
||||
login: {
|
||||
validators: {
|
||||
notEmpty: {
|
||||
message: 'Le code élève est obligatoire'
|
||||
},
|
||||
digits: {
|
||||
message: 'Le code élève est un nombre à 6 chiffres'
|
||||
},
|
||||
}
|
||||
},
|
||||
password: {
|
||||
validators: {
|
||||
notEmpty: {
|
||||
message: 'Le mot de passe est obligatoire'
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
$('form input').on('keypress', function(e) {
|
||||
var code = e.keyCode || e.which;
|
||||
if (code === 13) {
|
||||
e.preventDefault();
|
||||
// simuler clic bouton submit
|
||||
document.getElementById("submitButton").click();
|
||||
}
|
||||
});
|
||||
});
|
||||
</script>
|
||||
|
||||
</div>
|
||||
</metal:block>
|
||||
Reference in New Issue
Block a user