maestrano/mno-enterprise-angular

View on GitHub
src/app/views/apps/modals/app-deletion-modal.html

Summary

Maintainability
Test Coverage
<div class="app-deletion-modal">
  <div class="modal-header">
    <button type="button" class="close" aria-label="Close" ng-click="modalOptions.close()"><span aria-hidden="true">&times;</span></button>
    <h4 class="modal-title">{{ 'mno_enterprise.templates.dashboard.app_deletion.title' | translate }}</h4>
  </div>
  <div class="modal-body">
    <div class="alert alert-error" ng-show="modal.errors">
      <button class="close" ng-click="modal.errors=''">×</button>
      <ul>
        <li ng-repeat="error in modal.errors">{{error}}</li>
      </ul>
    </div>
    <p class="text-center"><small>{{ 'mno_enterprise.templates.dashboard.app_deletion.instructions' | translate }}</small></p>
    <p class="text-error text-center deletion-sentence">{{modal.sentence}}</p>
    <div class="row">
      <div class="col-md-8 col-md-offset-2">
        <input type="text" ng-model="sentenceCheck" class='form-control text-center' required>
      </div>
    </div>
  </div>
  <div class="modal-footer">
    <button type="button" class="btn btn-default" ng-show="!modal.loading" ng-click="modal.cancel()">
      {{ 'mno_enterprise.templates.dashboard.app_deletion.cancel' | translate }}
    </button>
    <button type="button" class="btn btn-danger" ng-disabled="(modal.sentence != sentenceCheck) || modal.loading" ng-click="modal.deleteApp()">
      <span ng-show="modal.loading"><i class="fa fa-spinner fa-pulse"></i>&nbsp;</span>
      {{ 'mno_enterprise.templates.dashboard.app_deletion.delete' | translate }}
    </button>
  </div>
</div>