viewEdit.php
26.2 KB
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
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
<!DOCTYPE html>
<html lang="en">
<head>
<title>Editar - Arcu </title>
<!-- Meta -->
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=0, minimal-ui">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="description" content="#">
<meta name="keywords" content="Admin , Responsive, Landing, Bootstrap, App, Template, Mobile, iOS, Android, apple, creative app">
<meta name="author" content="#">
<!-- Favicon icon -->
<link rel="icon" href="<?php echo constant ('URL');?>src/menu/assets/images/favicon.ico" type="image/x-icon">
<!-- Google font-->
<link href="<?php echo constant ('URL');?>src/menu/assets/fonts/fonts-opensans.css" rel="stylesheet">
<!-- Required Fremwork -->
<link rel="stylesheet" type="text/css" href="<?php echo constant ('URL');?>src/menu/bower_components/bootstrap/css/bootstrap.min.css">
<!-- themify-icons line icon -->
<link rel="stylesheet" type="text/css" href="<?php echo constant ('URL');?>src/menu/assets/icon/themify-icons/themify-icons.css">
<!-- ico font -->
<link rel="stylesheet" type="text/css" href="<?php echo constant ('URL');?>src/menu/assets/icon/icofont/css/icofont.css">
<!-- feather Awesome -->
<link rel="stylesheet" type="text/css" href="<?php echo constant ('URL');?>src/menu/assets/icon/feather/css/feather.css">
<!--forms-wizard css-->
<link rel="stylesheet" type="text/css" href="<?php echo constant ('URL');?>src/menu/bower_components/jquery.steps/css/jquery.steps.css">
<!-- Select 2 css -->
<link rel="stylesheet" href="<?php echo constant ('URL');?>src/menu/bower_components/select2/css/select2.min.css">
<!-- Multi Select css -->
<link rel="stylesheet" type="text/css" href="<?php echo constant ('URL');?>src/menu/bower_components/bootstrap-multiselect/css/bootstrap-multiselect.css">
<link rel="stylesheet" type="text/css" href="<?php echo constant ('URL');?>src/menu/bower_components/multiselect/css/multi-select.css">
<!-- Style.css -->
<link rel="stylesheet" type="text/css" href="<?php echo constant ('URL');?>src/menu/assets/css/style.css">
<link rel="stylesheet" type="text/css" href="<?php echo constant ('URL');?>src/menu/assets/css/jquery.mCustomScrollbar.css">
<link rel="stylesheet" href="<?php echo constant ('URL');?>src/menu/assets/scss/partials/menu/_pcmenu.htm">
</head>
<body>
<?php include_once 'views/header.php';?>
<!-- Page-header start -->
<div class="page-header">
<div class="row align-items-end">
<div class="col-lg-8">
<div class="page-header-title">
<div class="d-inline">
<h4>Editar Mi Perfil</h4>
<span>En Esta Sección podrá Editar Su Información Personal dentro del Sistema</span>
</div>
</div>
</div>
<div class="col-lg-4">
<div class="page-header-breadcrumb">
<ul class="breadcrumb-title">
<li class="breadcrumb-item">
<a href="<?php echo constant('URL');?>home"> <i class="feather icon-home"></i> Inicio</a>
</li>
<li class="breadcrumb-item"><a href="<?php echo constant('URL');?>usuarios"><i class="feather icon-users"></i> Usuarios</a> </li>
<li class="breadcrumb-item active"><strong><a href="<?php echo constant('URL') . "usuarios/viewEdit/" . $this->id_persona;?>"><i class="feather icon-edit"></i> Editar Datos</a> </strong></li>
</ul>
</div>
</div>
</div>
</div>
<!-- Page-header end -->
<div class="page-body">
<div class="row">
<div class="col-sm-12">
<div class="card">
<div class="card-header">
<h5>Editar Datos Personales</h5>
<span>Los Datos a Completar del Siguiente Formulario identificados (<b style="color: red;">*</b>) Son Obligatorios.</span>
<div class="card-header-right">
<ul class="list-unstyled card-option">
<li><a href="<?php echo constant ('URL');?>usuarios"><button class="btn btn-inverse btn-out-dotted"><i class="icofont icofont-arrow-left" style="font-size: 1.2em; color: white"></i> Volver</button></a></li>
</ul>
</div>
</div>
<div class="card-block">
<?php echo $this->mensaje;?>
<div class="row">
<div class="col-md-12">
<div id="wizard">
<section>
<form action="<?php echo constant ('URL') . "perfil/editPerfil/" . $this->id_persona;?>" method="POST" class="wizard-form" id="example-advanced-form">
<h3> Datos Personales </h3>
<fieldset>
<div class="row">
<div class="col-lg-6">
<div class="form-group">
<label for="tipo_documento" class="block">Tipo de Documento de Identidad <span style="color: red;">*</span></label>
<select id="tipo_documento" name="tipo_documento" class="form-control required js-example-basic-single">
<option value="">Seleccione</option>
<?php
foreach($this->tipos_documento as $row){
$tipo_documento=new Arcu();
$tipo_documento=$row;?>
<option value="<?php echo $tipo_documento->id;?>" <?php if($tipo_documento->id==$this->persona->id_tipo_documento){ echo "selected=selected"; }?>><?php echo $tipo_documento->descripcion;?></option>
<?php }?>
</select>
</div>
<div class="form-group">
<label for="pnombre" class="block">Primer Nombre <span style="color: red;">*</span></label>
<input id="pnombre" name="pnombre" type="text" class="required form-control form-control-capitalize" value="<?php echo $this->persona->primer_nombre; ?>" placeholder="Ingrese su Primer Nombre" maxlength="45" onkeypress="return soloLetras(event)">
</div>
<div class="form-group">
<label for="papellido" class="block">Primer Apellido <span style="color: red;">*</span></label>
<input id="papellido" name="papellido" type="text" class="required form-control form-control-capitalize" value="<?php echo $this->persona->primer_apellido; ?>" placeholder="Ingrese su Primer Apellido" maxlength="45" onkeypress="return soloLetras(event)">
</div>
</div>
<div class="col-lg-6">
<div class="form-group">
<label for="cedula" class="block">Nro. de Identificación <span style="color: red;">*</span></label>
<input id="cedula" name="cedula" type="text" class="required number form-control" value="<?php echo $this->persona->identificacion; ?>"placeholder="Ingrese el Nro. de Identificación (DNI, Pasaporte, etc.)" maxlength="11" minlength="5">
</div>
<div class="form-group">
<label for="snombre" class="block">Segundo Nombre <i><small>(Opcional)</small></i></label>
<input id="snombre" name="snombre" type="text" class="form-control form-control-capitalize" value="<?php echo $this->persona->segundo_nombre; ?>" placeholder="Ingrese su Segundo Nombre" maxlength="45" onkeypress="return soloLetras(event)">
</div>
<div class="form-group">
<label for="sapellido" class="block">Segundo Apellido <i><small>(Opcional)</small></i></label>
<input id="sapellido" name="sapellido" type="text" class="form-control form-control-capitalize" value="<?php echo $this->persona->segundo_apellido; ?>" placeholder="Ingrese su Primer Apellido" maxlength="45" onkeypress="return soloLetras(event)">
</div>
</div>
<script>
function soloLetras(e) {
var key = e.keyCode || e.which,
tecla = String.fromCharCode(key).toLowerCase(),
letras = " áéíóúabcdefghijklmnñopqrstuvwxyz",
especiales = [8, 37, 39, 46],
tecla_especial = false;
for (var i in especiales) {
if (key == especiales[i]) {
tecla_especial = true;
break;
}
}
if (letras.indexOf(tecla) == -1 && !tecla_especial) {
return false;
}
}
</script>
</div>
<div class="form-group row">
<div class="col-md-4 col-lg-2">
<label for="name-2" class="block">Género <span style="color: red;">*</span></label>
</div>
<div class="col-md-8 col-lg-10 form-radio">
<div class="radio radiofill radio-warning radio-inline">
<label>
<input type="radio" name="genero" value="Femenino" <?php if($this->persona->genero=="Femenino"){echo 'checked=""';}?>>
<i class="helper"></i>Femenino
</label>
</div>
<div class="radio radiofill radio-warning radio-inline">
<label>
<input type="radio" name="genero" value="Masculino" <?php if($this->persona->genero=="Masculino"){echo 'checked=""';}?>>
<i class="helper"></i>Masculino
</label>
</div>
</div>
</div>
</fieldset>
<h3> Datos Personales </h3>
<fieldset>
<h3><i class="icofont icofont-location-pin"></i> Residencia</h3>
<div class="row">
<div class="col-lg-6">
<div class="form-group">
<label for="pais" class="block">País donde Reside <span style="color: red;">*</span></label>
<select id="pais" name="pais" class="form-control required js-example-basic-single">
<option value="">Seleccione</option>
<?php
foreach($this->paises as $row){
$pais=new Arcu();
$pais=$row;?>
<option value="<?php echo $pais->id;?>" <?php if($pais->id==$this->persona->id_pais){ echo "selected=selected"; }?>><?php echo $pais->descripcion;?></option>
<?php }?>
</select>
</div>
</div>
<div class="col-lg-6">
<div class="form-group">
<label for="ciudad" class="block">Ciudad donde Reside <span style="color: red;">*</span></label>
<select id="ciudad" name="ciudad" class="form-control required js-example-basic-single">
<option id="tciudad" value="">Seleccione</option>
</select>
</div>
</div>
<script>
$('#pais').change(function(){
var id_pais = $(this).val();
$.post( '<?php echo constant ('URL');?>usuarios/getCiudadesPais', { pais: id_pais} ).done( function( respuesta )
{
$( '#ciudad' ).html( respuesta );
});
});
//editar estado
$.post( '<?php echo constant ('URL');?>usuarios/getCiudadesPais', { pais: <?php echo $this->persona->id_pais;?>} ).done( function( respuesta )
{
$( '#ciudad' ).html( respuesta );
$( '#ciudad option[value="'+<?php echo $this->persona->id_ciudad; ?>+'"]' ).attr("selected", true);
if($("#ciudad").val() == '<?php echo $this->persona->id_ciudad;?>'){
$('#tciudad').append('<option value="<?php echo $this->persona->id_ciudad;?>" selected="selected"><?php echo $this->persona->ciudad;?></option>');
}
});
</script>
</div>
<h3><i class="feather icon-phone-call"></i> Contacto</h3>
<div class="row">
<div class="col-lg-6">
<div class="form-group">
<label for="telefono" class="block">Teléfono <span style="color: red;">*</span></label>
<input id="telefono" name="telefono" type="text"class="required form-control us_telephone" value="<?php echo $this->persona->telefono; ?>" data-mask="(0999) 999-9999" placeholder="Ingrese su Nro. de Teléfono">
</div>
</div>
</div>
</fieldset>
</form>
</section>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<?php include_once 'views/footer.php';?>
<!-- NOTA: revisen el footer, ahi integre todos los js que necesita el header para que funcione,
si necesitan, agregar un plugin lo hacen a partir de este comentario -->
<script src="<?php echo constant ('URL');?>src/menu/bower_components/jquery-validation/js/jquery.validate.js"></script>
<script type="text/javascript" src="<?php echo constant ('URL');?>src/menu/assets/pages/form-validation/validate.js"></script>
<script src="<?php echo constant ('URL');?>src/menu/bower_components/jquery.cookie/js/jquery.cookie.js"></script>
<script src="<?php echo constant ('URL');?>src/menu/bower_components/jquery.steps/js/jquery.steps.js"></script>
<script type="text/javascript" src="<?php echo constant ('URL');?>src/menu/assets/pages/form-validation/validate.js"></script>
<script src="<?php echo constant ('URL');?>src/menu/assets/pages/forms-wizard-validation/form-wizard-horizontal.js"></script>
<!-- Masking js -->
<script src="<?php echo constant ('URL');?>src/menu/assets/pages/form-masking/inputmask.js"></script>
<script src="<?php echo constant ('URL');?>src/menu/assets/pages/form-masking/jquery.inputmask.js"></script>
<script src="<?php echo constant ('URL');?>src/menu/assets/pages/form-masking/autoNumeric.js"></script>
<script src="<?php echo constant ('URL');?>src/menu/assets/pages/form-masking/form-mask.js"></script>
<!-- Select 2 js -->
<script type="text/javascript" src="<?php echo constant ('URL');?>src/menu/bower_components/select2/js/select2.full.min.js"></script>
<script type="text/javascript" src="<?php echo constant ('URL');?>src/menu/assets/pages/advance-elements/select2-custom.js"></script>
<!-- Multiselect js -->
<script type="text/javascript" src="<?php echo constant ('URL');?>src/menu/bower_components/bootstrap-multiselect/js/bootstrap-multiselect.js"></script>
<script type="text/javascript" src="<?php echo constant ('URL');?>src/menu/bower_components/multiselect/js/jquery.multi-select.js"></script>
</body>
</html>