63 lines
2.5 KiB
XML
63 lines
2.5 KiB
XML
<!-- $Id$ -->
|
|
|
|
<metal:login define-macro="login_form"
|
|
i18n:domain="zope"
|
|
tal:define="principal request/principal/id">
|
|
<h2>Login</h2>
|
|
<div>
|
|
<p i18n:translate=""
|
|
tal:condition="python: principal == 'zope.anybody'">
|
|
Please provide Login Information</p>
|
|
<p i18n:translate=""
|
|
tal:condition="python: principal != 'zope.anybody'">
|
|
You are not authorized to perform this action. However, you may login as a
|
|
different user who is authorized.</p>
|
|
<form method="post"
|
|
tal:define="submitted python:
|
|
principal != 'zope.anybody' and 'SUBMIT' in request">
|
|
<tal:redirect condition="submitted">
|
|
<span tal:define="dummy python:request.response.redirect(
|
|
request.get('camefrom') or request.URL[-1])" />
|
|
</tal:redirect>
|
|
<tal:form condition="not:submitted">
|
|
<div class="row">
|
|
<div class="label" i18n:translate="">User Name</div>
|
|
<div class="field">
|
|
<input type="text" name="login"/></div>
|
|
</div><br />
|
|
<div class="row">
|
|
<div class="label" i18n:translate="">Password</div>
|
|
<div class="field">
|
|
<input type="password" name="password"/></div>
|
|
</div><br />
|
|
<div class="row">
|
|
<input class="form-element" type="submit"
|
|
name="SUBMIT" value="Log in"
|
|
i18n:attributes="value login-button" /></div>
|
|
<input type="hidden" name="camefrom"
|
|
tal:attributes="value request/camefrom | nothing">
|
|
</tal:form>
|
|
</form>
|
|
</div>
|
|
</metal:login>
|
|
|
|
|
|
<metal:loggedout define-macro="loggedout"
|
|
i18n:domain="loops"
|
|
tal:define="principal request/principal/id">
|
|
<h2 i18n:translate="">Logged out</h2>
|
|
<div>
|
|
<p i18n:translate=""
|
|
tal:condition="python: principal == 'zope.anybody'">Your have been successfully logged out from this application. Please login again if needed or close this browser tab</p>
|
|
<p i18n:translate=""
|
|
tal:condition="python: principal != 'zope.anybody'">
|
|
You are not authorized to perform this action. However, you may login as a
|
|
different user who is authorized.</p>
|
|
<div class="row">
|
|
<button i18n:translate="">
|
|
<a i18n:translate=""
|
|
tal:attributes="href view/baseUrl">Log in again</a></button>
|
|
|
|
</div>
|
|
</div>
|
|
</metal:loggedout>
|