ViewEdit.php
31.1 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
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
<!DOCTYPE html>
<html lang="en">
<head>
<title>Resolución - 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>Modificar Resolución</h4>
<span>En Esta Sección podrá Editar las Resoluciones </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');?>resolucion"><i class="icofont icofont-triangle"></i> Resolución</a> </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">
<h3 style="margin-left:35%;">Editar Resolución</h3>
<hr>
<span style="margin-left:25%;">Los Datos a Completar del Siguiente Formulario identificados con (<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');?>resolucion"><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');?>resolucion/EditarResolucion" method="POST" class="wizard-form" id="example-advanced-form" enctype="multipart/form-data">
<h3> Resolución </h3>
<fieldset >
<input type="hidden" name="id_resolucion" value="<?php echo $this->edicion->id_resolucion; ?>">
<div class="row" >
<div class="col-lg-6">
<div class="form-group">
<label for="titulo" class="block">N° de Resolucion<span style="color: red;">*</span></label>
<input id="numero" name="numero" type="text" class="required form-control" value="<?php echo $this->edicion->numero; ?>" placeholder="Ingrese el número de la Resolución" maxlength="20">
</div>
<div class="form-group">
<label for="id_municipal" class="block">Eje Municipal<span style="color: red;">*</span></label>
<select id="id_municipal" name="id_municipal" class="form-control required js-example-basic-single">
<option value="">Seleccione</option>
<?php
foreach ($this->municipales as $row) {
$municipal=new Arcu();
$municipal=$row;?>
<option value="<?php echo $municipal->id_municipal; ?>" <?php if($municipal->id_municipal==$this->edicion->id_municipal){ echo "selected=selected"; }?>><?php echo $municipal->descripcion; ?></option>
<?php } ?>
</select>
</div>
<div class="form-group">
<label for="id_autoridad" class="block">Autoridad<span style="color: red;">*</span></label>
<select id="id_autoridad" name="id_autoridad" class="form-control required js-example-basic-single">
<option value="">Seleccione</option>
<?php
foreach ($this->autoridades as $row) {
$autoridad=new Arcu();
$autoridad=$row;?>
<option value="<?php echo $autoridad->id_autoridad; ?>" <?php if($autoridad->id_autoridad==$this->edicion->id_autoridad){ echo "selected=selected"; }?>><?php echo $autoridad->nombre; ?> <?php echo $autoridad->apellido; ?> - <?php echo $autoridad->tipo; ?></option>
<?php } ?>
</select>
</div>
<div class="col-sm-10" >
<label for="file2" class="block">Resolución<span style="color: red;">*</span></label>
<input id="acceptTerms1" type="file" name="file2" class="form-control" style="width:100%;" accept="application/pdf" value="<?php echo $this->edicion->documento; ?>">
</div>
<a href="<?php echo constant ('URL'). "src/resolucion/" . $this->edicion->documento;?>" class="btn btn-primary btn-out-dotted" target="_blank"><i class="icofont icofont-eye" style="font-size: 1.2em; color: white"></i> Ver Documento</a>
<br><div style="width:100%;marging-left:5%;" class="alert alert-warning">
<b>(Extensiones permitidas .pdf) </b> Peso maximo para montar documento <b>10 MB (10000 KBs) </b>
</div>
<script>
$('.custom-file-input').on('change', function() {
let fileName = $(this).val().split('\\').pop();
$(this).next('.custom-file-label').addClass("selected").html(fileName);
});
</script>
<br>
<br>
</div>
<div class="col-lg-6">
<div class="card">
<div class="form-group">
<label for="id_acta" class="block">Nro. de Acta<span style="color: red;">*</span></label>
<select id="id_acta" name="id_acta" class="form-control required js-example-basic-single">
<option value="">Seleccione</option>
<?php
foreach ($this->actas as $row) {
$acta=new Arcu();
$acta=$row;?>
<option value="<?php echo $acta->id_acta; ?>" <?php if($acta->id_acta==$this->edicion->id_acta){ echo "selected=selected"; }?>><?php echo $acta->numero; ?></option>
<?php } ?>
</select>
</div>
<div class="form-group">
<label for="id_regional" class="block">Eje Regional (Opcional)</label>
<select id="id_regional" name="id_regional" class="form-control js-example-basic-single">
<option value="">Seleccione</option>
<?php
foreach ($this->regionales as $row) {
$regional=new Arcu();
$regional=$row;?>
<option value="<?php echo $regional->id_regional; ?>" <?php if($regional->id_regional==$this->edicion->id_regional){ echo "selected=selected"; }?>><?php echo $regional->descripcion; ?></option>
<?php } ?>
</select>
</div>
<div class="form-group">
<label for="id_descriptor" class="block">Descriptor<span style="color: red;">*</span></label>
<select id="id_descriptor" name="id_descriptor" class="form-control required js-example-basic-single">
<option value="">Seleccione</option>
<?php
foreach ($this->descriptores as $row) {
$descriptor=new Arcu();
$descriptor=$row;?>
<option value="<?php echo $descriptor->id_descriptor; ?>" <?php if($descriptor->id_descriptor==$this->edicion->id_descriptor){ echo "selected=selected"; }?>><?php echo $descriptor->descripcion; ?></option>
<?php } ?>
</select>
</div>
<div class="form-group">
<label for="fecha" class="block">Fecha (Escriba la fecha en este formato DD-MM-AA)<span style="color: red;">*</span></label>
<input id="fecha" name="fecha" type="text" class="required form-control" maxlength="45" value="<?php echo $this->edicion->fecha; ?>">
</div>
<div class="form-group">
<label for="estatus" class="block">Descripción (Opcional)</span></label>
<textarea name="desicion" class="form-control" maxlength="150" onkeyup="countsChars(this);" ><?php echo $this->edicion->desicion; ?></textarea>
<p id="charNum">Solo hasta 150 caracteres</p>
</div>
</div>
</fieldset>
<h3> Asociados </h3>
<fieldset>
<label class="block">¿Asociado?</label>
<select onChange="mostrar(this.value);">
<option value="">Seleccione</option>
<option value="SI">SI</option>
<option value="NO">NO</option>
</select>
<div id=asociado style="display: none;">
<input type="hidden" name="id_asociado" value="<?php echo $this->edicion1->id_asociado; ?>">
<div class="row" >
<div class="col-lg-6">
<div class="form-group">
<label for="identificacion" class="block">Nro. De Identificación</span></label>
<input id="identificacion" name="identificacion"type="text" class="number form-control" value="<?php echo $this->edicion1->identificacion; ?>" placeholder="Ingrese el Nro. de Identificación (DNI, Pasaporte, etc.)" maxlength="11" minlength="5">
</div>
<div class="form-group">
<label for="identificacion" class="block">Apellido</label>
<input id="apellido" name="apellido" type="text" class="form-control form-control-capitalize" value="<?php echo $this->edicion1->apellido; ?>" placeholder="Ingrese Su Apellido" maxlength="20" onkeypress="return soloLetras(event)">
</div>
</div>
<div class="col-lg-6">
<div class="card">
<div class="form-group">
<label for="nombre" class="block">Nombre</label>
<input id="nombre" name="nombre" type="text" class="form-control form-control-capitalize" value="<?php echo $this->edicion1->nombre; ?>" placeholder="Ingrese Su Nombre" maxlength="20" onkeypress="return soloLetras(event)">
</div>
</div>
</div>
</div>
</div>
<br>
<br>
<div class="col-lg-6">
<div class="form-group">
<label for="estatus" class="block">Observación de la Resolución (Opcional)</label>
<textarea name="observacion" class="form-control" onkeypress="return soloLetras(event)" maxlength="250" onkeyup="countChars(this);"><?php echo $this->edicion->observacion; ?></textarea>
<p id="charNumbers">Solo hasta 250 caracteres</p>
</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 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>
<script>
$(document).ready(function(){
$('.dataTables-example').DataTable({
pageLength: 25,
responsive: true,
dom: '<"html5buttons"B>lTfgitp',
buttons: [
]
});
});
</script>
<script>
$(document).ready(function(){
var extensionesValidas = ".pdf";
var pesoPermitido = 10000;
// Cuando cambie #fichero
$("#acceptTerms1").change(function () {
$('#texto').text('');
if(vE(this)) {
if(vP(this)) {
}
}
});
// Validacion de extensiones permitidas
function vE(datos) {
var ruta = datos.value;
var extension = ruta.substring(ruta.lastIndexOf('.') + 1).toLowerCase();
var extensionValida = extensionesValidas.indexOf(extension);
if(extensionValida < 0) {
alert('La extensión no es válida Su Archivo tiene de extensión: .'+extension, 'Ha ocurrido un Error');
document.getElementById("acceptTerms1").value = "";
return false;
} else {
return true;
}
}
// Validacion de peso del fichero en kbs
function vP(datos) {
if (datos.files && datos.files[0]) {
var pesoFichero = datos.files[0].size/10000;
if(pesoFichero > pesoPermitido) {
alert('El peso maximo permitido del Archivo es: ' + pesoPermitido + ' KBs Su Archivo tiene: '+ pesoFichero +' KBs', 'Ha ocurrido un Error');
document.getElementById("acceptTerms1").value = "";
return false;
} else {
return true;
}
}
}
});
</script>
<script type="text/javascript">
function mostrar(id) {
if (id == "SI") {
$("#asociado").show();
}
if (id == "NO") {
$("#asociado").hide();
}
}
</script>
<script>
function countChars(obj){
var maxLength = 250;
var strLength = obj.value.length;
var charRemain = (maxLength - strLength);
if(charRemain < 0){
document.getElementById("charNumbers").innerHTML = '<span style="color: red;">Has excedido el limite de caracteres</span>';
}else{
document.getElementById("charNumbers").innerHTML = charRemain+' Faltantes';
}
}
</script>
<script>
function countsChars(obj){
var maxLength = 150;
var strLength = obj.value.length;
var charRemain = (maxLength - strLength);
if(charRemain < 0){
document.getElementById("charNum").innerHTML = '<span style="color: red;">Has excedido el limite de caracteres</span>';
}else{
document.getElementById("charNum").innerHTML = charRemain+' Faltantes';
}
}
</script>
</body>
</html>