All files / modules/alert modal-alert.html

100% Statements 1/1
100% Branches 0/0
100% Functions 0/0
100% Lines 1/1

Press n or j to go to the next uncovered block, b, p or k for the previous block.

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 592x                                                                                                                    
<ion-header>
    <ion-toolbar color="dark">
        <ion-title *ngIf="_params.header" [innerHTML]="_params.header"></ion-title>
        <ion-buttons slot="end" *ngIf="_close">
            <ion-button uppDataId="modal-alert-close-button" (click)="OnClose()">
                <ion-icon slot="icon-only" name="close-outline"></ion-icon>
            </ion-button>
        </ion-buttons>
    </ion-toolbar>
</ion-header>
<ion-content color="light">
    <p *ngIf="_params.message" [innerHTML]="_params.message"></p>
 
    <ion-list [attr.data-id]="'modal-alert-content'">
        <ng-container *ngFor="let _input of _params.inputs">
            <ion-item class="input" lines="none" *ngIf="IsText(_input)">
                <upp-modal-input [attr.data-id]="'modal-alert-input-text'" 
                    [type]="_input.type" 
                    [placeholder]="_input.placeholder" 
                    [value]="_input.value" 
                    (Changed)="OnTextChange($event, _input)"
                ></upp-modal-input>
            </ion-item>
    
            <ion-item class="check" *ngIf="IsCheck(_input)" lines="none">
                <ion-checkbox [attr.data-id]="'modal-alert-check-' + normalize(_input.label)" 
                    slot="start" 
                    [value]="_input.value" 
                    (ionChange)="OnCheckChange($event, _input)"
                ></ion-checkbox>
                <ion-label>
                    {{_input.label}}
                </ion-label>
            </ion-item>
 
            <ng-container *ngIf="_input.type === 'radiogroup'" lines="none">        
                <ion-radio-group [attr.data-id]="'modal-alert-input-radiogroup'" *ngIf="IsRadio(_input)" [(ngModel)]="_data[_input.name]">
                    <ng-container *ngFor="let _option of _params.inputs">
                        <ion-item *ngIf="_option.type === 'radiobutton' && _option.name === _input.name" lines="none">
                            <ion-label>
                                {{_option.label}}
                            </ion-label>
                            <ion-radio [attr.data-id]="'modal-alert-radio-' + normalize(_option.label)" 
                                [value]="_option.value"
                            ></ion-radio>
                        </ion-item>    
                    </ng-container>
                </ion-radio-group>
            </ng-container>    
        </ng-container>                
    </ion-list>
 
    <div class="form-buttons">
        <ng-container *ngFor="let _button of _params.buttons">
            <ion-button [attr.data-id]="'modal-alert-button-' + normalize(_button.text)" fill="clear" color="primary" (click)="_button.handler(_data)" [disabled]="_button['check'] && !_button['check'](_data)">{{_button.text}}</ion-button>
        </ng-container>
        <div style="clear:both; height:5px"></div>    
    </div>
</ion-content>