mirror of
https://git.imnavajas.es/jjimenez/safekat.git
synced 2025-07-25 22:52:08 +00:00
terminado la parte de datos del libro
This commit is contained in:
@ -34,6 +34,20 @@ class Cosidotapablanda extends \App\Controllers\GoBaseResourceController
|
||||
|
||||
$this->viewData['pageTitle'] = lang('Presupuestos.moduleTitleCosidoTB');
|
||||
$this->viewData['usingSweetAlert'] = true;
|
||||
|
||||
// Se indica que este controlador trabaja con soft_delete
|
||||
$this->soft_delete = true;
|
||||
// Se indica el flag para los ficheros borrados
|
||||
$this->delete_flag = 1;
|
||||
|
||||
$this->viewData = ['usingServerSideDataTable' => true]; // JJO
|
||||
|
||||
// Breadcrumbs
|
||||
$this->viewData['breadcrumb'] = [
|
||||
['title' => lang("App.menu_presupuestos"), 'route' => "javascript:void(0);", 'active' => false],
|
||||
['title' => lang("App.menu_libros_cosido_tapa_blanda"), 'route' => site_url('presupuestos/cosidotapablanda'), 'active' => true]
|
||||
];
|
||||
|
||||
parent::initController($request, $response, $logger);
|
||||
$this->model = new PresupuestoModel();
|
||||
}
|
||||
@ -50,13 +64,6 @@ class Cosidotapablanda extends \App\Controllers\GoBaseResourceController
|
||||
|
||||
];
|
||||
|
||||
// Se indica que este controlador trabaja con soft_delete
|
||||
$this->soft_delete = true;
|
||||
// Se indica el flag para los ficheros borrados
|
||||
$this->delete_flag = 1;
|
||||
|
||||
$this->viewData = ['usingServerSideDataTable' => true]; // JJO
|
||||
|
||||
$viewData = array_merge($this->viewData, $viewData); // merge any possible values from the parent controller class
|
||||
|
||||
return view(static::$viewPath . 'viewCosidotapablandaList', $viewData);
|
||||
|
||||
@ -25,6 +25,7 @@ class PresupuestoEntity extends \CodeIgniter\Entity\Entity
|
||||
"ferro" => false,
|
||||
"ferro_digital" => false,
|
||||
"marcapaginas" => false,
|
||||
"prototipo" => false,
|
||||
"papel_formato_id" => null,
|
||||
"papel_formato_personalizado" => false,
|
||||
"papel_formato_ancho" => null,
|
||||
@ -189,6 +190,7 @@ class PresupuestoEntity extends \CodeIgniter\Entity\Entity
|
||||
"ferro" => "boolean",
|
||||
"ferro_digital" => "boolean",
|
||||
"marcapaginas" => "boolean",
|
||||
"prototipo" => "boolean",
|
||||
"papel_formato_id" => "int",
|
||||
"papel_formato_personalizado" => "boolean",
|
||||
"papel_formato_ancho" => "?float",
|
||||
|
||||
@ -43,6 +43,8 @@ return [
|
||||
'imagenesBnInterior' => 'B/W pictures inside',
|
||||
'recogerEnTaller' => 'Pick up in workshop',
|
||||
'marcapaginas' => 'Bookmark',
|
||||
'merma' => 'Weakening',
|
||||
'mermaportada' => 'Cover weakening',
|
||||
|
||||
|
||||
/* '4x0' => '4x0',
|
||||
|
||||
@ -43,6 +43,8 @@ return [
|
||||
'imagenesBnInterior' => 'Imágenes B/N interior',
|
||||
'recogerEnTaller' => 'Recoger en taller',
|
||||
'marcapaginas' => 'Marcapáginas',
|
||||
'merma' => 'Merma',
|
||||
'mermaportada' => 'Merma portada',
|
||||
|
||||
|
||||
/* '4x0' => '4x0',
|
||||
|
||||
@ -46,6 +46,7 @@ class PresupuestoModel extends \App\Models\GoBaseModel
|
||||
"ferro",
|
||||
"ferro_digital",
|
||||
"marcapaginas",
|
||||
"prototipo",
|
||||
"papel_formato_id",
|
||||
"papel_formato_personalizado",
|
||||
"papel_formato_ancho",
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
<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="#accordionDatosLibroTip" aria-expanded="false" aria-controls="accordionDatosLibroTip">
|
||||
<h3><?= lang("Presupuestos.datosLibro") ?></h3>
|
||||
<h4><?= lang("Presupuestos.datosLibro") ?></h4>
|
||||
</button>
|
||||
</h2>
|
||||
|
||||
@ -32,7 +32,7 @@
|
||||
|
||||
<div class="col-md-12 col-lg-4 px-4">
|
||||
<div class="mb-3">
|
||||
<label for="papelFormatoId" class="form-label">
|
||||
<label id="label_papelFormatoId" for="papelFormatoId" class="form-label">
|
||||
<?=lang('Presupuestos.papelFormatoId') ?>*
|
||||
</label>
|
||||
|
||||
@ -46,6 +46,22 @@
|
||||
<?php endforeach;
|
||||
endif; ?>
|
||||
</select>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-12 col-lg-6">
|
||||
<div class="mb-3">
|
||||
<input style="display: none"type="number" id="papelFormatoAncho" name="papel_formato_ancho" maxLength="8" step="0.01" class="form-control" value="<?=old('papel_formato_ancho', $presupuestoEntity->papel_formato_ancho) ?>">
|
||||
</div><!--//.mb-3 -->
|
||||
</div><!--//.col -->
|
||||
|
||||
<div class="col-md-12 col-lg-6">
|
||||
<div class="mb-3">
|
||||
<input style="display: none" type="number" id="papelFormatoAlto" name="papel_formato_alto" maxLength="8" step="0.01" class="form-control" value="<?=old('papel_formato_alto', $presupuestoEntity->papel_formato_alto) ?>">
|
||||
</div><!--//.mb-3 -->
|
||||
</div><!--//.col -->
|
||||
</div>
|
||||
|
||||
|
||||
<div class="form-check form-switch mb-2">
|
||||
<input class="form-check-input" type="checkbox" id="papelFormatoPersonalizado" name="papel_formato_personalizado" value="1" <?=$presupuestoEntity->papel_formato_personalizado== true ? 'checked' : ''; ?>>
|
||||
<label class="form-check-label" for="papelFormatoPersonalizado"><?=lang('Presupuestos.papelFormatoPersonalizado') ?></label>
|
||||
@ -78,58 +94,10 @@
|
||||
|
||||
<!-- Fila 2 -->
|
||||
<div class="row">
|
||||
<div class="col-md-12 col-lg-2 px-4">
|
||||
|
||||
</div><!--//.col -->
|
||||
|
||||
<div class="col-md-12 col-lg-2 px-4">
|
||||
|
||||
</div><!--//.col -->
|
||||
|
||||
|
||||
<div class="col-md-12 col-lg-2 px-4">
|
||||
<div class="mb-3">
|
||||
<label style="display: none" id="label_papelFormatoAncho" for="papelFormatoAncho" class="form-label">
|
||||
<?=lang('Presupuestos.papelFormatoAncho') ?>
|
||||
</label>
|
||||
<input style="display: none"type="number" id="papelFormatoAncho" name="papel_formato_ancho" maxLength="8" step="0.01" class="form-control" value="<?=old('papel_formato_ancho', $presupuestoEntity->papel_formato_ancho) ?>">
|
||||
</div><!--//.mb-3 -->
|
||||
</div><!--//.col -->
|
||||
|
||||
<div class="col-md-12 col-lg-2 px-4">
|
||||
<div class="mb-3">
|
||||
<label style="display: none" id="label_papelFormatoAlto" for="papelFormatoAlto" class="form-label">
|
||||
<?=lang('Presupuestos.papelFormatoAlto') ?>
|
||||
</label>
|
||||
<input style="display: none" type="number" id="papelFormatoAlto" name="papel_formato_alto" maxLength="8" step="0.01" class="form-control" value="<?=old('papel_formato_alto', $presupuestoEntity->papel_formato_alto) ?>">
|
||||
</div><!--//.mb-3 -->
|
||||
|
||||
</div><!--//.col -->
|
||||
|
||||
|
||||
<div class="col-md-12 col-lg-2 px-4">
|
||||
</div><!--//.col -->
|
||||
|
||||
</div> <!--//.row -->
|
||||
|
||||
<!-- Fila 3 -->
|
||||
<div class="row">
|
||||
|
||||
<div class="col-md-12 col-lg-3 px-4">
|
||||
<div class="col-md-12 col-lg-4 px-4">
|
||||
<div class="mb-3">
|
||||
<div class="form-check">
|
||||
<label for="cosido" class="form-check-label">
|
||||
<input type="checkbox" id="cosido" name="cosido" value="1" class="form-check-input"<?=$presupuestoEntity->cosido== true ? 'checked' : ''; ?>>
|
||||
<?=lang('Presupuestos.cosido') ?>
|
||||
</label>
|
||||
</div><!--//.form-check -->
|
||||
</div><!--//.mb-3 -->
|
||||
</div><!--//.col -->
|
||||
|
||||
<div class="col-md-12 col-lg-3 px-4">
|
||||
<div class="mb-3">
|
||||
<div class="form-check">
|
||||
|
||||
<label for="ferro" class="form-check-label">
|
||||
<input type="checkbox" id="ferro" name="ferro" value="1" class="form-check-input"<?=$presupuestoEntity->ferro== true ? 'checked' : ''; ?>>
|
||||
<?=lang('Presupuestos.ferro') ?>
|
||||
@ -138,10 +106,10 @@
|
||||
</div><!--//.mb-3 -->
|
||||
</div><!--//.col -->
|
||||
|
||||
<div class="col-md-12 col-lg-3 px-4">
|
||||
|
||||
<div class="col-md-12 col-lg-4 px-4">
|
||||
<div class="mb-3">
|
||||
<div class="form-check">
|
||||
|
||||
<label for="ferroDigital" class="form-check-label">
|
||||
<input type="checkbox" id="ferroDigital" name="ferro_digital" value="1" class="form-check-input"<?=$presupuestoEntity->ferro_digital== true ? 'checked' : ''; ?>>
|
||||
<?=lang('Presupuestos.ferroDigital') ?>
|
||||
@ -150,8 +118,19 @@
|
||||
</div><!--//.mb-3 -->
|
||||
</div><!--//.col -->
|
||||
|
||||
<div class="col-md-12 col-lg-3 px-4">
|
||||
Prototipo
|
||||
|
||||
<div class="col-md-12 col-lg-4 px-4">
|
||||
<div class="mb-3">
|
||||
<div class="form-check">
|
||||
<label for="prototipo" class="form-check-label">
|
||||
<input type="checkbox" id="prototipo" name="prototipo" value="1" class="form-check-input"<?=$presupuestoEntity->prototipo== true ? 'checked' : ''; ?>>
|
||||
<?=lang('Presupuestos.prototipo') ?>
|
||||
</label>
|
||||
</div><!--//.form-check -->
|
||||
</div><!--//.mb-3 -->
|
||||
<div class="mb-3">
|
||||
|
||||
</div><!--//.mb-3 -->
|
||||
</div><!--//.col -->
|
||||
|
||||
</div> <!--//.row -->
|
||||
@ -160,7 +139,7 @@
|
||||
<!-- Fila 4 -->
|
||||
<div class="row">
|
||||
|
||||
<div class="col-md-12 col-lg-3 px-4">
|
||||
<div class="col-md-12 col-lg-4 px-4">
|
||||
<div class="mb-3">
|
||||
<div class="form-check">
|
||||
<label for="imagenesBnInterior" class="form-check-label">
|
||||
@ -171,7 +150,7 @@
|
||||
</div><!--//.mb-3 -->
|
||||
</div><!--//.col -->
|
||||
|
||||
<div class="col-md-12 col-lg-3 px-4">
|
||||
<div class="col-md-12 col-lg-4 px-4">
|
||||
<div class="mb-3">
|
||||
<div class="form-check">
|
||||
<label for="recogerEnTaller" class="form-check-label">
|
||||
@ -182,7 +161,7 @@
|
||||
</div><!--//.mb-3 -->
|
||||
</div><!--//.col -->
|
||||
|
||||
<div class="col-md-12 col-lg-3 px-4">
|
||||
<div class="col-md-12 col-lg-4 px-4">
|
||||
<div class="mb-3">
|
||||
<div class="form-check">
|
||||
<label for="marcapaginas" class="form-check-label">
|
||||
@ -195,6 +174,9 @@
|
||||
|
||||
</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-collapse -->
|
||||
</div> <!-- //.accordion-item -->
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
<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="#accordionDatosPresupuestoTip" aria-expanded="false" aria-controls="accordionDatosPresupuestoTip">
|
||||
<h3><?= lang("Presupuestos.datosPresupuesto") ?></h3>
|
||||
<h4><?= lang("Presupuestos.datosPresupuesto") ?></h4>
|
||||
</button>
|
||||
</h2>
|
||||
|
||||
|
||||
@ -68,6 +68,9 @@
|
||||
allowClear: false,
|
||||
});
|
||||
|
||||
$('#papelFormatoId').select2({
|
||||
allowClear: false,
|
||||
});
|
||||
|
||||
<?= $this->endSection() ?>
|
||||
|
||||
@ -79,18 +82,19 @@
|
||||
$('#papelFormatoPersonalizado').on("click",function(){
|
||||
var checkbox = document.getElementById('papelFormatoPersonalizado');
|
||||
if(checkbox.checked == true){
|
||||
document.getElementById("label_papelFormatoAncho").style.display = "block";
|
||||
document.getElementById("papelFormatoAncho").style.display = "block";
|
||||
document.getElementById("label_papelFormatoAlto").style.display = "block";
|
||||
document.getElementById("papelFormatoAlto").style.display = "block";
|
||||
document.getElementById("papelFormatoId").disabled = true;
|
||||
$('#papelFormatoId').next(".select2-container").hide();
|
||||
document.getElementById("label_papelFormatoId").innerHTML =
|
||||
"<?=lang('Presupuestos.papelFormatoId') ?> (" +
|
||||
"<?=lang('Presupuestos.papelFormatoAncho') ?> x <?=lang('Presupuestos.papelFormatoAncho') ?>)*";
|
||||
}
|
||||
else{
|
||||
document.getElementById("label_papelFormatoAncho").style.display = "none";
|
||||
document.getElementById("papelFormatoAncho").style.display = "none";
|
||||
document.getElementById("label_papelFormatoAlto").style.display = "none";
|
||||
document.getElementById("papelFormatoAlto").style.display = "none";
|
||||
document.getElementById("papelFormatoId").disabled = false;
|
||||
$('#papelFormatoId').next(".select2-container").show();
|
||||
document.getElementById("label_papelFormatoId").innerHTML =
|
||||
"<?=lang('Presupuestos.papelFormatoId') ?>*";
|
||||
}
|
||||
});
|
||||
<?= $this->endSection() ?>
|
||||
|
||||
Reference in New Issue
Block a user