Skip to content

Commit

Permalink
Prefill username field when login failed and adds private link count
Browse files Browse the repository at this point in the history
  • Loading branch information
Clem authored and Clem committed May 17, 2016
1 parent 8ad3942 commit 8b89b2b
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 5 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Shaarli Material Theme
Shaarli Material is a theme for [Shaarli](https://github.com/shaarli/Shaarli), the famous personal, minimalist, super-fast, no-database delicious clone.
Shaarli Material is a theme for [Shaarli](https://github.com/shaarli/Shaarli), the famous personal, minimalist, super-fast, database free, bookmarking service.


## Screenshots
Expand Down
2 changes: 1 addition & 1 deletion material/linklist.html
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@

{if="!empty($linkcount)"}
<div class="container text-center link-counter">
<em>{$linkcount} links</em>
<em>{$linkcount} links{if="!empty($privateLinkcount)"}, including {$privateLinkcount} privates{/if}</em>
</div>
{/if}

Expand Down
11 changes: 9 additions & 2 deletions material/loginform.html
Original file line number Diff line number Diff line change
@@ -1,7 +1,14 @@
<!DOCTYPE html>
<html>
<head>{include="includes"}</head>
<body{if="ban_canLogin()"} onload="document.loginform.login.focus();"{/if}>
<body
{if="ban_canLogin()"}
{if="empty($username)"}
onload="document.loginform.login.focus();"
{else}
onload="document.loginform.password.focus();"
{/if}
{/if}>
{include="page.header"}

<div id="headerform" class="page-login container">
Expand All @@ -15,7 +22,7 @@
<div class="card-body">
<div class="form-entry">
<label for="login">Username</label><br/>
<input type="text" name="login" id="login" tabindex="1" placeholder="username">
<input type="text" name="login" id="login" tabindex="1" placeholder="username" {if="!empty($username)"}value="{$username}"{/if}>
</div>
<div class="form-entry">
<label for="password">Password</label><br/>
Expand Down
2 changes: 1 addition & 1 deletion material/page.footer.html
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<div id="footer" class="container">
<div>
<b><a href="https://github.com/shaarli/Shaarli">Shaarli</a></b> - The personal, minimalist, super-fast, no-database delicious clone by the <a href="https://github.com/shaarli/Shaarli">Shaarli</a> community - <a href="doc/index.html">Help</a> - Theme by <a href="https://github.com/kalvn">kalvn</a>
<b><a href="https://github.com/shaarli/Shaarli">Shaarli</a></b> - The personal, minimalist, super-fast, database free, bookmarking service by the <a href="https://github.com/shaarli/Shaarli">Shaarli</a> community{if="isLoggedIn()"} - <a href="doc/index.html">Help</a>{/if} - Theme by <a href="https://github.com/kalvn">kalvn</a>
</div>
<div>
{loop="$plugins_footer.text"}
Expand Down

0 comments on commit 8b89b2b

Please sign in to comment.