Fix minori

This commit is contained in:
Pek5892 2024-04-23 15:25:32 +02:00
parent f57ee2ab7e
commit 672c9ce34e
4 changed files with 4 additions and 10 deletions

View File

@ -32,9 +32,6 @@ switch (filter('op')) {
$categoria->parent = $id_original ?: null;
$categoria->setTranslation('title', $nome);
$categoria->setTranslation('note', $nota);
if (Models\Locale::getDefault()->id == Models\Locale::getPredefined()->id) {
$categoria->name = $descrizione;
}
$categoria->save();
flash()->info(tr('Salvataggio completato!'));
@ -69,9 +66,6 @@ switch (filter('op')) {
flash()->error(tr('Questo nome è già stato utilizzato per un altra categoria.'));
} else {
$categoria = Categoria::build($colore);
if (Models\Locale::getDefault()->id == Models\Locale::getPredefined()->id) {
$categoria->name = $descrizione;
}
$id_record = $dbo->lastInsertedID();
$categoria->parent = $id_original;
$categoria->setTranslation('note', $nota);

View File

@ -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": "$nota$" ]}
{[ "type": "textarea", "label": "<?php echo tr('Nota'); ?>", "name": "nota", "value": "$note$" ]}
</div>
</div>
</div>

View File

@ -33,7 +33,7 @@ echo '
<div class="panel-body">
<div class="row">
<div class="col-md-6">
{[ "type": "text", "label": "'.tr('Nome').'", "name": "name", "value": "$title$", "required": 1 ]}
{[ "type": "text", "label": "'.tr('Nome').'", "name": "name", "value": "$name$", "required": 1 ]}
</div>
<div class="col-md-3">

View File

@ -60,7 +60,7 @@ switch (post('op')) {
], ['id' => $id_record]);
$dbo->update('zz_segments_lang', [
'name' => post('name'),
'title' => post('name'),
], ['id_record' => $id_record, 'id_lang' => Models\Locale::getDefault()->id]);
// Aggiornamento dei permessi relativi
@ -95,7 +95,7 @@ switch (post('op')) {
$id_record = $dbo->lastInsertedID();
$dbo->insert('zz_segments_lang', [
'name' => post('name'),
'title' => post('name'),
'id_record' => $id_record,
'id_lang' => Models\Locale::getDefault()->id,
]);