Refactor licensing section to enhance consistency and functionality
Updated resource name capitalization and added a new form for licenses. Improved modal UI to replace text inputs with a dropdown for 'Disattivo'. Adjusted backend to ensure proper data retrieval and display alignment.
This commit is contained in:
@@ -7,7 +7,7 @@ class Application_ControllerSection_Admin_Index_Licenze extends App_Controller_S
|
|||||||
public function __construct(App_Controller_Sections_Section $controller)
|
public function __construct(App_Controller_Sections_Section $controller)
|
||||||
{
|
{
|
||||||
// $this->_moduleName = 'admin';
|
// $this->_moduleName = 'admin';
|
||||||
$this->_resourceName = 'licenze';
|
$this->_resourceName = 'Licenze';
|
||||||
|
|
||||||
//Usato per abilitare la sezione filtri
|
//Usato per abilitare la sezione filtri
|
||||||
$this->_enableModalFilter = false;
|
$this->_enableModalFilter = false;
|
||||||
|
|||||||
@@ -0,0 +1,17 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
class Application_Form_Admin_Index_Licenze_Add extends Zend_Form
|
||||||
|
{
|
||||||
|
|
||||||
|
public function init()
|
||||||
|
{
|
||||||
|
|
||||||
|
$this->addElement('text', 'Disattivo',
|
||||||
|
array(
|
||||||
|
'filters' => array('StringTrim')
|
||||||
|
)
|
||||||
|
);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
@@ -11,7 +11,7 @@
|
|||||||
<div class="modal-header">
|
<div class="modal-header">
|
||||||
<h5 class="modal-title flot-left" id="myModalLabel"><i
|
<h5 class="modal-title flot-left" id="myModalLabel"><i
|
||||||
class="fa fa-fw <?= ($this->iconTitle) ? $this->iconTitle : 'fa-pencil'; ?> modal_icon"></i>
|
class="fa fa-fw <?= ($this->iconTitle) ? $this->iconTitle : 'fa-pencil'; ?> modal_icon"></i>
|
||||||
Email Template</h5>
|
Licenza</h5>
|
||||||
<button id="close-modal" type="button" class="close float-right" data-dismiss="modal"
|
<button id="close-modal" type="button" class="close float-right" data-dismiss="modal"
|
||||||
aria-hidden="true">×
|
aria-hidden="true">×
|
||||||
</button>
|
</button>
|
||||||
@@ -34,21 +34,14 @@
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="col-12">
|
<div class="col-12">
|
||||||
<div id="Codice" class="form-group row">
|
<div id="Disattivo" class="form-group row">
|
||||||
<label for="Codice" class="col-sm-2 col-form-label">Codice</label>
|
<label for="Disattivo" class="col-sm-2 col-form-label">Disattivo</label>
|
||||||
<div class="col-sm-10">
|
<div class="col-sm-10">
|
||||||
<input type="text" value="" class="form-control" id="Codice" placeholder="" name="Codice">
|
<select id="Disattivo" name="Disattivo" class="form-control">
|
||||||
<!-- Contenitore per la descrizione degli errori -->
|
<option value="">Scegli...</option>
|
||||||
<div id="input-error" class="label label-danger hidden"></div>
|
<option value="1">Si</option>
|
||||||
</div>
|
<option value="0">No</option>
|
||||||
</div>
|
</select>
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="col-12">
|
|
||||||
<div id="Nome" class="form-group row">
|
|
||||||
<label for="Nome" class="col-sm-2 col-form-label">Nome</label>
|
|
||||||
<div class="col-sm-10">
|
|
||||||
<input type="text" value="" class="form-control" id="Nome" placeholder="" name="Nome">
|
|
||||||
<!-- Contenitore per la descrizione degli errori -->
|
<!-- Contenitore per la descrizione degli errori -->
|
||||||
<div id="input-error" class="label label-danger hidden"></div>
|
<div id="input-error" class="label label-danger hidden"></div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -36,10 +36,10 @@
|
|||||||
|
|
||||||
<td>
|
<td>
|
||||||
<div class="text-center">
|
<div class="text-center">
|
||||||
<!-- <button id="edit" class="btn btn-sm btn-brand btn-flat" type="button" data-toggle="tooltip"
|
<button id="edit" class="btn btn-sm btn-brand btn-flat" type="button" data-toggle="tooltip"
|
||||||
data-container="body" title="Apri Scheda">
|
data-container="body" title="Apri Scheda">
|
||||||
<span class="far fa-file fa-fw"></span>
|
<span class="far fa-file fa-fw"></span>
|
||||||
</button>-->
|
</button>
|
||||||
<button id="delete" class="btn btn-sm bg-gray btn-flat" type="button" data-toggle="tooltip"
|
<button id="delete" class="btn btn-sm bg-gray btn-flat" type="button" data-toggle="tooltip"
|
||||||
data-container="body" title="Elimina">
|
data-container="body" title="Elimina">
|
||||||
<span class="fa fa-trash fa-fw"></span>
|
<span class="fa fa-trash fa-fw"></span>
|
||||||
|
|||||||
@@ -174,6 +174,7 @@ abstract class App_Controller_Sections_AbstractSection
|
|||||||
$dati = $this->afterUpdateFunction($dati, $id);
|
$dati = $this->afterUpdateFunction($dati, $id);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
$dati = $this->_model->getById($this->_resourceName, $id);
|
||||||
$this->_controller->view->assign($dati);
|
$this->_controller->view->assign($dati);
|
||||||
$this->_controller->render(strtolower($this->_resourceName) . '/td');
|
$this->_controller->render(strtolower($this->_resourceName) . '/td');
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user