Spaces:
Running
Running
Create templates.xml
Browse files
custom_auth/views/templates.xml
ADDED
|
@@ -0,0 +1,77 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
<!-- custom_auth/views/templates.xml -->
|
| 2 |
+
<odoo>
|
| 3 |
+
<template id="signup_template" name="Custom Signup" inherit_id="website.layout">
|
| 4 |
+
<xpath expr="//div[@id='wrap']" position="inside">
|
| 5 |
+
<section class="container mt16 mb16">
|
| 6 |
+
<h2>Шинэ хэрэглэгч бүртгүүлэх</h2>
|
| 7 |
+
<t t-if="errors">
|
| 8 |
+
<div class="alert alert-danger" role="alert">
|
| 9 |
+
<ul>
|
| 10 |
+
<t t-foreach="errors" t-as="err">
|
| 11 |
+
<li><t t-esc="err"/></li>
|
| 12 |
+
</t>
|
| 13 |
+
</ul>
|
| 14 |
+
</div>
|
| 15 |
+
</t>
|
| 16 |
+
|
| 17 |
+
<form action="/custom/signup/submit" method="post">
|
| 18 |
+
<div class="form-group">
|
| 19 |
+
<label>Нэр</label>
|
| 20 |
+
<input type="text" name="name" class="form-control" t-att-value="values.get('name', '') if values else ''"/>
|
| 21 |
+
</div>
|
| 22 |
+
<div class="form-group">
|
| 23 |
+
<label>Имэйл (login)</label>
|
| 24 |
+
<input type="email" name="login" class="form-control" t-att-value="values.get('login', '') if values else ''"/>
|
| 25 |
+
</div>
|
| 26 |
+
<div class="form-group">
|
| 27 |
+
<label>Нууц үг</label>
|
| 28 |
+
<input type="password" name="password" class="form-control"/>
|
| 29 |
+
</div>
|
| 30 |
+
<div class="form-group">
|
| 31 |
+
<label>Нууц үг давтан</label>
|
| 32 |
+
<input type="password" name="confirm_password" class="form-control"/>
|
| 33 |
+
</div>
|
| 34 |
+
<button type="submit" class="btn btn-primary">Бүртгүүлэх</button>
|
| 35 |
+
</form>
|
| 36 |
+
<p class="mt8">Бүртгэлтэй бол <a href="/custom/login">нэвтрэх</a></p>
|
| 37 |
+
</section>
|
| 38 |
+
</xpath>
|
| 39 |
+
</template>
|
| 40 |
+
|
| 41 |
+
<template id="login_template" name="Custom Login" inherit_id="website.layout">
|
| 42 |
+
<xpath expr="//div[@id='wrap']" position="inside">
|
| 43 |
+
<section class="container mt16 mb16">
|
| 44 |
+
<h2>Нэвтрэх</h2>
|
| 45 |
+
<t t-if="message">
|
| 46 |
+
<div class="alert alert-success" role="alert">
|
| 47 |
+
<t t-esc="message"/>
|
| 48 |
+
</div>
|
| 49 |
+
</t>
|
| 50 |
+
<t t-if="errors">
|
| 51 |
+
<div class="alert alert-danger" role="alert">
|
| 52 |
+
<ul>
|
| 53 |
+
<t t-foreach="errors" t-as="err">
|
| 54 |
+
<li><t t-esc="err"/></li>
|
| 55 |
+
</t>
|
| 56 |
+
</ul>
|
| 57 |
+
</div>
|
| 58 |
+
</t>
|
| 59 |
+
|
| 60 |
+
<form action="/custom/login/submit" method="post">
|
| 61 |
+
<div class="form-group">
|
| 62 |
+
<label>Имэйл</label>
|
| 63 |
+
<input type="email" name="login" class="form-control" t-att-value="values.get('login', '') if values else ''"/>
|
| 64 |
+
</div>
|
| 65 |
+
<div class="form-group">
|
| 66 |
+
<label>Нууц үг</label>
|
| 67 |
+
<input type="password" name="password" class="form-control"/>
|
| 68 |
+
</div>
|
| 69 |
+
<input type="hidden" name="redirect" t-att-value="request.params.get('redirect','/')"/>
|
| 70 |
+
<button type="submit" class="btn btn-primary">Нэвтрэх</button>
|
| 71 |
+
</form>
|
| 72 |
+
|
| 73 |
+
<p class="mt8">Шинэ хэрэглэгч бол <a href="/custom/signup">бүртгүүлэх</a></p>
|
| 74 |
+
</section>
|
| 75 |
+
</xpath>
|
| 76 |
+
</template>
|
| 77 |
+
</odoo>
|