mirror of
https://git.imnavajas.es/jjimenez/safekat.git
synced 2025-07-25 22:52:08 +00:00
"modificados campos en el form"
This commit is contained in:
@ -21,7 +21,7 @@ return [
|
|||||||
'incRei' => 'Incident \ Reprint',
|
'incRei' => 'Incident \ Reprint',
|
||||||
'paginas' => 'Pages',
|
'paginas' => 'Pages',
|
||||||
'tirada' => 'Print',
|
'tirada' => 'Print',
|
||||||
'totalPedido' => 'Budget total',
|
'totalPapelPedido' => 'Total paper budget',
|
||||||
'presupuestoEstado' => 'State',
|
'presupuestoEstado' => 'State',
|
||||||
'presupuestoEstadoBorrador' => 'Draft',
|
'presupuestoEstadoBorrador' => 'Draft',
|
||||||
'presupuestoEstadoAceptado' => 'Acepted',
|
'presupuestoEstadoAceptado' => 'Acepted',
|
||||||
@ -61,6 +61,8 @@ return [
|
|||||||
'cubierta' => 'Cover',
|
'cubierta' => 'Cover',
|
||||||
'sobrecubierta' => 'Dust jacket',
|
'sobrecubierta' => 'Dust jacket',
|
||||||
'encuadernacion' => 'Binding',
|
'encuadernacion' => 'Binding',
|
||||||
|
'solapas' => 'Book cover',
|
||||||
|
'solapas_ancho' => 'Book cover width',
|
||||||
|
|
||||||
/* '4x0' => '4x0',
|
/* '4x0' => '4x0',
|
||||||
'4x4' => '4x4',
|
'4x4' => '4x4',
|
||||||
|
|||||||
@ -68,7 +68,7 @@ return [
|
|||||||
'pliegosPedido' => 'Pliegos pedido',
|
'pliegosPedido' => 'Pliegos pedido',
|
||||||
'precioPliego' => 'Precio pliegos',
|
'precioPliego' => 'Precio pliegos',
|
||||||
'libro' => 'Libro',
|
'libro' => 'Libro',
|
||||||
'totalPedido' => 'Total pedido',
|
'totalPapelPedido' => 'Total papel pedido',
|
||||||
'lomo' => 'Lomo',
|
'lomo' => 'Lomo',
|
||||||
'peso' => 'Peso',
|
'peso' => 'Peso',
|
||||||
'click' => 'Click',
|
'click' => 'Click',
|
||||||
@ -81,6 +81,8 @@ return [
|
|||||||
'cubierta' => 'Cubierta',
|
'cubierta' => 'Cubierta',
|
||||||
'sobrecubierta' => 'Sobrecubierta',
|
'sobrecubierta' => 'Sobrecubierta',
|
||||||
'encuadernacion' => 'Encuadernación',
|
'encuadernacion' => 'Encuadernación',
|
||||||
|
'solapas' => 'Solapa cubierta',
|
||||||
|
'solapas_ancho' => 'Ancho solapa cubierta',
|
||||||
|
|
||||||
/* '4x0' => '4x0',
|
/* '4x0' => '4x0',
|
||||||
'4x4' => '4x4',
|
'4x4' => '4x4',
|
||||||
|
|||||||
@ -12,12 +12,31 @@
|
|||||||
<!-- Fila 1 -->
|
<!-- Fila 1 -->
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-md-12 col-lg-2 px-4">
|
<div class="col-md-12 col-lg-2 px-4">
|
||||||
<div class="mb-3">
|
|
||||||
<label for="paginas" class="form-label">
|
<div class="row">
|
||||||
<?= lang('Presupuestos.paginas') ?>*
|
|
||||||
</label>
|
<div class="mb-3">
|
||||||
<input type="number" id="paginas" name="paginas" maxLength="11" class="form-control" value="<?= old('paginas', $presupuestoEntity->paginas) ?>">
|
<label for="paginas" class="form-label">
|
||||||
</div><!--//.mb-3 -->
|
<?= lang('Presupuestos.paginas') ?>*
|
||||||
|
</label>
|
||||||
|
<input type="number" id="paginas" name="paginas" maxLength="11" class="form-control" value="<?= old('paginas', $presupuestoEntity->paginas) ?>">
|
||||||
|
</div><!--//.mb-3 -->
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="row">
|
||||||
|
|
||||||
|
<div class="mb-3">
|
||||||
|
|
||||||
|
<div class="form-check form-switch mb-2">
|
||||||
|
<input class="form-check-input" type="checkbox" id="solapas" name="solapas" value="1" <?= $presupuestoEntity->solapas == true ? 'checked' : ''; ?>>
|
||||||
|
<label class="form-check-label" for="papelFormatoPersonalizado"><?= lang('Presupuestos.solapas') ?></label>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</div><!--//.mb-3 -->
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
</div><!--//.col -->
|
</div><!--//.col -->
|
||||||
|
|
||||||
<div class="col-md-12 col-lg-2 px-4">
|
<div class="col-md-12 col-lg-2 px-4">
|
||||||
@ -91,6 +110,24 @@
|
|||||||
|
|
||||||
</div> <!--//.row -->
|
</div> <!--//.row -->
|
||||||
|
|
||||||
|
<div class="row">
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="row" id="div_solapas_ancho" style="display:none;">
|
||||||
|
<div class="col-md-12 col-lg-2 px-4">
|
||||||
|
<div class="mb-3">
|
||||||
|
<label for="solapas_ancho" class="form-label">
|
||||||
|
<?= lang('Presupuestos.solapas_ancho') ?>*
|
||||||
|
</label>
|
||||||
|
<input type="number" id="solapas_ancho" name="solapas_ancho" placeholder="6.00" maxLength="8" step="0.01" class="form-control" value="<?= old('solapas_ancho', $presupuestoEntity->solapas_ancho) ?>">
|
||||||
|
</div><!--//.mb-3 -->
|
||||||
|
</div><!--//.col -->
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@ -154,6 +191,7 @@
|
|||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
||||||
<div class="row">
|
<div class="row">
|
||||||
|
|
||||||
<div class="col-md-12 col-lg-3 px-4">
|
<div class="col-md-12 col-lg-3 px-4">
|
||||||
@ -218,10 +256,6 @@
|
|||||||
|
|
||||||
</div> <!--//.row -->
|
</div> <!--//.row -->
|
||||||
|
|
||||||
<!-- Este elemento se deja pero se oculta para que se actualice al enviar el form -->
|
|
||||||
<input type="checkbox" id="cosido" style="visibility: hidden;" name="cosido" value="1" class="form-check-input" <?= 'checked'; ?>>
|
|
||||||
|
|
||||||
|
|
||||||
</div> <!-- //.accordion-body -->
|
</div> <!-- //.accordion-body -->
|
||||||
</div> <!-- //.accordion-collapse -->
|
</div> <!-- //.accordion-collapse -->
|
||||||
</div> <!-- //.accordion-item -->
|
</div> <!-- //.accordion-item -->
|
||||||
|
|||||||
@ -262,7 +262,7 @@
|
|||||||
<th style="padding-right: 0.75em;"><?= lang('Presupuestos.pliegosPedido') ?></th>
|
<th style="padding-right: 0.75em;"><?= lang('Presupuestos.pliegosPedido') ?></th>
|
||||||
<th style="padding-right: 0.75em;"><?= lang('Presupuestos.precioPliego') ?></th>
|
<th style="padding-right: 0.75em;"><?= lang('Presupuestos.precioPliego') ?></th>
|
||||||
<th style="padding-right: 0.75em;"><?= lang('Presupuestos.libro') ?></th>
|
<th style="padding-right: 0.75em;"><?= lang('Presupuestos.libro') ?></th>
|
||||||
<th style="padding-right: 0.75em;"><?= lang('Presupuestos.totalPedido') ?></th>
|
<th style="padding-right: 0.75em;"><?= lang('Presupuestos.totalPapelPedido') ?></th>
|
||||||
<th style="padding-right: 0.75em;"><?= lang('Presupuestos.lomo') ?></th>
|
<th style="padding-right: 0.75em;"><?= lang('Presupuestos.lomo') ?></th>
|
||||||
<th style="padding-right: 0.75em;"><?= lang('Presupuestos.peso') ?></th>
|
<th style="padding-right: 0.75em;"><?= lang('Presupuestos.peso') ?></th>
|
||||||
<th style="padding-right: 0.75em;"><?= lang('Presupuestos.click') ?></th>
|
<th style="padding-right: 0.75em;"><?= lang('Presupuestos.click') ?></th>
|
||||||
@ -315,7 +315,7 @@
|
|||||||
<th style="padding-right: 0.75em;"><?= lang('Presupuestos.pliegosPedido') ?></th>
|
<th style="padding-right: 0.75em;"><?= lang('Presupuestos.pliegosPedido') ?></th>
|
||||||
<th style="padding-right: 0.75em;"><?= lang('Presupuestos.precioPliego') ?></th>
|
<th style="padding-right: 0.75em;"><?= lang('Presupuestos.precioPliego') ?></th>
|
||||||
<th style="padding-right: 0.75em;"><?= lang('Presupuestos.libro') ?></th>
|
<th style="padding-right: 0.75em;"><?= lang('Presupuestos.libro') ?></th>
|
||||||
<th style="padding-right: 0.75em;"><?= lang('Presupuestos.totalPedido') ?></th>
|
<th style="padding-right: 0.75em;"><?= lang('Presupuestos.totalPapelPedido') ?></th>
|
||||||
<th style="padding-right: 0.75em;"><?= lang('Presupuestos.lomo') ?></th>
|
<th style="padding-right: 0.75em;"><?= lang('Presupuestos.lomo') ?></th>
|
||||||
<th style="padding-right: 0.75em;"><?= lang('Presupuestos.peso') ?></th>
|
<th style="padding-right: 0.75em;"><?= lang('Presupuestos.peso') ?></th>
|
||||||
<th style="padding-right: 0.75em;"><?= lang('Presupuestos.click') ?></th>
|
<th style="padding-right: 0.75em;"><?= lang('Presupuestos.click') ?></th>
|
||||||
@ -366,7 +366,7 @@
|
|||||||
<th style="padding-right: 0.75em;"><?= lang('Presupuestos.pliegosPedido') ?></th>
|
<th style="padding-right: 0.75em;"><?= lang('Presupuestos.pliegosPedido') ?></th>
|
||||||
<th style="padding-right: 0.75em;"><?= lang('Presupuestos.precioPliego') ?></th>
|
<th style="padding-right: 0.75em;"><?= lang('Presupuestos.precioPliego') ?></th>
|
||||||
<th style="padding-right: 0.75em;"><?= lang('Presupuestos.libro') ?></th>
|
<th style="padding-right: 0.75em;"><?= lang('Presupuestos.libro') ?></th>
|
||||||
<th style="padding-right: 0.75em;"><?= lang('Presupuestos.totalPedido') ?></th>
|
<th style="padding-right: 0.75em;"><?= lang('Presupuestos.totalPapelPedido') ?></th>
|
||||||
<th style="padding-right: 0.75em;"><?= lang('Presupuestos.lomo') ?></th>
|
<th style="padding-right: 0.75em;"><?= lang('Presupuestos.lomo') ?></th>
|
||||||
<th style="padding-right: 0.75em;"><?= lang('Presupuestos.peso') ?></th>
|
<th style="padding-right: 0.75em;"><?= lang('Presupuestos.peso') ?></th>
|
||||||
<th style="padding-right: 0.75em;"><?= lang('Presupuestos.click') ?></th>
|
<th style="padding-right: 0.75em;"><?= lang('Presupuestos.click') ?></th>
|
||||||
@ -401,7 +401,7 @@
|
|||||||
<th style="padding-right: 0.75em;"><?= lang('Presupuestos.pliegosPedido') ?></th>
|
<th style="padding-right: 0.75em;"><?= lang('Presupuestos.pliegosPedido') ?></th>
|
||||||
<th style="padding-right: 0.75em;"><?= lang('Presupuestos.precioPliego') ?></th>
|
<th style="padding-right: 0.75em;"><?= lang('Presupuestos.precioPliego') ?></th>
|
||||||
<th style="padding-right: 0.75em;"><?= lang('Presupuestos.libro') ?></th>
|
<th style="padding-right: 0.75em;"><?= lang('Presupuestos.libro') ?></th>
|
||||||
<th style="padding-right: 0.75em;"><?= lang('Presupuestos.totalPedido') ?></th>
|
<th style="padding-right: 0.75em;"><?= lang('Presupuestos.totalPapelPedido') ?></th>
|
||||||
<th style="padding-right: 0.75em;"><?= lang('Presupuestos.lomo') ?></th>
|
<th style="padding-right: 0.75em;"><?= lang('Presupuestos.lomo') ?></th>
|
||||||
<th style="padding-right: 0.75em;"><?= lang('Presupuestos.peso') ?></th>
|
<th style="padding-right: 0.75em;"><?= lang('Presupuestos.peso') ?></th>
|
||||||
<th style="padding-right: 0.75em;"><?= lang('Presupuestos.click') ?></th>
|
<th style="padding-right: 0.75em;"><?= lang('Presupuestos.click') ?></th>
|
||||||
|
|||||||
@ -1,33 +0,0 @@
|
|||||||
<div class="accordion mt-3" id="accordionEncuadernacion">
|
|
||||||
<div class="card accordion-item active">
|
|
||||||
<h2 class="accordion-header" id="headingOne">
|
|
||||||
<button type="button" class="accordion-button" data-bs-toggle="collapse" data-bs-target="#accordionEncuadernacionTip" aria-expanded="false" aria-controls="accordionEncuadernacionTip">
|
|
||||||
<h4><?= lang("Presupuestos.encuadernacion") ?></h4>
|
|
||||||
</button>
|
|
||||||
</h2>
|
|
||||||
|
|
||||||
<div id="accordionEncuadernacionTip" class="accordion-collapse collapse show" data-bs-parent="#accordionEncuadernacion">
|
|
||||||
<div class="accordion-body">
|
|
||||||
<div class="col-md-12 col-lg-4 px-4">
|
|
||||||
<div class="mb-3">
|
|
||||||
<label for="encuadernacion" class="form-label">
|
|
||||||
<?= lang('Presupuestos.encuadernacion') ?>*
|
|
||||||
</label>
|
|
||||||
|
|
||||||
<select id="encuadernacion" name="encuadernacion" class="form-control select2bs2" style="width: 100%;">
|
|
||||||
<!---
|
|
||||||
<?php if (isset($papelFormatoList) && is_array($papelFormatoList) && !empty($papelFormatoList)) :
|
|
||||||
foreach ($papelFormatoList as $formato) : ?>
|
|
||||||
<option value="<?= $formato->id ?>" <?= $formato->id == $presupuestoEntity->papel_formato_id ? ' selected' : '' ?>>
|
|
||||||
<?= $formato->tamanio ?>
|
|
||||||
</option>
|
|
||||||
<?php endforeach;
|
|
||||||
endif; ?>
|
|
||||||
--->
|
|
||||||
</select>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
@ -1,6 +1,16 @@
|
|||||||
/*******************************
|
/*******************************
|
||||||
* Eventos asociados a elementos HTML
|
* Eventos asociados a elementos HTML
|
||||||
*******************************/
|
*******************************/
|
||||||
|
$("#solapas").on("click", function () {
|
||||||
|
var e = document.getElementById('div_solapas_ancho');
|
||||||
|
if (document.getElementById('solapas').checked) {
|
||||||
|
e.style.display = "flex";
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
e.style.display = "none";
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
$('#tipoImpresion').on("change", function () {
|
$('#tipoImpresion').on("change", function () {
|
||||||
updatePapelesComparador();
|
updatePapelesComparador();
|
||||||
});
|
});
|
||||||
@ -61,9 +71,10 @@ function init_comparador() {
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
function computarPaginasColor(string) {
|
function computarPaginasColor(string) {
|
||||||
|
|
||||||
const numbers = [];
|
var numbers = [];
|
||||||
for (const [, beginStr, endStr] of string.matchAll(/(\d+)(?:-(\d+))?/g)) {
|
for (const [, beginStr, endStr] of string.matchAll(/(\d+)(?:-(\d+))?/g)) {
|
||||||
const [begin, end] = [beginStr, endStr].map(Number);
|
const [begin, end] = [beginStr, endStr].map(Number);
|
||||||
numbers.push(begin);
|
numbers.push(begin);
|
||||||
@ -73,6 +84,17 @@ function computarPaginasColor(string) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
var numbers2 = [];
|
||||||
|
numbers.forEach(function (value, i) {
|
||||||
|
// Si es impar y no está el siguiente par hay que añadirlo
|
||||||
|
if (value % 2 != 0 && numbers[i + 1] != value + 1) {
|
||||||
|
numbers2.push(value + 1);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
numbers = numbers.concat(numbers2);
|
||||||
|
numbers.sort(function (a, b) {
|
||||||
|
return a - b;
|
||||||
|
});
|
||||||
calPagesTextarea = document.getElementById('compCalPaginasColor');
|
calPagesTextarea = document.getElementById('compCalPaginasColor');
|
||||||
calPagesTextarea.value = numbers;
|
calPagesTextarea.value = numbers;
|
||||||
autosize.update(calPagesTextarea);
|
autosize.update(calPagesTextarea);
|
||||||
|
|||||||
@ -16,7 +16,6 @@
|
|||||||
<?= !empty($validation->getErrors()) ? $validation->listErrors("bootstrap_style") : "" ?>
|
<?= !empty($validation->getErrors()) ? $validation->listErrors("bootstrap_style") : "" ?>
|
||||||
<?= view("themes/backend/vuexy/form/presupuestos/cosidotapablanda/_datosPresupuestoItems") ?>
|
<?= view("themes/backend/vuexy/form/presupuestos/cosidotapablanda/_datosPresupuestoItems") ?>
|
||||||
<?= view("themes/backend/vuexy/form/presupuestos/cosidotapablanda/_datosLibroItems") ?>
|
<?= view("themes/backend/vuexy/form/presupuestos/cosidotapablanda/_datosLibroItems") ?>
|
||||||
<?= view("themes/backend/vuexy/form/presupuestos/cosidotapablanda/_encuadernacionItems") ?>
|
|
||||||
<?= view("themes/backend/vuexy/form/presupuestos/cosidotapablanda/_datosPresupuestoClienteItems") ?>
|
<?= view("themes/backend/vuexy/form/presupuestos/cosidotapablanda/_datosPresupuestoClienteItems") ?>
|
||||||
<div class="pt-4">
|
<div class="pt-4">
|
||||||
<input type="submit"
|
<input type="submit"
|
||||||
@ -124,9 +123,7 @@
|
|||||||
allowClear: false,
|
allowClear: false,
|
||||||
});
|
});
|
||||||
|
|
||||||
$('#encuadernacion').select2({
|
|
||||||
allowClear: false,
|
|
||||||
});
|
|
||||||
|
|
||||||
|
|
||||||
<?= $this->endSection() ?>
|
<?= $this->endSection() ?>
|
||||||
@ -139,6 +136,8 @@
|
|||||||
|
|
||||||
autosize($('#compCalPaginasColor'));
|
autosize($('#compCalPaginasColor'));
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
$('#papelFormatoPersonalizado').on("click",function(){
|
$('#papelFormatoPersonalizado').on("click",function(){
|
||||||
var checkbox = document.getElementById('papelFormatoPersonalizado');
|
var checkbox = document.getElementById('papelFormatoPersonalizado');
|
||||||
if(checkbox.checked == true){
|
if(checkbox.checked == true){
|
||||||
|
|||||||
Reference in New Issue
Block a user