Fix modifica sottocategorie impianti e articoli
This commit is contained in:
parent
331c21fb2c
commit
42cb3f5ee1
|
@ -50,7 +50,7 @@ if (isset($id_original)) {
|
|||
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
{[ "type": "textarea", "label": "<?php echo tr('Nota'); ?>", "name": "nota", "value": "<?php echo $categoria->nota; ?>" ]}
|
||||
{[ "type": "textarea", "label": "<?php echo tr('Nota'); ?>", "name": "nota", "value": "<?php echo $categoria->getTranslation('note'); ?>" ]}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
|
|
@ -43,7 +43,7 @@ use Models\Module;
|
|||
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
{[ "type": "textarea", "label": "<?php echo tr('Nota'); ?>", "name": "nota", "value": "$note$" ]}
|
||||
{[ "type": "textarea", "label": "<?php echo tr('Nota'); ?>", "name": "nota", "value": "<?php echo $categoria->getTranslation('note'); ?>" ]}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
@ -21,7 +21,7 @@ include_once __DIR__.'/../../core.php';
|
|||
use Modules\Articoli\Categoria;
|
||||
|
||||
if (!empty($id_record)) {
|
||||
$record = $dbo->fetchOne('SELECT * FROM `mg_categorie` LEFT JOIN `mg_categorie_lang` ON (`mg_categorie`.`id`=`mg_categorie_lang`.`id_record` AND `mg_categorie_lang`.`id_lang`='.prepare(Models\Locale::getDefault()->id).') WHERE `mg_categorie`.`id`='.prepare($id_record));
|
||||
$record = $dbo->fetchOne('SELECT `mg_categorie`.*, `mg_categorie_lang`.`title` FROM `mg_categorie` LEFT JOIN `mg_categorie_lang` ON (`mg_categorie`.`id`=`mg_categorie_lang`.`id_record` AND `mg_categorie_lang`.`id_lang`='.prepare(parameter: Models\Locale::getDefault()->id).') WHERE `mg_categorie`.`id`='.prepare($id_record));
|
||||
|
||||
$categoria = Categoria::find($id_record);
|
||||
}
|
||||
|
|
|
@ -30,7 +30,7 @@ foreach ($subcategorie as $sub) {
|
|||
<tr>
|
||||
<td>'.$sub->getTranslation('title').'</td>
|
||||
<td>'.$sub->colore.'</td>
|
||||
<td>'.$sub->nota.'</td>
|
||||
<td>'.$sub->getTranslation('note').'</td>
|
||||
<td>
|
||||
<a class="btn btn-warning btn-sm" title="Modifica riga" onclick="launch_modal(\''.tr('Modifica sottocategoria').'\', \''.base_path().'/add.php?id_module='.$id_module.'&id_record='.$sub->id.'&id_original='.$id_record.'\');"><i class="fa fa-edit"></i></a>
|
||||
<a class="btn btn-sm btn-danger ask '.(($n_articoli > 0) ? 'disabled tip' : '').'" data-backto="record-edit" data-id="'.$sub['id'].'" title="'.(($n_articoli > 0) ? 'Sottocategoria collegata a '.$n_articoli.' articoli' : '').'">
|
||||
|
|
|
@ -40,7 +40,7 @@ if (isset($id_original)) {
|
|||
|
||||
<div class="row">
|
||||
<div class="col-md-8">
|
||||
{[ "type": "text", "label": "<?php echo tr('Nome'); ?>", "name": "nome", "required": 1, "value": "$nome$" ]}
|
||||
{[ "type": "text", "label": "<?php echo tr('Nome'); ?>", "name": "nome", "required": 1, "value": "$title$" ]}
|
||||
</div>
|
||||
|
||||
<div class="col-md-4">
|
||||
|
|
|
@ -21,7 +21,7 @@ include_once __DIR__.'/../../core.php';
|
|||
use Modules\Impianti\Categoria;
|
||||
|
||||
if (!empty($id_record)) {
|
||||
$record = $dbo->fetchOne('SELECT * FROM `my_impianti_categorie` LEFT JOIN `my_impianti_categorie_lang` ON (`my_impianti_categorie`.`id`=`my_impianti_categorie_lang`.`id_record` AND `my_impianti_categorie_lang`.`id_lang` = '.prepare(Models\Locale::getDefault()->id).') WHERE `my_impianti_categorie`.`id`='.prepare($id_record));
|
||||
$record = $dbo->fetchOne('SELECT `my_impianti_categorie`.*, `my_impianti_categorie_lang`.`title` FROM `my_impianti_categorie` LEFT JOIN `my_impianti_categorie_lang` ON (`my_impianti_categorie`.`id`=`my_impianti_categorie_lang`.`id_record` AND `my_impianti_categorie_lang`.`id_lang` = '.prepare(Models\Locale::getDefault()->id).') WHERE `my_impianti_categorie`.`id`='.prepare($id_record));
|
||||
|
||||
$categoria = Categoria::find($id_record);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue