aboutsummaryrefslogtreecommitdiffhomepage
path: root/themes
diff options
context:
space:
mode:
authorThomas Citharel <tcit@tcit.fr>2015-02-14 13:46:05 +0100
committerThomas Citharel <tcit@tcit.fr>2015-02-14 13:46:05 +0100
commit7780b8cb370625e27894636ecce555c8200b6108 (patch)
treecd074d771392bfbe84964fa54cfd30d167be663c /themes
parent31556b05d0fc64c6d183d418d2d00f0ea5a0a136 (diff)
parent952faeeb312e7461e4ca69fb236c14ee780d3fc5 (diff)
downloadwallabag-7780b8cb370625e27894636ecce555c8200b6108.tar.gz
wallabag-7780b8cb370625e27894636ecce555c8200b6108.tar.zst
wallabag-7780b8cb370625e27894636ecce555c8200b6108.zip
Merge pull request #1021 from wallabag/register
working on registration support
Diffstat (limited to 'themes')
-rw-r--r--themes/baggy/login.twig5
-rw-r--r--themes/baggy/register.twig28
-rw-r--r--themes/default/login.twig5
-rw-r--r--themes/default/register.twig20
4 files changed, 58 insertions, 0 deletions
diff --git a/themes/baggy/login.twig b/themes/baggy/login.twig
index 58290e9c..d941ca93 100644
--- a/themes/baggy/login.twig
+++ b/themes/baggy/login.twig
@@ -26,6 +26,11 @@
26 <div class="row mts txtcenter"> 26 <div class="row mts txtcenter">
27 <button class="bouton" type="submit" tabindex="4">{% trans "Sign in" %}</button> 27 <button class="bouton" type="submit" tabindex="4">{% trans "Sign in" %}</button>
28 </div> 28 </div>
29 {% if constant('ALLOW_REGISTER') == 1 %}
30 <div class="register">
31 <a href="?registerform">{% trans "Register" %}</a>
32 </div>
33 {% endif %}
29 </fieldset> 34 </fieldset>
30 <input type="hidden" name="returnurl" value="{{ referer }}"> 35 <input type="hidden" name="returnurl" value="{{ referer }}">
31 <input type="hidden" name="token" value="{{ token }}"> 36 <input type="hidden" name="token" value="{{ token }}">
diff --git a/themes/baggy/register.twig b/themes/baggy/register.twig
new file mode 100644
index 00000000..e2c56c73
--- /dev/null
+++ b/themes/baggy/register.twig
@@ -0,0 +1,28 @@
1{% extends "layout-login.twig" %}
2{% block content %}
3
4<form method="post" action="?register">
5<h2>{% trans 'Add user' %}</h2>
6 <fieldset class="w500p">
7 <div class="row">
8 <label class="col w150p" for="newusername">{% trans 'Login' %}</label>
9 <input class="col" type="text" id="newusername" name="newusername" placeholder="{% trans 'Login' %}" required>
10 </div>
11 <div class="row">
12 <label class="col w150p" for="password4newuser">{% trans "Password" %}</label>
13 <input class="col" type="password" id="password4newuser" name="password4newuser" placeholder="{% trans 'Password' %}" required>
14 </div>
15 <div class="row">
16 <label class="col w150p" for="newuseremail">{% trans 'Email (not required)' %}</label>
17 <input class="col" type="email" id="newuseremail" name="newuseremail" placeholder="{% trans 'Email' %}">
18 </div>
19 <div class="row mts txtcenter">
20 <button type="submit">{% trans "Register" %}</button>
21 </div>
22 <div class="register">
23 <a href="?">{% trans "Back" %}</a>
24 </div>
25 </fieldset>
26</form>
27
28{% endblock %} \ No newline at end of file
diff --git a/themes/default/login.twig b/themes/default/login.twig
index b9f8b497..d4f44019 100644
--- a/themes/default/login.twig
+++ b/themes/default/login.twig
@@ -31,4 +31,9 @@
31 <input type="hidden" name="token" value="{{ token }}"> 31 <input type="hidden" name="token" value="{{ token }}">
32 </form> 32 </form>
33 {% endif %} 33 {% endif %}
34 {% if constant('ALLOW_REGISTER') == 1 %}
35 <div class="registerform">
36 <a href="?register">{% trans "Register" %}</a>
37 </div>
38 {% endif %}
34{% endblock %} 39{% endblock %}
diff --git a/themes/default/register.twig b/themes/default/register.twig
new file mode 100644
index 00000000..755ae132
--- /dev/null
+++ b/themes/default/register.twig
@@ -0,0 +1,20 @@
1<h2>{% trans 'Add user' %}</h2>
2 <form method="post" action="?newuser">
3 <fieldset class="w500p">
4 <div class="row">
5 <label class="col w150p" for="newusername">{% trans 'Login' %}</label>
6 <input class="col" type="text" id="newusername" name="newusername" placeholder="{% trans 'Login' %}" required>
7 </div>
8 <div class="row">
9 <label class="col w150p" for="password4newuser">{% trans "Password" %}</label>
10 <input class="col" type="password" id="password4newuser" name="password4newuser" placeholder="{% trans 'Password' %}" required>
11 </div>
12 <div class="row">
13 <label class="col w150p" for="newuseremail">{% trans 'Email' %}</label>
14 <input class="col" type="email" id="newuseremail" name="newuseremail" placeholder="{% trans 'Email' %}">
15 </div>
16 <div class="row mts txtcenter">
17 <button type="submit">{% trans "Register" %}</button>
18 </div>
19 </fieldset>
20 </form> \ No newline at end of file