<h3 ng-if="editModalIsNew" translate>model.styles.create</h3>
<h3 ng-if="!editModalIsNew" translate>model.styles.edit</h3>

<form ng-submit="editStyle();" class="form clearfix" role="form">
  <div class="form-group col-xs-12" ng-class="{'has-error': !validForm.name}">
    <label translate>model.styles.name</label>
    <input
      type="text"
      class="form-control"
      ng-model="edit_resource.name"
      ng-trim="false"
      ng-init="validateName()"
      ng-disabled="!isNewResource"
      required
    />
    <div class="alert inlinealert alert-danger" ng-if="!validName">
      <translate>model.styles.editor.menu.noSpecialChars</translate>
    </div>
    <div class="alert inlinealert alert-danger" ng-if="!validForm.name">
      <translate>model.styles.editor.menu.already_exist</translate>
    </div>
  </div>
  <div class="form-group col-xs-12">
    <label translate>model.styles.style</label>
    <textarea class="form-control" id="style_sld"></textarea>
  </div>
  <hr />
  <div class="form-group text-right col-xs-12">
    <close-modale-button></close-modale-button>
    <button
      class="btn btn-primary"
      ng-disabled="!validForm.name || !validName"
      translate
    >
      common.save
    </button>
  </div>
</form>
