mirror of
https://github.com/devcode-it/openstamanager.git
synced 2025-02-23 06:47:40 +01:00
Aggiunta possibilità di aggiungere altri attributi ad una combinazione esistente
This commit is contained in:
parent
eb71e46b3a
commit
998f9b8bce
@ -27,9 +27,7 @@ switch (filter('op')) {
|
||||
$id_record = $combinazione->id;
|
||||
|
||||
// Selezione attributi per la combinazione
|
||||
if ($combinazione->articoli()->count() == 0) {
|
||||
$combinazione->attributi()->sync((array) post('attributi'));
|
||||
}
|
||||
$combinazione->attributi()->sync((array) post('attributi'));
|
||||
|
||||
flash()->info(tr('Combinazione aggiornata correttamente!'));
|
||||
} else {
|
||||
|
@ -38,7 +38,7 @@ echo '
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
{[ "type": "select", "label": "'.tr('Attributi').'", "name": "attributi[]", "value": "'.implode(',', $combinazione->attributi->pluck('id')->all()).'", "values": "query=SELECT id, nome AS descrizione FROM mg_attributi WHERE deleted_at IS NULL", "required": 1, "multiple": 1, "help": "'.tr('Attributi abilitati per la combinazione corrente').'", "disabled": "'.($numero_varianti !== 0).'" ]}
|
||||
{[ "type": "select", "label": "'.tr('Attributi').'", "name": "attributi[]", "value": "'.implode(',', $combinazione->attributi->pluck('id')->all()).'", "values": "query=SELECT id, nome AS descrizione FROM mg_attributi WHERE deleted_at IS NULL", "required": 1, "multiple": 1, "help": "'.tr('Attributi abilitati per la combinazione corrente').'" ]}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
Loading…
x
Reference in New Issue
Block a user