diff options
author | ArthurHoaro <arthur@hoa.ro> | 2016-10-14 15:13:38 +0200 |
---|---|---|
committer | ArthurHoaro <arthur@hoa.ro> | 2016-10-14 15:13:38 +0200 |
commit | 4103962931b031490fccbaf95ff2b052a82037c7 (patch) | |
tree | 150d12d60b7af968886e469c1ca0c0ca1e16c377 /tpl | |
parent | 8b6f0b50e33d31093d5b3f2a9394caf25514a91b (diff) | |
download | Shaarli-4103962931b031490fccbaf95ff2b052a82037c7.tar.gz Shaarli-4103962931b031490fccbaf95ff2b052a82037c7.tar.zst Shaarli-4103962931b031490fccbaf95ff2b052a82037c7.zip |
Change password and manage tags template
Diffstat (limited to 'tpl')
-rw-r--r-- | tpl/default/addlink.html | 5 | ||||
-rw-r--r-- | tpl/default/changepassword.html | 29 | ||||
-rw-r--r-- | tpl/default/changetag.html | 40 | ||||
-rw-r--r-- | tpl/default/css/shaarli.css | 2 | ||||
-rw-r--r-- | tpl/default/js/shaarli.js | 31 |
5 files changed, 93 insertions, 14 deletions
diff --git a/tpl/default/addlink.html b/tpl/default/addlink.html index bc328daa..05207551 100644 --- a/tpl/default/addlink.html +++ b/tpl/default/addlink.html | |||
@@ -9,7 +9,7 @@ | |||
9 | <div class="pure-u-lg-1-3 pure-u-1-8"></div> | 9 | <div class="pure-u-lg-1-3 pure-u-1-8"></div> |
10 | <div id="addlink-form" class="page-form pure-u-lg-1-3 pure-u-3-4"> | 10 | <div id="addlink-form" class="page-form pure-u-lg-1-3 pure-u-3-4"> |
11 | <h2>{"Shaare a new link"|t}</h2> | 11 | <h2>{"Shaare a new link"|t}</h2> |
12 | <form method="GET" action="" name="addform" class="addform page-form page-form-light"> | 12 | <form method="GET" action="" name="addform" class="addform page-form page-form-light autofocus"> |
13 | <div> | 13 | <div> |
14 | <input type="text" name="post" placeholder="{'URL or leave empty to post a note'|t}"> | 14 | <input type="text" name="post" placeholder="{'URL or leave empty to post a note'|t}"> |
15 | </div> | 15 | </div> |
@@ -20,8 +20,5 @@ | |||
20 | </div> | 20 | </div> |
21 | </div> | 21 | </div> |
22 | {include="page.footer"} | 22 | {include="page.footer"} |
23 | <script> | ||
24 | document.getElementsByName('post')[0].focus(); | ||
25 | </script> | ||
26 | </body> | 23 | </body> |
27 | </html> | 24 | </html> |
diff --git a/tpl/default/changepassword.html b/tpl/default/changepassword.html new file mode 100644 index 00000000..69191fad --- /dev/null +++ b/tpl/default/changepassword.html | |||
@@ -0,0 +1,29 @@ | |||
1 | <!DOCTYPE html> | ||
2 | <html> | ||
3 | <head> | ||
4 | {include="includes"} | ||
5 | </head> | ||
6 | <body> | ||
7 | {include="page.header"} | ||
8 | <div class="pure-g"> | ||
9 | <div class="pure-u-lg-1-3 pure-u-1-8"></div> | ||
10 | <div id="addlink-form" class="page-form pure-u-lg-1-3 pure-u-3-4"> | ||
11 | <h2>{"Change password"|t}</h2> | ||
12 | <form method="POST" action="" name="changepasswordform" id="changepasswordform" | ||
13 | class="addform page-form page-form-light"> | ||
14 | <div> | ||
15 | <input type="password" name="oldpassword" placeholder="{'Current password'|t}" class="autofocus"> | ||
16 | </div> | ||
17 | <div> | ||
18 | <input type="password" name="setpassword" placeholder="{'New password'|t}"> | ||
19 | </div> | ||
20 | <input type="hidden" name="token" value="{$token}"> | ||
21 | <div> | ||
22 | <input type="submit" value="{'Change'|t}"> | ||
23 | </div> | ||
24 | </form> | ||
25 | </div> | ||
26 | </div> | ||
27 | {include="page.footer"} | ||
28 | </body> | ||
29 | </html> | ||
diff --git a/tpl/default/changetag.html b/tpl/default/changetag.html new file mode 100644 index 00000000..ca2d2dba --- /dev/null +++ b/tpl/default/changetag.html | |||
@@ -0,0 +1,40 @@ | |||
1 | <!DOCTYPE html> | ||
2 | <html> | ||
3 | <head> | ||
4 | {include="includes"} | ||
5 | </head> | ||
6 | <body> | ||
7 | {include="page.header"} | ||
8 | <div class="pure-g"> | ||
9 | <div class="pure-u-lg-1-3 pure-u-1-8"></div> | ||
10 | <div id="addlink-form" class="page-form pure-u-lg-1-3 pure-u-3-4"> | ||
11 | <h2>{"Manage tags"|t}</h2> | ||
12 | <form method="POST" action="" name="changetag" id="changetag" | ||
13 | class="addform page-form page-form-light"> | ||
14 | <div> | ||
15 | <input type="text" name="fromtag" placeholder="{'Tag'|t}" | ||
16 | list="tagsList" autocomplete="off" class="awesomplete autofocus" data-minChars="1"> | ||
17 | <datalist id="tagsList"> | ||
18 | {loop="$tags"}<option>{$key}</option>{/loop} | ||
19 | </datalist> | ||
20 | </div> | ||
21 | <div> | ||
22 | <input type="text" name="totag" placeholder="{'New name'|t}" | ||
23 | list="toTagsList" autocomplete="off" class="awesomplete" data-minChars="1"> | ||
24 | <datalist id="toTagsList"> | ||
25 | {loop="$tags"}<option>{$key}</option>{/loop} | ||
26 | </datalist> | ||
27 | </div> | ||
28 | <div>{'Case sensitive'|t}</div> | ||
29 | <input type="hidden" name="token" value="{$token}"> | ||
30 | <div> | ||
31 | <input type="submit" value="{'Rename'|t}" name="renametag"> | ||
32 | <span class="pure-u-0 pure-u-lg-visible">or</span> | ||
33 | <input type="submit" value="{'Delete'|t}" name="deletetag"> | ||
34 | </div> | ||
35 | </form> | ||
36 | </div> | ||
37 | </div> | ||
38 | {include="page.footer"} | ||
39 | </body> | ||
40 | </html> | ||
diff --git a/tpl/default/css/shaarli.css b/tpl/default/css/shaarli.css index 4c9f76af..22c173b1 100644 --- a/tpl/default/css/shaarli.css +++ b/tpl/default/css/shaarli.css | |||
@@ -969,4 +969,4 @@ pre { | |||
969 | #pluginform .mobile-row, #pluginform .mobile-row td { | 969 | #pluginform .mobile-row, #pluginform .mobile-row td { |
970 | border-top-style: none; | 970 | border-top-style: none; |
971 | } | 971 | } |
972 | } \ No newline at end of file | 972 | } |
diff --git a/tpl/default/js/shaarli.js b/tpl/default/js/shaarli.js index f24aff73..e5425486 100644 --- a/tpl/default/js/shaarli.js +++ b/tpl/default/js/shaarli.js | |||
@@ -146,16 +146,29 @@ if (newVersionDismiss != null) { | |||
146 | var loginButton = document.getElementById('login-button'); | 146 | var loginButton = document.getElementById('login-button'); |
147 | var loginBlock = document.getElementById('header-login-form'); | 147 | var loginBlock = document.getElementById('header-login-form'); |
148 | 148 | ||
149 | loginButton.addEventListener('click', function(event) { | 149 | if (loginButton != null) { |
150 | event.preventDefault(); | 150 | loginButton.addEventListener('click', function(event) { |
151 | loginBlock.classList.toggle('open'); | 151 | event.preventDefault(); |
152 | document.getElementById('content').style.boxShadow = 'none'; | 152 | loginBlock.classList.toggle('open'); |
153 | }); | 153 | document.getElementById('content').style.boxShadow = 'none'; |
154 | }); | ||
155 | } | ||
154 | 156 | ||
155 | // Focus on login field. | 157 | // Focus on login field. |
156 | loginBlock.addEventListener('transitionend', function() { | 158 | if (loginBlock != null) { |
157 | loginBlock.firstElementChild.focus(); | 159 | loginBlock.addEventListener('transitionend', function () { |
158 | }); | 160 | loginBlock.firstElementChild.focus(); |
161 | }); | ||
162 | } | ||
159 | 163 | ||
160 | var hiddenReturnurl = document.getElementsByName('returnurl'); | 164 | var hiddenReturnurl = document.getElementsByName('returnurl'); |
161 | hiddenReturnurl.value = window.location.href; \ No newline at end of file | 165 | if (hiddenReturnurl != null) { |
166 | hiddenReturnurl.value = window.location.href; | ||
167 | } | ||
168 | |||
169 | |||
170 | var autofocusElements = document.querySelector('.autofocus'); | ||
171 | console.log(autofocusElements); | ||
172 | if (autofocusElements != null) { | ||
173 | autofocusElements.focus(); | ||
174 | } \ No newline at end of file | ||