mirror of
https://git.imnavajas.es/jjimenez/safekat.git
synced 2025-07-25 22:52:08 +00:00
formulario direcciones presupuestos 2
This commit is contained in:
@ -25,19 +25,19 @@
|
||||
<label for="add_att" class="form-label">
|
||||
<?= lang('PresupuestosDirecciones.att') ?>*
|
||||
</label>
|
||||
<input type="text" id="add_att" tabindex="1" maxLength="100" class="form-control">
|
||||
<input type="text" id="add_att" tabindex="1" maxLength="100" class="form-control new-address">
|
||||
</div><!--//.mb-3 -->
|
||||
<div class="mb-3">
|
||||
<label for="add_email" class="form-label">
|
||||
<?= lang('PresupuestosDirecciones.email') ?>*
|
||||
</label>
|
||||
<input type="text" id="add_email" tabindex="2" maxLength="100" class="form-control">
|
||||
<input type="text" id="add_email" tabindex="2" maxLength="100" class="form-control new-address">
|
||||
</div><!--//.mb-3 -->
|
||||
<div class="mb-3">
|
||||
<label for="add_direccion" class="form-label">
|
||||
<?= lang('PresupuestosDirecciones.direccion') ?>*
|
||||
</label>
|
||||
<input type="text" id="add_direccion" tabindex="3" maxLength="255" class="form-control">
|
||||
<input type="text" id="add_direccion" tabindex="3" maxLength="255" class="form-control new-address">
|
||||
</div><!--//.mb-3 -->
|
||||
|
||||
<div class='row'>
|
||||
@ -47,7 +47,7 @@
|
||||
<label for="add_pais_id" class="form-label">
|
||||
<?=lang('PresupuestosDirecciones.pais') ?>*
|
||||
</label>
|
||||
<select id="add_pais_id" tabindex="4" class="form-control select2bs" style="width: 100%;" >
|
||||
<select id="add_pais_id" tabindex="4" class="form-control select2bs new-address" style="width: 100%;" >
|
||||
<option value="" disabled selected><?=lang('PresupuestosDirecciones.selectPais') ?></option>
|
||||
<?php foreach ($paisList as $item) : ?>
|
||||
<option value="<?=$item->id ?>">
|
||||
@ -63,7 +63,7 @@
|
||||
<label for="add_ccaa" class="form-label">
|
||||
<?=lang('PresupuestosDirecciones.ccaa') ?>*
|
||||
</label>
|
||||
<select id="add_ccaa" tabindex="5" class="form-control select2bs" style="width: 100%;" >
|
||||
<select id="add_ccaa" tabindex="5" class="form-control select2bs new-address" style="width: 100%;" >
|
||||
<option value="" disabled selected><?=lang('PresupuestosDirecciones.selectCcaa') ?></option>
|
||||
<?php foreach ($ccaaList as $item) : ?>
|
||||
<option value="<?=$item->id ?>">
|
||||
@ -83,7 +83,7 @@
|
||||
<label for="add_municipio" class="form-label">
|
||||
<?=lang('PresupuestosDirecciones.municipio') ?>*
|
||||
</label>
|
||||
<input type="text" id="add_municipio" tabindex="6" maxLength="100" class="form-control">
|
||||
<input type="text" id="add_municipio" tabindex="6" maxLength="100" class="form-control new-address">
|
||||
</div><!--//.mb-3 -->
|
||||
</div>
|
||||
|
||||
@ -92,7 +92,7 @@
|
||||
<label for="add_provincia" class="form-label">
|
||||
<?=lang('PresupuestosDirecciones.provincia') ?>*
|
||||
</label>
|
||||
<input type="text" id="add_provincia" tabindex="7" maxLength="100" class="form-control">
|
||||
<input type="text" id="add_provincia" tabindex="7" maxLength="100" class="form-control new-address">
|
||||
</div><!--//.mb-3 -->
|
||||
</div>
|
||||
|
||||
@ -105,7 +105,7 @@
|
||||
<label for="add_cp" class="form-label">
|
||||
<?=lang('PresupuestosDirecciones.cp') ?>*
|
||||
</label>
|
||||
<input type="text" id="add_cp" tabindex="8" maxLength="100" class="form-control">
|
||||
<input type="text" id="add_cp" tabindex="8" maxLength="100" class="form-control new-address">
|
||||
</div><!--//.mb-3 -->
|
||||
</div>
|
||||
|
||||
@ -114,7 +114,7 @@
|
||||
<label for="add_telefono" class="form-label">
|
||||
<?=lang('PresupuestosDirecciones.telefono') ?>*
|
||||
</label>
|
||||
<input type="text" id="add_telefono" tabindex="9" maxLength="100" class="form-control"></input>
|
||||
<input type="text" id="add_telefono" tabindex="9" maxLength="100" class="form-control new-address"></input>
|
||||
</div><!--//.mb-3 -->
|
||||
</div>
|
||||
|
||||
@ -177,6 +177,46 @@ $('#add_clientedAdd').select2({
|
||||
}
|
||||
})
|
||||
|
||||
$('#add_clientedAdd').on('select2:select', function (e) {
|
||||
var data = e.params.data;
|
||||
|
||||
$.ajax({
|
||||
type: "POST",
|
||||
url: '<?=route_to('dataTableOfClienteDirecciones') ?>',
|
||||
data: function (params) {
|
||||
return {
|
||||
id: data.id,
|
||||
<?= csrf_token() ?? "token" ?> : <?= csrf_token() ?>v
|
||||
};
|
||||
},
|
||||
success: function (data) {
|
||||
console.log(data)
|
||||
/*data.values.forEach((row) => {
|
||||
|
||||
tableServiciosAcabado.row.add([
|
||||
row.tarifa_id,
|
||||
row.tarifa_nombre,
|
||||
'<span id="precio_unidad_acabado_' + row.tarifa_id + '">' + parseFloat(row.precio_unidad).toFixed(2) + '</span>',
|
||||
'<input class="update-totales" id="precio_total_acabado_' + row.tarifa_id +'" value="' + parseFloat(row.total).toFixed(2) + '"></input>',
|
||||
'<span style="display: none;" class="update-totales" id="acabado_margen_' + row.tarifa_id + '">' + parseFloat(row.margen).toFixed(2) + '</span>',
|
||||
'<a href="javascript:void(0);"><i class="ti ti-trash ti-sm btn-delete-serv mx-2" data-id="' + row.tarifa_id +'"></i></a>'
|
||||
]).draw(false)
|
||||
});
|
||||
yeniden(data.<?= csrf_token() ?>);
|
||||
*/
|
||||
|
||||
return true;
|
||||
},
|
||||
error: function(e){
|
||||
return false;
|
||||
}
|
||||
})
|
||||
return false;
|
||||
});
|
||||
|
||||
$('.new-address').on('change', function(){
|
||||
$('#add_clientedAdd').val(null).trigger('change');
|
||||
})
|
||||
|
||||
$('#add_pais_id').on('change', function(){
|
||||
var nombre_pais = $("#add_pais_id option:selected" ).text().trim();
|
||||
|
||||
Reference in New Issue
Block a user