licensemodestysettings.component.html 9.43 KB
<!-- main-heading -->
<div class="row">
  
    <div class="col-sm-12 pageHeading" style="margin-left: 15px;">
      <h4>Manage Modesty Settings</h4>
    </div>
  
    <ng-template #templatesuccess>
      <div class="modal-header">
        <h4 class="modal-title pull-left">Confirmation</h4>
        <button type="button" class="close pull-right" aria-label="Close" (click)="modalRef.hide()">
          <span aria-hidden="true">&times;</span>
        </button>
      </div>
      <div class="modal-body" [innerHTML]="modalAlerts">
      </div>
      <div class="modal-footer">
      </div>
    </ng-template>
  
    <ng-template #templateinfo>
      <div class="modal-header">
        <h4 class="modal-title pull-left">Information</h4>
        <button type="button" class="close pull-right" aria-label="Close" (click)="modalRef.hide()">
          <span aria-hidden="true">&times;</span>
        </button>
      </div>
      <div class="modal-body" [innerHTML]="modalMessage">
      </div>
      <div class="modal-footer">
      </div>
    </ng-template>
  
    <div class="col-sm-12">
  
      <div class="container-fluid main-full">
  
        <div class="row">
          <div class="well no-margin-btm">
            <div class="row">
              <div class="col-lg-4 col-sm-6">
                <div class="row">
                  <div class="col-sm-12" *ngIf="this.globalService.UserType == 1 || this.globalService.UserType == 2">
                    <div class="form-group marginTop5">
                      <label for="Account Number" class="col-sm-6 col-lg-6 control-label text-right-lg paddTop7 padd-left0">Account Number :</label>
                    </div>
                    <div class="col-sm-6 col-lg-6 padd-left0 padd-right0" dropdown (isOpenChange)="onOpenChange($event)" (keyup)="onKeyPress($event)">
                      <button id="button-basic" dropdownToggle type="button" class="btn btn-primary dropdown-toggle col-sm-12 col-xs-12"
                              aria-controls="dropdown-basic" style="height: 30px;">
                        <span class="pull-left" style="margin-top: -1px;">{{accountDropDownText}}</span>
                        <span class="caret pull-right" style="margin-top: 6px;"></span>
                      </button>
                      <ul id="dropdown-basic" #dropdownul *dropdownMenu class="dropdown-menu" role="menu" aria-labelledby="button-basic" style="overflow: scroll; height: 200px;" (scroll)="onScroll($event)">
                        <li role="menuitem">
                          <a class="dropdown-item" href="#" (click)="AccountNumberChanged(0, 'Select')">Select</a>
                        </li>
                        <li role="menuitem" *ngFor="let item of tempLstAccountNumbers">
                          <a class="dropdown-item" href="#" (click)="AccountNumberChanged(item.m_Item1, item.m_Item2)">{{item.m_Item2}}</a>
                        </li>
                      </ul>
                    </div>
                  </div>
                  <div class="col-sm-12" *ngIf="this.globalService.UserType > 2">
                    <div class="form-group marginTop5">
                      <label for="Account Number" class="col-sm-6 col-lg-6 control-label text-right-lg paddTop7 padd-left0">Account Number :</label>
                    </div>
                    <div class="col-sm-6 col-lg-6 padd-left0 padd-right0" dropdown (isOpenChange)="onOpenChange($event)" (keyup)="onKeyPress($event)">
                      <button id="button-basic" dropdownToggle type="button" class="btn btn-primary dropdown-toggle col-sm-12 col-xs-12"
                              aria-controls="dropdown-basic" style="height: 30px;">
                        <span class="pull-left" style="margin-top: -1px;">{{accountDropDownText}}</span>
                      </button>
                    </div>
                  </div>
                </div>
              </div>
  
              <div class="col-lg-4 col-sm-8">
  
                <form class="form-inline marginTop10">
                  <div class="form-group">
                    <label class="radio-inline">
                      <input name="inlineRadioOptions" id="inlineRadio1" [value]="false" [(ngModel)]="isBuildingLevel" type="radio"> License Account
                    </label>
                  </div>
  
                  <div class="form-group">
                    <label class="radio-inline mar-left0">
                      <input name="inlineRadioOptions" id="inlineRadio2" [value]="true" [(ngModel)]="isBuildingLevel" type="radio"> Building Level Account
                    </label>
                  </div>
  
                  <button class="btn btn-primary btn-sm" type="button" (click)="ShowModestyorSites(templateinfo)" [disabled]="license.LicenseId == 0">Go <i class="fa fa-arrow-right"></i></button>
                </form>
  
              </div>
            </div>
  
          </div>
  
          <div class="col-sm-12 padd-left0 padd-right0">
            <div class="well">
              <div class="row">
                <div class="col-sm-10 col-sm-offset-1 col-md-8 col-md-offset-2 col-lg-6 col-lg-offset-3">
                  <div class="panel-body">
                    <!-- form -->
                    <form class="form-horizontal" [formGroup]="updateModestySettingsFrm" (submit)="UpdateLicenseModestySettings(templatesuccess)">
                      <div class="form-group">
                        <label for="AccountNumber" class="col-sm-5 control-label">Account Number :</label>
                        <div class="col-sm-6">
                          <input class="form-control" id="AccountNumber" type="text" formControlName="accountNumber">
                        </div>
                      </div>
                      <div class="form-group">
                        <label for="inputPassword3" class="col-sm-5 control-label">Building Level Account Name :</label>
                        <div class="col-sm-6">
                          <select class="form-control input-sm" id="SiteId" formControlName="siteId" (change)="LicenseSiteChanged($event.target.value)">
                            <option value="0">Select</option>
                            <option *ngFor="let item of lstLicenseSites" value="{{item.Id}}">
                              {{item.Title}}
                            </option>
                          </select>
                        </div>
                      </div>
                      <div class="form-group" *ngIf="lstLicenseEditionModesty!=null">
                        <label for="inputPassword3" class="col-sm-4 control-label">Modesty Settings :</label>
                        <div class="col-sm-8">
  
                          <div class="row" *ngFor="let item of this.updateModestySettingsFrm.controls['lstModesty'].value; let i = index">
                            <div class="col-sm-8">
                              <span class="help-block">{{item.m_Item3}}</span>
                            </div>
  
                            <div class="col-sm-4">
                              <label class="radio-inline">
                                <input name="{{item.m_Item3}}" [value]="true" type="radio" [(ngModel)]="item.m_Item2" [ngModelOptions]="{standalone: true}"> On
                              </label>
  
                              <label class="radio-inline">
                                <input name="{{item.m_Item3}}" [value]="false" type="radio" [(ngModel)]="item.m_Item2" [ngModelOptions]="{standalone: true}"> Off
                              </label>
                            </div>
                          </div>
  
                        </div>
                      </div>
                      <div class="row">
                        <div class="col-sm-12 marginTop20 text-center">
                          <button type="submit" class="btn btn-primary btn-sm" [disabled]="lstLicenseEditionModesty==null"><i class="fa fa-check"></i> Save</button>
  
  
                        </div>
  
                      </div>
                    </form>
                    <!-- form -->
                  </div>
  
  
  
                  <!--save-button-->
                  <div class="modal fade bs-example-modal-sm ui-draggable text-left" tabindex="-1" role="dialog" id="mymodal">
                    <div class="modal-dialog modal-sm" role="document">
                      <div class="modal-content">
                        <div class="modal-header annotation-modal-header ui-draggable-handle">
                          <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">×</span></button>
                          <h4 class="modal-title" id="">Alert</h4>
                        </div>
                        <div class="modal-body">
                          <h5>Modules has been updated successfully.</h5>
                        </div>
                        <div class="modal-footer">
                          <div class="row">
                            <div class="col-sm-12"><button class="btn btn-primary btn-sm">Ok</button></div>
                          </div>
                        </div>
  
                      </div>
                      <!-- /.modal-content -->
                    </div>
                    <!-- /.modal-dialog -->
                  </div>
                  <!-- /.modal -->
                  <!--Save-button-->
  
  
  
                </div>
              </div>
            </div>
          </div>
        </div>
      </div>
    </div>
    <!-- main-heading -->
    <!--container-->
  
  </div>
  <!-- main-heading -->