Hide/show account management ui based on authentication mode

This commit is contained in:
Johannes Zellner 2016-08-11 14:44:43 +02:00
parent b9f4b286c5
commit 67fc7939df
3 changed files with 84 additions and 63 deletions

View file

@ -7,6 +7,13 @@
<hr>
{{#if ldap.enabled}}
<p>
This account is managed through LDAP.<br/>
<br/>
Associated Email Address: <a href="mailto:{{email}}">{{email}}</a>
</p>
{{else}}
<form class="form-horizontal" method="post" action="/users/account">
<input type="hidden" name="_csrf" value="{{csrfToken}}">
@ -62,3 +69,4 @@
</div>
</form>
{{/if}}

View file

@ -8,6 +8,13 @@
<hr>
{{#if ldap.enabled}}
<p>
Accounts are managed through LDAP.<br/>
<br/>
<a href="{{ldap.passwordresetlink}}">Reset Password</a>
</p>
{{else}}
<p>Please provide the username or email address that you used when you signed up for your Mailtrain account.</p>
<p>We will send you an email that will allow you to reset your password.</p>
@ -27,3 +34,4 @@
</div>
</div>
</form>
{{/if}}

View file

@ -32,7 +32,12 @@
</div>
<div class="form-group">
<div class="col-sm-offset-2 col-xs-4">
<button type="submit" class="btn btn-primary">Sign in</button> or <a href="/users/forgot">Forgot password?</a>
<button type="submit" class="btn btn-primary">Sign in</button> or
{{#if ldap.enabled}}
<a href="{{ldap.passwordresetlink}}">Forgot password?</a>
{{else}}
<a href="/users/forgot">Forgot password?</a>
{{/if}}
</div>
</div>
</form>