harbor/views/sign-in.htm

51 lines
2.3 KiB
HTML
Raw Normal View History

{{ if eq .HasLoggedIn true }}
<div class="has-logged-in">
<h4>// 'welcome' | tr // <strong>{{ .Username }}</strong> // 'to_harbor' | tr //</h4>
<!--p class="text-muted last-logged-in-time">Last login time: //vm.lastLoggedInTime//</p-->
<p class="control-button"><input type="button" class="btn btn-default pull-right" value="// 'continue' | tr //" ng-click="vm.doContinue()"></p>
<p class="control-button"><input type="button" class="btn btn-link pull-right" value="// 'log_out' | tr //" ng-click="vm.doLogOut()"></p>
</div>
{{ else }}
<form name="form" class="form-horizontal css-form" novalidate>
2016-05-01 19:46:50 +02:00
<div class="form-group">
<div class="col-sm-offset-1 col-sm-10">
<input id="username" type="text" class="form-control" placeholder="// 'username_email' | tr //" name="uPrincipal" ng-change="vm.reset()" ng-model="user.principal" required>
2016-05-14 07:34:54 +02:00
<div class="error-message">
<div ng-messages="form.$submitted && form.uPrincipal.$error">
2016-05-14 07:34:54 +02:00
<span ng-message="required">// 'username_is_required' | tr //</span>
</div>
</div>
2016-05-01 19:46:50 +02:00
</div>
</div>
<div class="form-group">
<div class="col-sm-offset-1 col-sm-10">
<input type="password" class="form-control" placeholder="// 'password' | tr //" name="uPassword" ng-change="vm.reset()" ng-model="user.password" required>
2016-05-14 07:34:54 +02:00
<div class="error-message">
<div ng-messages="form.$submitted && form.uPassword.$error">
2016-05-14 07:34:54 +02:00
<span ng-message="required">// 'password_is_required' | tr //</span>
</div>
<span ng-show="vm.hasError">// vm.errorMessage | tr //</span>
</div>
2016-05-01 19:46:50 +02:00
</div>
</div>
<div class="form-group">
<div class="col-sm-offset-1 col-sm-10">
<div class="pull-right">
2016-06-17 08:02:45 +02:00
<button type="submit" class="btn btn-default" ng-click="vm.doSignIn(user)">// 'sign_in' | tr //</button>
{{ if eq .AuthMode "db_auth" }}
2016-06-17 08:02:45 +02:00
<button type="button" class="btn btn-success" ng-click="vm.doSignUp()">// 'sign_up' | tr //</button>
{{ end }}
2016-05-01 19:46:50 +02:00
</div>
</div>
</div>
{{ if eq .AuthMode "db_auth" }}
2016-05-01 19:46:50 +02:00
<div class="form-group">
<div class="col-sm-offset-1 col-sm-10">
<div class="pull-right">
2016-05-13 12:48:06 +02:00
<a href="javascript:void(0)" ng-click="vm.doForgotPassword()">// 'forgot_password' | tr //</a>
2016-05-01 19:46:50 +02:00
</div>
</div>
2016-05-14 07:34:54 +02:00
</div>
{{ end }}
</form>
{{ end }}