Commit 1c56e372 authored by Moises Sacal's avatar Moises Sacal
Browse files

organising columns in login

parent bb43afcf
...@@ -35,10 +35,10 @@ export class LabarchivesLoginField extends FieldBase<any> { ...@@ -35,10 +35,10 @@ export class LabarchivesLoginField extends FieldBase<any> {
this.columns = options['columns'] || []; this.columns = options['columns'] || [];
this.usernameLabel = options['usernameLabel'] || 'Username'; this.usernameLabel = options['usernameLabel'] || 'Username';
this.passwordLabel = options['passwordLabel'] || 'Password'; this.passwordLabel = options['passwordLabel'] || 'Password';
this.loginLabel = options['loginLabel'] || 'Login'; this.loginLabel = options['loginLabel'] || 'Login';
this.helpLoginLabel = options['helpLoginLabel'] || ''; this.helpLoginLabel = options['helpLoginLabel'] || '';
this.helpLoginLabelList = options['helpLoginLabelList'] || []; this.helpLoginLabelList = options['helpLoginLabelList'] || [];
this.loginHelpImageAlt = options['loginHelpImageAlt'] || 'labarchives help login'; this.loginHelpImageAlt = options['loginHelpImageAlt'] || 'labarchives help login';
this.loginHelpImage = options['loginHelpImage'] || this.loginHelpImageAlt; this.loginHelpImage = options['loginHelpImage'] || this.loginHelpImageAlt;
this.closeLabel = options['closeLabel'] || 'Close'; this.closeLabel = options['closeLabel'] || 'Close';
this.labarchivesService = this.getFromInjector(LabarchivesService); this.labarchivesService = this.getFromInjector(LabarchivesService);
...@@ -85,7 +85,7 @@ export class LabarchivesLoginField extends FieldBase<any> { ...@@ -85,7 +85,7 @@ export class LabarchivesLoginField extends FieldBase<any> {
selector: 'ws-labarchiveslogin', selector: 'ws-labarchiveslogin',
template: ` template: `
<div class="row"> <div class="row">
<div *ngIf="!field.loggedIn" class="col-md-5 col-md-offset-2"> <div *ngIf="!field.loggedIn" class="col-md-6 col-md-offset-2">
<form #form="ngForm"> <form #form="ngForm">
<div class="form-group"> <div class="form-group">
<label>{{ field.usernameLabel }}</label> <label>{{ field.usernameLabel }}</label>
...@@ -104,23 +104,30 @@ export class LabarchivesLoginField extends FieldBase<any> { ...@@ -104,23 +104,30 @@ export class LabarchivesLoginField extends FieldBase<any> {
</button> </button>
<!--or--> <!--or-->
<!--<button (click)="field.loginViaInstitution()" type="submit" [disabled]="!field.valid"--> <!--<button (click)="field.loginViaInstitution()" type="submit" [disabled]="!field.valid"-->
<!--class="btn btn-info">--> <!--class="btn btn-info">-->
<!--Login trough UTS--> <!--Login trough UTS-->
<!--</button>--> <!--</button>-->
</p> </p>
<p>{{ field.helpLoginLabel }}</p>
<ul>
<li *ngFor="let help of field.helpLoginLabelList">{{ help }}</li>
</ul>
<p>
<img alt="{{ field.loginHelpImageAlt }}" [src]="field.loginHelpImage"/>
</p>
</div> </div>
<div class="alert alert-danger" *ngIf="field.errorMessage">{{ field.errorMessage }}</div> <div class="form-row">
<div class="alert alert-danger" *ngIf="field.errorMessage">{{ field.errorMessage }}</div>
</div>
<div> <div>
<p></p> <p></p>
</div> </div>
</form> </form>
<div *ngIf="!field.loggedIn" class="col-md-12">
<div class="form-row col-md-6">
<p>{{ field.helpLoginLabel }}</p>
<ul>
<li *ngFor="let help of field.helpLoginLabelList">{{ help }}</li>
</ul>
<div class="form-row col-md-6">
<img alt="{{ field.loginHelpImageAlt }}" [src]="field.loginHelpImage"
style="padding: 4px; border: dotted 1px #ccc;"/>
</div>
</div>
</div>
</div> </div>
</div> </div>
<div id="institutionModal" class="modal fade"> <div id="institutionModal" class="modal fade">
......
...@@ -36,7 +36,7 @@ module.exports = { ...@@ -36,7 +36,7 @@ module.exports = {
loginLabel: 'Login', loginLabel: 'Login',
usernameLabel: 'UTS email address', usernameLabel: 'UTS email address',
passwordLabel: 'LabArchives Password Token for External applications', passwordLabel: 'LabArchives Password Token for External applications',
helpLoginLabel: 'To get your Lab Archives token:', helpLoginLabel: 'To get your Lab Archives password token:',
helpLoginLabelList: [ helpLoginLabelList: [
'Log in to LabArchives', 'Log in to LabArchives',
'In the top right, choose the user menu', 'In the top right, choose the user menu',
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment