mirror of
https://git.imnavajas.es/jjimenez/safekat.git
synced 2025-07-25 22:52:08 +00:00
subir cambios antes de update
This commit is contained in:
@ -30,4 +30,11 @@
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<?= $this->section("additionalInlineJs") ?>
|
||||
|
||||
window.routes_direcciones = {
|
||||
direcciones: "<?= route_to('getDirecciones') ?>",
|
||||
}
|
||||
<?= $this->endSection() ?>
|
||||
@ -1,3 +1,30 @@
|
||||
function initDirecciones() {
|
||||
data = {
|
||||
id: $('#clienteId').val()
|
||||
},
|
||||
data = Object.assign(data, window.token_ajax)
|
||||
|
||||
$.ajax({
|
||||
url: window.routes_direcciones.direcciones,
|
||||
type: 'POST',
|
||||
data: data,
|
||||
success: function(response) {
|
||||
$("#direcciones").empty();
|
||||
$.each(response.menu, function(key, value) {
|
||||
$('#direcciones')
|
||||
.append($('<option>', { value : key })
|
||||
.text(value));
|
||||
});
|
||||
$('#direcciones').val();
|
||||
},
|
||||
error: function() {
|
||||
$("#direcciones").empty();
|
||||
},
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
|
||||
function initTiradasDirecciones() {
|
||||
const _this = this
|
||||
|
||||
@ -61,6 +88,13 @@ function updateTiradasDireccionesCheck(el) {
|
||||
}
|
||||
}
|
||||
|
||||
$('#direcciones').on('change', function() {
|
||||
if( $('#direcciones').val() == 0 ) {
|
||||
console.log("Nueva direccion")
|
||||
}
|
||||
})
|
||||
|
||||
|
||||
$('#insertarDireccion').on('click', function() {
|
||||
//if( ('#direcciones').val() > 0 ) {
|
||||
|
||||
|
||||
@ -208,6 +208,7 @@
|
||||
}
|
||||
}).on('core.form.valid', function () {
|
||||
validationStepper.next();
|
||||
initDirecciones();
|
||||
initTiradasDirecciones();
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user