diff options
author | ArthurHoaro <arthur@hoa.ro> | 2020-01-26 11:41:10 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-01-26 11:41:10 +0100 |
commit | c653ae3bfb11f663a52f55817e6d02a66d0852c8 (patch) | |
tree | d5a03a3e425180f1fafb646c8ec68a4b8458d0b3 /tpl/vintage | |
parent | 1410dce2db310e71b5e683b0871c2f28d8807844 (diff) | |
parent | 27ceea2aeeed69b43fef4ebff35ec8004fcc2e45 (diff) | |
download | Shaarli-c653ae3bfb11f663a52f55817e6d02a66d0852c8.tar.gz Shaarli-c653ae3bfb11f663a52f55817e6d02a66d0852c8.tar.zst Shaarli-c653ae3bfb11f663a52f55817e6d02a66d0852c8.zip |
Render login page through Slim controller (#1401)
Render login page through Slim controller
Diffstat (limited to 'tpl/vintage')
-rw-r--r-- | tpl/vintage/error.html | 25 | ||||
-rw-r--r-- | tpl/vintage/loginform.html | 44 | ||||
-rw-r--r-- | tpl/vintage/page.header.html | 2 |
3 files changed, 45 insertions, 26 deletions
diff --git a/tpl/vintage/error.html b/tpl/vintage/error.html new file mode 100644 index 00000000..b6e62be0 --- /dev/null +++ b/tpl/vintage/error.html | |||
@@ -0,0 +1,25 @@ | |||
1 | <!DOCTYPE html> | ||
2 | <html> | ||
3 | <head> | ||
4 | {include="includes"} | ||
5 | </head> | ||
6 | <body> | ||
7 | <div id="pageheader"> | ||
8 | {include="page.header"} | ||
9 | </div> | ||
10 | <div class="error-container"> | ||
11 | <h1>Error</h1> | ||
12 | <p>{$message}</p> | ||
13 | |||
14 | {if="!empty($stacktrace)"} | ||
15 | <br> | ||
16 | <pre> | ||
17 | {$stacktrace} | ||
18 | </pre> | ||
19 | {/if} | ||
20 | |||
21 | <p>Would you mind <a href="?">clicking here</a>?</p> | ||
22 | </div> | ||
23 | {include="page.footer"} | ||
24 | </body> | ||
25 | </html> | ||
diff --git a/tpl/vintage/loginform.html b/tpl/vintage/loginform.html index 0f7d6387..a3792066 100644 --- a/tpl/vintage/loginform.html +++ b/tpl/vintage/loginform.html | |||
@@ -2,36 +2,30 @@ | |||
2 | <html> | 2 | <html> |
3 | <head>{include="includes"}</head> | 3 | <head>{include="includes"}</head> |
4 | <body | 4 | <body |
5 | {if="$user_can_login"} | 5 | {if="empty($username)"} |
6 | {if="empty($username)"} | 6 | onload="document.loginform.login.focus();" |
7 | onload="document.loginform.login.focus();" | 7 | {else} |
8 | {else} | 8 | onload="document.loginform.password.focus();" |
9 | onload="document.loginform.password.focus();" | ||
10 | {/if} | ||
11 | {/if}> | 9 | {/if}> |
12 | <div id="pageheader"> | 10 | <div id="pageheader"> |
13 | {include="page.header"} | 11 | {include="page.header"} |
14 | 12 | ||
15 | <div id="headerform"> | 13 | <div id="headerform"> |
16 | {if="!$user_can_login"} | 14 | <form method="post" name="loginform"> |
17 | You have been banned from login after too many failed attempts. Try later. | 15 | <label for="login">Login: <input type="text" id="login" name="login" tabindex="1" |
18 | {else} | 16 | {if="!empty($username)"}value="{$username}"{/if}> |
19 | <form method="post" name="loginform"> | 17 | </label> |
20 | <label for="login">Login: <input type="text" id="login" name="login" tabindex="1" | 18 | <label for="password">Password: <input type="password" id="password" name="password" tabindex="2"> |
21 | {if="!empty($username)"}value="{$username}"{/if}> | 19 | </label> |
22 | </label> | 20 | <input type="submit" value="Login" class="bigbutton" tabindex="4"> |
23 | <label for="password">Password: <input type="password" id="password" name="password" tabindex="2"> | 21 | <label for="longlastingsession"> |
24 | </label> | 22 | <input type="checkbox" name="longlastingsession" |
25 | <input type="submit" value="Login" class="bigbutton" tabindex="4"> | 23 | id="longlastingsession" tabindex="3" |
26 | <label for="longlastingsession"> | 24 | {if="$remember_user_default"}checked="checked"{/if}> |
27 | <input type="checkbox" name="longlastingsession" | 25 | Stay signed in (Do not check on public computers)</label> |
28 | id="longlastingsession" tabindex="3" | 26 | <input type="hidden" name="token" value="{$token}"> |
29 | {if="$remember_user_default"}checked="checked"{/if}> | 27 | {if="$returnurl"}<input type="hidden" name="returnurl" value="{$returnurl}">{/if} |
30 | Stay signed in (Do not check on public computers)</label> | 28 | </form> |
31 | <input type="hidden" name="token" value="{$token}"> | ||
32 | {if="$returnurl"}<input type="hidden" name="returnurl" value="{$returnurl}">{/if} | ||
33 | </form> | ||
34 | {/if} | ||
35 | </div> | 29 | </div> |
36 | </div> | 30 | </div> |
37 | 31 | ||
diff --git a/tpl/vintage/page.header.html b/tpl/vintage/page.header.html index 40c53e5b..a37926d2 100644 --- a/tpl/vintage/page.header.html +++ b/tpl/vintage/page.header.html | |||
@@ -25,7 +25,7 @@ | |||
25 | <li><a href="?do=tools">Tools</a></li> | 25 | <li><a href="?do=tools">Tools</a></li> |
26 | <li><a href="?do=addlink">Add link</a></li> | 26 | <li><a href="?do=addlink">Add link</a></li> |
27 | {else} | 27 | {else} |
28 | <li><a href="?do=login">Login</a></li> | 28 | <li><a href="/login">Login</a></li> |
29 | {/if} | 29 | {/if} |
30 | <li><a href="{$feedurl}?do=rss{$searchcrits}" class="nomobile">RSS Feed</a></li> | 30 | <li><a href="{$feedurl}?do=rss{$searchcrits}" class="nomobile">RSS Feed</a></li> |
31 | {if="$showatom"} | 31 | {if="$showatom"} |