account-settings-modal.component.html 3.58 KB
Newer Older
Steven Zou's avatar
Steven Zou committed
1 2
<clr-modal [(clrModalOpen)]="opened" [clrModalStaticBackdrop]="staticBackdrop">
    <h3 class="modal-title">{{'PROFILE.TITLE' | translate}}</h3>
kunw's avatar
kunw committed
3
    <div class="modal-body" style="overflow-y: hidden;">
4 5 6
        <form #accountSettingsFrom="ngForm" class="form">
            <section class="form-block">
                <div class="form-group">
Steven Zou's avatar
Steven Zou committed
7 8
                    <label for="account_settings_username" class="col-md-4">{{'PROFILE.USER_NAME' | translate}}</label>
                    <input type="text" name="account_settings_username" [(ngModel)]="account.username" disabled id="account_settings_username" size="31">
9 10
                </div>
                <div class="form-group">
Steven Zou's avatar
Steven Zou committed
11 12
                    <label for="account_settings_email" class="col-md-4 required">{{'PROFILE.EMAIL' | translate}}</label>
                    <label for="account_settings_email" aria-haspopup="true" role="tooltip" class="tooltip tooltip-validation tooltip-md tooltip-top-left" [class.invalid]="eamilInput.invalid && (eamilInput.dirty || eamilInput.touched)">
13 14
                      <input name="account_settings_email" type="text" #eamilInput="ngModel" [(ngModel)]="account.email" 
                      required 
Steven Zou's avatar
Steven Zou committed
15
                      pattern='^[a-zA-Z0-9.!#$%&’*+/=?^_`{|}~-]+@[a-zA-Z0-9-]+(?:\.[a-zA-Z0-9-]+)*$' id="account_settings_email" size="28">
16
                      <span class="tooltip-content">
Steven Zou's avatar
Steven Zou committed
17
                          {{'TOOLTIP.EMAIL' | translate}}
18 19 20 21
                      </span>
                    </label>
                </div>
                <div class="form-group">
Steven Zou's avatar
Steven Zou committed
22 23 24
                    <label for="account_settings_full_name" class="col-md-4 required">{{'PROFILE.FULL_NAME' | translate}}</label>
                    <label for="account_settings_full_name" aria-haspopup="true" role="tooltip" class="tooltip tooltip-validation tooltip-md tooltip-top-left" [class.invalid]="fullNameInput.invalid && (fullNameInput.dirty || fullNameInput.touched)">
                      <input type="text" name="account_settings_full_name" #fullNameInput="ngModel" [(ngModel)]="account.realname" required maxLengthExt="20" id="account_settings_full_name" size="28">
25
                      <span class="tooltip-content">
Steven Zou's avatar
Steven Zou committed
26
                          {{'TOOLTIP.FULL_NAME' | translate}}
27 28 29 30
                      </span>
                    </label>
                </div>
                <div class="form-group">
Steven Zou's avatar
Steven Zou committed
31 32 33
                    <label for="account_settings_comments" class="col-md-4">{{'PROFILE.COMMENT' | translate}}</label>
                    <label for="account_settings_comments" aria-haspopup="true" role="tooltip" class="tooltip tooltip-validation tooltip-md tooltip-top-left" [class.invalid]="commentInput.invalid && (commentInput.dirty || commentInput.touched)">
                    <input type="text" #commentInput="ngModel" maxLengthExt="20" name="account_settings_comments" [(ngModel)]="account.comment" id="account_settings_comments" size="28">
kunw's avatar
kunw committed
34
                    <span class="tooltip-content">
Steven Zou's avatar
Steven Zou committed
35
                        {{'TOOLTIP.COMMENT' | translate}}
kunw's avatar
kunw committed
36 37
                    </span>
                    </label>
38 39 40
                </div>
            </section>
        </form>
Steven Zou's avatar
Steven Zou committed
41
        <inline-alert (confirmEvt)="confirmCancel($event)"></inline-alert>
42 43 44
    </div>
    <div class="modal-footer">
        <span class="spinner spinner-inline" style="top:8px;" [hidden]="showProgress === false"></span>
Steven Zou's avatar
Steven Zou committed
45 46
        <button type="button" class="btn btn-outline" (click)="close()">{{'BUTTON.CANCEL' | translate}}</button>
        <button type="button" class="btn btn-primary" [disabled]="!isValid || showProgress" (click)="submit()">{{'BUTTON.OK' | translate}}</button>
47 48
    </div>
</clr-modal>