fixes after merge
This commit is contained in:
parent
2f8e693b0f
commit
002aa5008f
|
@ -1,122 +1,125 @@
|
||||||
<div class="parent-div">
|
<div class="parent-div">
|
||||||
|
|
||||||
|
|
||||||
<div class="col-md-8 col-sm-9 child-div-left" >
|
<div class="col-md-8 col-sm-9 child-div-left" >
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<div class="col-md-12 form-body-container" id="form-container">
|
<div class="col-md-12 form-body-container" id="form-container">
|
||||||
|
|
||||||
<form novalidate [formGroup]="form" (ngSubmit)="onSubmit()">
|
<form novalidate [formGroup]="form" (ngSubmit)="onSubmit()">
|
||||||
|
|
||||||
<div *ngFor = "let section of dataModel.sections; let i = index;">
|
<div *ngFor = "let section of dataModel.sections; let i = index;">
|
||||||
<div *ngIf="section.groupFields.length>0 else sectionHeader">
|
<div *ngIf="section.groupFields.length>0 else sectionHeader">
|
||||||
<div *ngIf="shouldIShow(section);"><h3>{{section.title}}</h3></div>
|
<div *ngIf="shouldIShow(section);"><h3>{{section.title}}</h3></div>
|
||||||
<div *ngFor="let group of section.groupFields">
|
<div *ngFor="let group of section.groupFields">
|
||||||
<div *ngIf="shouldIShow(group);" >
|
<div *ngIf="shouldIShow(group);" >
|
||||||
<df-group [group]="group" [dataModel]="dataModel" [form]="getSubForm(group.key)"></df-group>
|
<df-group [group]="group" [dataModel]="dataModel" [form]="getSubForm(group.key)"></df-group>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
<ng-template *ngIf="shouldIShow(section);" #sectionHeader>
|
<ng-template *ngIf="shouldIShow(section);" #sectionHeader>
|
||||||
<h2>{{section.title}}</h2>
|
<h2>{{section.title}}</h2>
|
||||||
</ng-template>
|
</ng-template>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div *ngFor="let field of dataModel.fields">
|
||||||
|
<div [formGroup]="form" class="form-group">
|
||||||
|
<df-field [field]="field" [form]="form" [dataModel]="dataModel" ></df-field>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<!-- <div *ngFor="let group of dataModel.groups">
|
||||||
|
<df-group [group]="group" [dataModel]="dataModel" [form]="getSubForm(group.key)"></df-group>
|
||||||
|
</div> -->
|
||||||
|
|
||||||
|
|
||||||
|
</form>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div *ngFor="let field of dataModel.fields">
|
<div class="col-md-12 form-footer-container" >
|
||||||
<div [formGroup]="form" class="form-group">
|
|
||||||
<df-field [field]="field" [form]="form" [dataModel]="dataModel" ></df-field>
|
|
||||||
|
<div>
|
||||||
|
<button type="button" class="btn btn-default btncustom" [disabled]="!form.valid || finalizeStatus" (click)="SaveFinalize();">Save</button>
|
||||||
|
<button type="button" class="btn btn-default btncustom" [disabled]="!form.valid || finalizeStatus" data-toggle="modal" data-target="#confirmModal">Finalize</button>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div *ngIf="payLoad" class="form-row">
|
||||||
|
<strong>Saved the following values</strong><br>{{payLoad}}
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<!--
|
||||||
|
<p>Form value: {{ form.value | json }}</p>
|
||||||
|
-->
|
||||||
|
|
||||||
|
|
||||||
|
<div class="text-center">
|
||||||
|
<!-- pagination -->
|
||||||
|
<ul *ngIf="pagination.pages && pagination.pages.length" class="pagination">
|
||||||
|
<li [ngClass]="{disabled:pagination.currentPage === 1}">
|
||||||
|
<a (click)="setPage(1)" class="cursor-link" >First</a>
|
||||||
|
</li>
|
||||||
|
<li [ngClass]="{disabled:pagination.currentPage === 1}">
|
||||||
|
<a (click)="setPage(pagination.currentPage - 1)" class="cursor-link">Previous</a>
|
||||||
|
</li>
|
||||||
|
<li *ngFor="let page of pagination.pages" [ngClass]="{active:pagination.currentPage === page}">
|
||||||
|
<a (click)="setPage(page)" class="cursor-link">{{page}}</a>
|
||||||
|
</li>
|
||||||
|
<li [ngClass]="{disabled:pagination.currentPage === pagination.totalPages}">
|
||||||
|
<a (click)="setPage(pagination.currentPage + 1)" class="cursor-link">Next</a>
|
||||||
|
</li>
|
||||||
|
<li [ngClass]="{disabled:pagination.currentPage === pagination.totalPages}">
|
||||||
|
<a (click)="setPage(pagination.totalPages)" class="cursor-link">Last</a>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<div class="col-md-4 col-sm-3 child-div-right" id="toc-container">
|
||||||
|
<toc [dataModel]="dataModel" (setPage)="setPage($event)"></toc>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
<!--Modal for Confirmation -->
|
||||||
|
<div class="modal fade" id="confirmModal" tabindex="-1" role="dialog" aria-labelledby="newVersionDmpModalLabel" aria-hidden="true">
|
||||||
|
<div class="modal-dialog" role="document">
|
||||||
|
<div class="modal-content">
|
||||||
|
<div class="modal-header">
|
||||||
|
<h5 class="modal-title" id="exampleModalLabel">Confirmation Message</h5>
|
||||||
|
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
|
||||||
|
<span aria-hidden="true">×</span>
|
||||||
|
</button>
|
||||||
|
</div>
|
||||||
|
<div class="modal-body">
|
||||||
|
<p>Are you sure you want to save and finalize?</p>
|
||||||
|
</div>
|
||||||
|
<div class="modal-footer">
|
||||||
|
<button type="button" class="btn btn-secondary" data-dismiss="modal">Close</button>
|
||||||
|
<button type="button" class="btn btn-primary" (click)="SaveFinalize();">Save and Finalize</button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<!-- <div *ngFor="let group of dataModel.groups">
|
|
||||||
<df-group [group]="group" [dataModel]="dataModel" [form]="getSubForm(group.key)"></df-group>
|
|
||||||
</div> -->
|
|
||||||
|
|
||||||
<!--
|
|
||||||
<p>Form value: {{ form.value | json }}</p>
|
|
||||||
-->
|
|
||||||
<div *ngIf="payLoad" class="form-row">
|
|
||||||
<strong>Saved the following values</strong><br>{{payLoad}}
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div>
|
|
||||||
<button type="submit" class="btn btn-default btncustom" [disabled]="!form.valid || finalizeStatus">Save</button>
|
|
||||||
<button type="button" class="btn btn-default btncustom" [disabled]="!form.valid || finalizeStatus" data-toggle="modal" data-target="#confirmModal">Finalize</button>
|
|
||||||
</form>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="col-md-12 form-footer-container" >
|
|
||||||
|
|
||||||
<div class="text-center">
|
|
||||||
<!-- pagination -->
|
|
||||||
<ul *ngIf="pagination.pages && pagination.pages.length" class="pagination">
|
|
||||||
<li [ngClass]="{disabled:pagination.currentPage === 1}">
|
|
||||||
<a (click)="setPage(1)" class="cursor-link" >First</a>
|
|
||||||
</li>
|
|
||||||
<li [ngClass]="{disabled:pagination.currentPage === 1}">
|
|
||||||
<a (click)="setPage(pagination.currentPage - 1)" class="cursor-link">Previous</a>
|
|
||||||
</li>
|
|
||||||
<li *ngFor="let page of pagination.pages" [ngClass]="{active:pagination.currentPage === page}">
|
|
||||||
<a (click)="setPage(page)" class="cursor-link">{{page}}</a>
|
|
||||||
</li>
|
|
||||||
<li [ngClass]="{disabled:pagination.currentPage === pagination.totalPages}">
|
|
||||||
<a (click)="setPage(pagination.currentPage + 1)" class="cursor-link">Next</a>
|
|
||||||
</li>
|
|
||||||
<li [ngClass]="{disabled:pagination.currentPage === pagination.totalPages}">
|
|
||||||
<a (click)="setPage(pagination.totalPages)" class="cursor-link">Last</a>
|
|
||||||
</li>
|
|
||||||
</ul>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="text-center">
|
|
||||||
<button type="button" class="btn btn-default btncustom" [disabled]="!form.valid" (click)="SaveFinalize();">Save</button>
|
|
||||||
<button type="button" class="btn btn-default btncustom" [disabled]="!form.valid" data-toggle="modal" data-target="#confirmModal">Finalize</button>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
</div>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
</div>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<div class="col-md-4 col-sm-3 child-div-right" id="toc-container">
|
|
||||||
<toc [dataModel]="dataModel" (setPage)="setPage($event)"></toc>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
</div>
|
|
||||||
|
|
||||||
|
|
||||||
<!--Modal for Confirmation -->
|
|
||||||
<div class="modal fade" id="confirmModal" tabindex="-1" role="dialog" aria-labelledby="newVersionDmpModalLabel" aria-hidden="true">
|
|
||||||
<div class="modal-dialog" role="document">
|
|
||||||
<div class="modal-content">
|
|
||||||
<div class="modal-header">
|
|
||||||
<h5 class="modal-title" id="exampleModalLabel">Confirmation Message</h5>
|
|
||||||
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
|
|
||||||
<span aria-hidden="true">×</span>
|
|
||||||
</button>
|
|
||||||
</div>
|
|
||||||
<div class="modal-body">
|
|
||||||
<p>Are you sure you want to save and finalize?</p>
|
|
||||||
</div>
|
|
||||||
<div class="modal-footer">
|
|
||||||
<button type="button" class="btn btn-secondary" data-dismiss="modal">Close</button>
|
|
||||||
<button type="button" class="btn btn-primary" (click)="SaveFinalize();">Save and Finalize</button>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
|
||||||
</div>
|
|
Loading…
Reference in New Issue