dac-policy-management.component.html 3.25 KB
Newer Older
Rajkumar-D's avatar
Rajkumar-D committed
1 2 3 4 5 6 7 8
<form (ngSubmit)="submitDacPolicy(f)" #f="ngForm">
    <div class="body">
        <div>
            <div class="mat-h3 mat-tittle">Register Data access policy</div>
        </div>
        <mat-divider></mat-divider>
        <div class="container">
            <mat-card>
Rajkumar-D's avatar
Rajkumar-D committed
9
                <mat-horizontal-stepper #stepper>
Rajkumar-D's avatar
Rajkumar-D committed
10 11 12 13 14
                    <mat-step label="Select an existing DAC" *ngIf="action!='Edit'">
                        <app-report (selectedRecord)="getSelectedDac($event,stepper)" [reportType]="ReportType.dacs"
                            [embDefaultSearch]="true" [embeded]="true">
                        </app-report>
                        <input type="hidden" name="dacRef" [(ngModel)]="selectedDacId" />
Rajkumar-D's avatar
Rajkumar-D committed
15 16
                    </mat-step>
                    <mat-step label="Submit policy">
Rajkumar-D's avatar
Rajkumar-D committed
17
                        <div style="width: 50%;">
Rajkumar-D's avatar
Rajkumar-D committed
18 19 20 21 22 23
                            <mat-form-field class="app-field-padding">
                                <input matInput placeholder="Short descriptive title for the policy" required
                                    [(ngModel)]="title" name="title" />
                            </mat-form-field>
                            <mat-radio-group name="group" #radioGroup="matRadioGroup">
                                <mat-radio-button [checked]="!policyUrl" value="textSelected"> Enter
Rajkumar-D's avatar
Rajkumar-D committed
24 25
                                    policy text
                                </mat-radio-button>
Rajkumar-D's avatar
Rajkumar-D committed
26 27
                                <mat-radio-button [checked]="policyUrl" value="urlSelected">Enter
                                    the
Rajkumar-D's avatar
Rajkumar-D committed
28 29 30 31
                                    URL containing
                                    your policy text
                                </mat-radio-button>
                            </mat-radio-group>
Rajkumar-D's avatar
Rajkumar-D committed
32

Rajkumar-D's avatar
Rajkumar-D committed
33 34 35
                            <mat-form-field *ngIf="radioGroup.value=='textSelected'">
                                <textarea matInput rows="3" [(ngModel)]="policyText" name="policyText"
                                    placeholder="Polict text" required></textarea>
Rajkumar-D's avatar
Rajkumar-D committed
36
                            </mat-form-field>
Rajkumar-D's avatar
Rajkumar-D committed
37 38 39
                            <mat-form-field *ngIf="radioGroup.value=='urlSelected'">
                                <input matInput [(ngModel)]="policyText" name="policyText" placeholder="Polict URL"
                                    required />
Rajkumar-D's avatar
Rajkumar-D committed
40 41
                            </mat-form-field>
                        </div>
Rajkumar-D's avatar
Rajkumar-D committed
42 43 44 45 46 47 48
                        <div style="text-align:Center">
                            <button mat-raised-button color="accent" [disabled]="f.invalid">Save</button>
                            <button *ngIf="action==='Edit'" mat-raised-button style="margin-left: 5px;"
                                [routerLink]="['/report',ReportType.policies,{defaultSearch: true}]">Cancel</button>
                            <button *ngIf="action!='Edit'" mat-raised-button style="margin-left: 5px;"
                                routerLink="">Cancel</button>
                        </div>
Rajkumar-D's avatar
Rajkumar-D committed
49
                    </mat-step>
Rajkumar-D's avatar
Rajkumar-D committed
50

Rajkumar-D's avatar
Rajkumar-D committed
51
                </mat-horizontal-stepper>
Rajkumar-D's avatar
Rajkumar-D committed
52 53 54 55
            </mat-card>

        </div>
    </div>
Rajkumar-D's avatar
Rajkumar-D committed
56 57 58 59
    <div class="centred" *ngIf="showLoadingFlag" style="height:70px;">
        <mat-spinner [diameter]="50" [strokeWidth]="5" style="margin:0 auto;">
        </mat-spinner>
    </div>
Rajkumar-D's avatar
Rajkumar-D committed
60
</form>