personas.editar.modal.html 1.79 KB
Newer Older
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
<form class="form" name="form" ng-submit="vm.guardarPersona(form)" novalidate>
  <div class="modal-header modal-header-primary ">
    <button type="button" ng-click="vm.modal.dismiss()" class="close">&times;</button>
    <h4 class="modal-title">Persona</h4>
  </div>
  <div class="modal-body">
    <div class="row">
      <div class="col-md-10">
        <label>Nombres</label>
        <div class="">
          <input type="text" name="nombres" class="form-control" ng-model="vm.persona.nombres" required>
          <p class="help-block" ng-show="form.nombres.$error.required && vm.enviado">
            Ingrese los nombres de la persona
          </p>
        </div>
      </div>
      <div class="col-md-10">
        <label>Apellidos</label>
        <div class="">
          <input type="text" name="apellidos" class="form-control" ng-model="vm.persona.apellidos" required>
          <p class="help-block" ng-show="form.apellidos.$error.required && vm.enviado">
            Ingrese los apellidos de la persona
          </p>
        </div>
      </div>
      <div class="col-md-10">
        <label>CI</label>
        <div class="">
          <input type="text" name="ci" class="form-control" ng-model="vm.persona.ci" required>
          <p class="help-block" ng-show="form.ci.$error.required && vm.enviado">
            Ingrese el ci de la persona
          </p>
        </div>
      </div>
    </div>
    <div class="form-group has-error">
      <p class="help-block">{{ vm.errores.otros}}</p>
    </div>
  </div>
  <div class="modal-footer">
    <button class="btn btn-primary-outline" type="submit"
            ng-disabled="!(form.nombres.$dirty ||form.apellidos.$dirty|| form.ci.$dirty)">
      Guardar
    </button>
    <button class="btn btn-default" type="button" ng-click="vm.modal.dismiss()">Cancelar</button>
  </div>
</form>