mirror of
https://git.imnavajas.es/jjimenez/erp-imprimelibros.git
synced 2026-01-24 09:40:21 +00:00
falta procesar el resultado
This commit is contained in:
@ -0,0 +1,29 @@
|
||||
$(document).on('click', '#maquetacion', function (e) {
|
||||
e.preventDefault();
|
||||
$.get("/presupuesto/public/maquetacion/form", function (data) {
|
||||
$("#maquetacionModalBody").html(data);
|
||||
$("#maquetacionModal").modal("show");
|
||||
});
|
||||
});
|
||||
|
||||
$(document).on("submit", "#maquetacionForm", function (e) {
|
||||
e.preventDefault();
|
||||
|
||||
const $form = $(this);
|
||||
|
||||
$.ajax({
|
||||
url: $form.attr("action"),
|
||||
type: $form.attr("method"),
|
||||
data: $form.serialize(),
|
||||
success: function (data) {
|
||||
// obtener el json devuelto
|
||||
const json = JSON.parse(data);
|
||||
|
||||
},
|
||||
error: function (xhr, status, error) {
|
||||
$("#maquetacionModalBody").html(
|
||||
"<div class='alert alert-danger'>" + xhr.responseText + "</div>"
|
||||
);
|
||||
}
|
||||
});
|
||||
});
|
||||
@ -18,7 +18,7 @@ class ServiceOptionCard {
|
||||
: '';
|
||||
const $card = $(`
|
||||
<div class="col-lg-2 col-md-3 col-sm-6 mb-3">
|
||||
<input type="checkbox" class="service-checkbox data-price=${this.price} btn-check-service" id="${this.id}" name="services[]" value="${this.id}" autocomplete="off" ${this.checked ? 'checked' : ''} />
|
||||
<input type="checkbox" class="service-checkbox btn-check-service" data-price=${this.price} id="${this.id}" name="services[]" value="${this.id}" autocomplete="off" ${this.checked ? 'checked' : ''} />
|
||||
<label class="btn btn-service-option w-100 text-center py-3 px-2 d-flex flex-column align-items-center justify-content-center h-100" for="${this.id}">
|
||||
${ribbonHtml}
|
||||
<h5 class="service-title mb-1">${this.title}</h5>
|
||||
|
||||
Reference in New Issue
Block a user