maestrano/mno-enterprise-angular

View on GitHub
src/app/views/marketplace/modals/create-comment-modal.html

Summary

Maintainability
Test Coverage
<form id="create-review-modal" name="form" novalidate>
  <div class="modal-header">
    <div class="close" type="button" ng-click="vm.modal.cancel()" >×</div>
    <h3>{{'mno_enterprise.templates.dashboard.marketplace.show.comment_title' | translate}}</h3>
  </div>
  <!-- Modal Body -->
  <div class="modal-body">
    <textarea class="form-control" rows="5" ng-trim="false" maxlength="{{vm.commentMaxLenght}}" ng-model="vm.modal.model.description" placeholder="{{ 'mno_enterprise.templates.dashboard.marketplace.show.comment_placeholder' | translate}}" id="comment"></textarea>
  </div>
  <div class="modal-footer">
    <div class="row">
      <div class="col-sm-12">
        <span>{{vm.commentMaxLenght - vm.modal.model.description.length}}</span>
        <button class="btn btn-default" ng-click="vm.modal.cancel()" ng-show="!vm.modal.isLoading">{{ 'mno_enterprise.templates.dashboard.marketplace.show.cancel' | translate}}</button>
        <button class='btn btn-info' ng-click="vm.modal.proceed()" ng-disabled="vm.modal.isLoading || form.$invalid">
          <span ng-show="vm.modal.isLoading"><i class="fa fa-spinner fa-pulse fa-fw"></i></span>
          {{ 'mno_enterprise.templates.dashboard.marketplace.show.submit' | translate}}
        </button>
      </div>
    </div>
  </div>
</form>