mirror of
https://github.com/Jackzmc/storage.git
synced 2025-05-06 21:23:21 +00:00
83 lines
No EOL
3.7 KiB
Handlebars
83 lines
No EOL
3.7 KiB
Handlebars
{{#> layouts/default body-class="has-background-white-ter login-bg" }}
|
|
<br><br>
|
|
<div class="container py-6" style="width:20%"> <!-- TODO: fix width on mobile -->
|
|
<h1 class="title is-1 has-text-centered">{{ meta.app_name }}</h1>
|
|
<div class="box is-radiusless">
|
|
<h4 class="title is-4 has-text-centered">Login</h4>
|
|
{{#unless (eq (len form.form_errors) 0) }}
|
|
<div class="notification is-danger is-light">
|
|
<b>Login failed with errors:</b>
|
|
<ul>
|
|
{{#each form.form_errors}}
|
|
<li>{{msg}}</li>
|
|
{{/each}}
|
|
</ul>
|
|
</div>
|
|
{{/unless}}
|
|
{{#if logged_out }}
|
|
<div class="notification is-success is-light">
|
|
You have been logged out successfully.
|
|
</div>
|
|
{{/if}}
|
|
<form method="post" action="/auth/login?return_to={{return_to}}">
|
|
<input type="hidden" name="_csrf" value="{{ csrf_token }}">
|
|
<div class="field">
|
|
<label class="label">Username / Email</label>
|
|
<div class="control has-icons-left">
|
|
<input required name="username" class="input {{#if errors.username}}is-danger{{/if}}" type="text" placeholder="Username or Email">
|
|
<span class="icon is-small is-left">
|
|
<i class="fas fa-user"></i>
|
|
</span>
|
|
</div>
|
|
{{#if errors.username }}
|
|
<p class="help is-danger">{{errors.username}}</p>
|
|
{{/if}}
|
|
</div>
|
|
<div class="field">
|
|
<label class="label">Password</label>
|
|
<div class="control has-icons-left">
|
|
<input required name="password" class="input {{#if errors.password}}is-danger{{/if}}" type="password" placeholder="hunter2">
|
|
<span class="icon is-small is-left">
|
|
<i class="fas fa-key"></i>
|
|
</span>
|
|
</div>
|
|
{{#if errors.username }}
|
|
<p class="help is-danger">{{errors.password}}</p>
|
|
{{/if}}
|
|
</div>
|
|
{{!-- TODO: Not implemented --}}
|
|
{{!-- <div class="field">
|
|
<div class="control">
|
|
<label class="checkbox">
|
|
<input name="remember_me" type="checkbox">
|
|
Remember Me</a>
|
|
</label>
|
|
</div>
|
|
</div> --}}
|
|
<hr>
|
|
<div class="buttons">
|
|
<button class="button is-link is-fullwidth" type="submit" >Login</button>
|
|
{{#if sso_enabled}}
|
|
<a href="/login/sso" class="button is-fullwidth">Login with SSO</a>
|
|
{{/if}}
|
|
</div>
|
|
</form>
|
|
<br>
|
|
<span>
|
|
{{#if can_register}}
|
|
<a href="/auth/register">Register</a>
|
|
| {{/if}}<a href="/auth/forgot-password">Forgot password?</a>
|
|
</span>
|
|
<div class="field is-pulled-right">
|
|
<div class="control">
|
|
<div class="select is-small">
|
|
<select>
|
|
<option selected value="en-us">English</option>
|
|
</select>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<p>Powered by <b><a href="{{meta.repo_url}}">{{ meta.app_name }}</a></b> v{{meta.app_version}}</p>
|
|
</div>
|
|
{{/layouts/default}} |