cargos.editar.html 2.44 KB
Newer Older
1 2 3 4 5 6 7
<div>
  <div class="row">
    <div class="col-sm-5 col-md-4 col-xs-6">
      <h3>Editar Cargo</h3>
    </div>
    <div class="col-sm-5 col-md-4 col-sm-offset-2">
      <div class="pull-right">
8
        <a class="btn btn-default header-button" ui-sref="{{vm.rutaAtras}}">
9
          <i class="fa fa-arrow-left"></i>
10
          {{vm.labelAtras}}
11
        </a>
12 13 14
      </div>
    </div>
  </div>
15 16 17
  <uib-alert ng-repeat="alerta in vm.alertas" type="{{alerta.tipo}}" close="vm.alertas.splice($index,1)"
             dismiss-on-timeout="3000">{{alerta.mensaje}}
  </uib-alert>
18
  <div>
19 20 21
    <div class="container">
      <h4 class="color-primary">Cargo</h4>
      <blockquote class="col-md-12 blockquote-primary">
22 23 24 25 26 27 28
        <form class="form" name="form" novalidate>
          <div class="row">
            <div class="col-md-10">
              <label>Nombre</label>
              <div class="input-group">
                <input type="text" name="nombre" class="form-control" ng-model="vm.cargo.nombre"
                       placeholder="Nombre de cargo" required>
29 30 31
                <span class="input-group-btn">
                <button type="button" class="btn btn-primary-outline" ng-click="vm.guardarCargo(form,'nombre')"
                        ng-disabled="!form.nombre.$dirty"><i class="fa fa-save"></i></button>
32 33 34
                </span>
              </div>
            </div>
35
          </div>
36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51
          <div class="row">
            <div class="col-md-10">
              <label>Tipo de Cargo</label>
              <div class="input-group">
                <select name="fk_tipo_cargo" class="form-control" ng-model="vm.tipoCargo"
                        ng-options="tpCargo as (tpCargo.nombre) for tpCargo in vm.tiposCargo.rows">
                </select>
                <span class="input-group-btn">
                  <button type="button" class="btn btn-primary-outline"
                          ng-click="vm.guardarCargo(form,'fk_tipo_cargo')"
                          ng-disabled="!form.fk_tipo_cargo.$dirty"><i class="fa fa-save"></i>
                  </button>
                </span>
              </div>
            </div>
          </div>
52 53 54 55 56 57 58 59
          <div class="form-group has-error">
            <p class="help-block"
               ng-show="(form.nombre.$error.required) && vm.enviado">
              Debe llenar el nombre.
            </p>
            <p class="help-block">{{ vm.erroresCargo.other }}</p>
          </div>
        </form>
60 61
      </blockquote>
    </div>
62 63
  </div>
</div>