maestrano/mno-enterprise-angular

View on GitHub
src/app/components/dashboard-company-selectbox/modals/create-company.html

Summary

Maintainability
Test Coverage
<div class="modal-header">
  <div class="close" type="button" ng-click="modal.cancel()" >×</div>
  <h3 translate>mno_enterprise.templates.dashboard.create_company.title</h3>
</div>

<form name="form" novalidate>
  <div class="modal-body">
    <div class="row">
      <div class="col-sm-12">
        <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>
      </div>
    </div>

    <div class="row">
      <div class="col-sm-6 col-sm-offset-3 text-center">
        <p translate>mno_enterprise.templates.dashboard.create_company.enter_name</p>
        <input type="text" class="form-control" name="name" ng-model="modal.model.name" required>
      </div>
    </div>
  </div>

  <div class="modal-footer">
    <div class="row">
      <div class="col-sm-12">
        <button class="btn btn-default" ng-click="modal.cancel()" ng-show="!modal.isLoading">{{'mno_enterprise.templates.dashboard.create_company.cancel' | translate}}</button>
        <button class='btn btn-info' ng-click="modal.proceed()" ng-disabled="modal.isLoading || form.$invalid">
          <span ng-show="modal.isLoading"><i class="fa fa-spinner fa-pulse fa-fw"></i></span>
          {{'mno_enterprise.templates.dashboard.create_company.create' | translate}}
        </button>
      </div>
    </div>
  </div>
</form>