account-settings-modal.component.html 4.77 KB
Newer Older
Steven Zou's avatar
Steven Zou committed
1
<clr-modal [(clrModalOpen)]="opened" [clrModalStaticBackdrop]="staticBackdrop" [clrModalClosable]="false">
Steven Zou's avatar
Steven Zou committed
2
    <h3 class="modal-title">{{'PROFILE.TITLE' | translate}}</h3>
Deng, Qian's avatar
Deng, Qian committed
3
    <inline-alert class="modal-title" (confirmEvt)="confirmYes($event)" (closeEvt)="confirmNo($event)"></inline-alert>
FangyuanCheng's avatar
FangyuanCheng committed
4
    <div class="modal-body body-format">
5 6
        <form #accountSettingsFrom="ngForm" class="form">
            <section class="form-block">
7
                <div class="form-group form-group-override">
8
                    <label for="account_settings_username" aria-haspopup="true" class="form-group-label-override">{{'PROFILE.USER_NAME' | translate}}</label>
9
                    <input type="text" name="account_settings_username" [(ngModel)]="account.username" disabled id="account_settings_username" size="33">
Deng, Qian's avatar
Deng, Qian committed
10 11 12
                    <div  *ngIf="canRename" class="rename-tool">
                        <button  [disabled]="RenameOnGoing" (click)="onRename()" class="btn btn-outline btn-sm">
                            {{'PROFILE.ADMIN_RENAME_BUTTON' | translate}}
13
                        </button>
Deng, Qian's avatar
Deng, Qian committed
14 15 16 17 18 19 20
                        <clr-tooltip>
                            <clr-icon clrTooltipTrigger shape="info-circle" size="24"></clr-icon>
                            <clr-tooltip-content clrPosition="bottom-left" clrSize="md" *clrIfOpen>
                                <span> {{'PROFILE.ADMIN_RENAME_TIP' | translate}}</span>
                            </clr-tooltip-content>
                        </clr-tooltip>
                    </div>
21
                </div>
22 23 24
                <div class="form-group form-group-override">
                    <label for="account_settings_email" class="required form-group-label-override">{{'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]='!getValidationState("account_settings_email")'>
25 26
                      <input name="account_settings_email" type="text" #eamilInput="ngModel" [(ngModel)]="account.email" 
                      required 
27 28
                      email
                      id="account_settings_email" size="30" 
29
                      (input)='handleValidation("account_settings_email", false)' 
Steven Zou's avatar
Steven Zou committed
30
                      (blur)='handleValidation("account_settings_email", true)'>
31
                      <span class="tooltip-content">
32
                          {{emailTooltip | translate}}
33
                      </span>
34
                    </label><span class="spinner spinner-inline" [hidden]="!checkProgress"></span>
35
                </div>
36 37 38
                <div class="form-group form-group-override">
                    <label for="account_settings_full_name" class="required form-group-label-override">{{'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]='!getValidationState("account_settings_full_name")'>
Steven Zou's avatar
Steven Zou committed
39
                      <input type="text" name="account_settings_full_name" #fullNameInput="ngModel" [(ngModel)]="account.realname" required maxLengthExt="20" id="account_settings_full_name" size="30" (input)='handleValidation("account_settings_full_name", false)' (blur)='handleValidation("account_settings_full_name", true)'>
40
                      <span class="tooltip-content">
Steven Zou's avatar
Steven Zou committed
41
                          {{'TOOLTIP.FULL_NAME' | translate}}
42 43 44
                      </span>
                    </label>
                </div>
45 46
                <div class="form-group form-group-override">
                    <label for="account_settings_comments" class="form-group-label-override">{{'PROFILE.COMMENT' | translate}}</label>
Steven Zou's avatar
Steven Zou committed
47
                    <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)">
48
                    <input type="text" #commentInput="ngModel" maxLengthExt="20" name="account_settings_comments" [(ngModel)]="account.comment" id="account_settings_comments" size="30">
kunw's avatar
kunw committed
49
                    <span class="tooltip-content">
Steven Zou's avatar
Steven Zou committed
50
                        {{'TOOLTIP.COMMENT' | translate}}
kunw's avatar
kunw committed
51 52
                    </span>
                    </label>
53 54 55 56 57
                </div>
            </section>
        </form>
    </div>
    <div class="modal-footer">
FangyuanCheng's avatar
FangyuanCheng committed
58
        <span class="spinner spinner-inline loading-top" [hidden]="showProgress === false"></span>
Steven Zou's avatar
Steven Zou committed
59 60
        <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>
61 62
    </div>
</clr-modal>