All about user login
Not runnable at the moment
This commit is contained in:
parent
fbb8f5799e
commit
d79bbad575
49 changed files with 1554 additions and 686 deletions
|
@ -24,6 +24,7 @@
|
|||
|
||||
<script>
|
||||
window.csfrToken = '{{reactCsrfToken}}';
|
||||
window.mailtrainConfig = {{mailtrainConfig}};
|
||||
</script>
|
||||
|
||||
<script src="/mailtrain/{{reactEntryPoint}}.js"></script>
|
||||
|
@ -78,19 +79,12 @@
|
|||
<li><a href="https://mailtrain.wordpress.com/"><span class="glyphicon glyphicon-share-alt" aria-hidden="true"></span> {{#translate}}Blog{{/translate}}</a></li>
|
||||
</ul>
|
||||
|
||||
{{#if user }}
|
||||
|
||||
<ul class="nav navbar-nav navbar-right">
|
||||
{{#if admin }}
|
||||
<ul class="nav navbar-nav">
|
||||
<li class="dropdown">
|
||||
<a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-haspopup="true" aria-expanded="false">
|
||||
<span class="glyphicon glyphicon-user" aria-hidden="true"></span> {{user.username}} <span class="caret"></span>
|
||||
</a>
|
||||
<a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-haspopup="true" aria-expanded="false">Administration<span class="caret"></span></a>
|
||||
<ul class="dropdown-menu">
|
||||
<li>
|
||||
<a href="/users/account">
|
||||
<span class="glyphicon glyphicon-user" aria-hidden="true"></span> {{#translate}}Account{{/translate}}
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="/settings">
|
||||
<span class="glyphicon glyphicon-cog" aria-hidden="true"></span> {{#translate}}Settings{{/translate}}
|
||||
|
@ -102,12 +96,30 @@
|
|||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="/users/api">
|
||||
<a href="/account/api">
|
||||
<span class="glyphicon glyphicon-retweet" aria-hidden="true"></span> {{#translate}}API{{/translate}}
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
{{/if}}
|
||||
|
||||
|
||||
{{#if user }}
|
||||
<ul class="nav navbar-nav navbar-right">
|
||||
<li class="dropdown">
|
||||
<a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-haspopup="true" aria-expanded="false">
|
||||
<span class="glyphicon glyphicon-user" aria-hidden="true"></span> {{user.username}} <span class="caret"></span>
|
||||
</a>
|
||||
<ul class="dropdown-menu">
|
||||
<li>
|
||||
<a href="/users/logout">
|
||||
<a href="/account">
|
||||
<span class="glyphicon glyphicon-user" aria-hidden="true"></span> {{#translate}}Account{{/translate}}
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="/account/logout">
|
||||
<span class="glyphicon glyphicon-log-out" aria-hidden="true"></span> {{#translate}}Log out{{/translate}}
|
||||
</a>
|
||||
</li>
|
||||
|
@ -119,7 +131,7 @@
|
|||
|
||||
<ul class="nav navbar-nav navbar-right">
|
||||
<li>
|
||||
<a href="/users/login" role="button" aria-haspopup="true" aria-expanded="false">
|
||||
<a href="/account/login" role="button" aria-haspopup="true" aria-expanded="false">
|
||||
<span class="glyphicon glyphicon-log-in" aria-hidden="true"></span> {{#translate}}Sign in{{/translate}}
|
||||
</a>
|
||||
</li>
|
||||
|
|
|
@ -1,72 +0,0 @@
|
|||
<ol class="breadcrumb">
|
||||
<li><a href="/">{{#translate}}Home{{/translate}}</a></li>
|
||||
<li class="active">{{#translate}}Account{{/translate}}</li>
|
||||
</ol>
|
||||
|
||||
<h2>{{#translate}}Account{{/translate}}</h2>
|
||||
|
||||
<hr>
|
||||
|
||||
{{#if ldap.enabled}}
|
||||
<p>
|
||||
{{#translate}}This account is managed through LDAP.{{/translate}}
|
||||
<br/>
|
||||
<br/> {{#translate}}Associated Email Address{{/translate}}: <a href="mailto:{{email}}">{{email}}</a>
|
||||
</p>
|
||||
{{else}}
|
||||
<form class="form-horizontal" method="post" action="/users/account">
|
||||
|
||||
<input type="hidden" name="_csrf" value="{{csrfToken}}">
|
||||
|
||||
<fieldset>
|
||||
<legend>
|
||||
{{#translate}}General Settings{{/translate}}
|
||||
</legend>
|
||||
|
||||
<div class="form-group">
|
||||
<label for="email" class="col-sm-2 control-label">{{#translate}}Email Address{{/translate}}</label>
|
||||
<div class="col-sm-10">
|
||||
<input type="email" class="form-control" name="email" id="email" value="{{email}}" placeholder="{{#translate}}Your e-mail address{{/translate}}" required>
|
||||
<span class="help-block">{{#translate}}This address is used for account recovery in case you loose your password{{/translate}}</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</fieldset>
|
||||
<fieldset>
|
||||
<legend>
|
||||
{{#translate}}Password change{{/translate}}
|
||||
</legend>
|
||||
|
||||
<p>
|
||||
{{#translate}}You only need to fill out this form if you want to change your current password{{/translate}}
|
||||
</p>
|
||||
|
||||
<div class="form-group">
|
||||
<label for="currentPassword" class="col-sm-2 control-label">{{#translate}}Current Password{{/translate}}</label>
|
||||
<div class="col-sm-10">
|
||||
<input type="password" class="form-control" name="currentPassword" id="currentPassword" placeholder="{{#translate}}Current Password{{/translate}}">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="password" class="col-sm-2 control-label">{{#translate}}New Password{{/translate}}</label>
|
||||
<div class="col-sm-10">
|
||||
<input type="password" class="form-control" name="password" id="password" placeholder="{{#translate}}New Password{{/translate}}">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="password2" class="col-sm-2 control-label">{{#translate}}Confirm Password{{/translate}}</label>
|
||||
<div class="col-sm-10">
|
||||
<input type="password" class="form-control" name="password2" id="password2" placeholder="{{#translate}}Confirm New Password{{/translate}}">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</fieldset>
|
||||
|
||||
<div class="form-group">
|
||||
<div class="col-sm-offset-2 col-sm-10">
|
||||
<button type="submit" class="btn btn-primary"><i class="glyphicon glyphicon-ok"></i> {{#translate}}Update{{/translate}}</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</form>
|
||||
{{/if}}
|
Loading…
Add table
Add a link
Reference in a new issue