mirror of
https://github.com/devcode-it/openstamanager.git
synced 2024-12-24 14:31:42 +01:00
Fix selezione sottocategorie in Combinazioni
This commit is contained in:
parent
f22794bb24
commit
2484ac2d6f
@ -21,7 +21,6 @@ echo '
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-6">
|
||||
'.Modules::link('Categorie articoli', $record['id_categoria'], null, null, 'class="pull-right"').'
|
||||
{[ "type": "select", "label": "'.tr('Categoria').'", "name": "id_categoria", "required": 0, "value": "$id_categoria$", "ajax-source": "categorie", "icon-after": "add|'.Modules::get('Categorie articoli')['id'].'" ]}
|
||||
</div>
|
||||
|
||||
@ -44,4 +43,12 @@ echo '
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</form>';
|
||||
</form>
|
||||
|
||||
<script>
|
||||
$("#id_categoria").change(function() {
|
||||
updateSelectOption("id_categoria", $(this).val());
|
||||
|
||||
$("#id_sottocategoria").val(null).trigger("change");
|
||||
});
|
||||
</script>';
|
||||
|
@ -26,8 +26,12 @@ echo '
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-6">
|
||||
'.Modules::link('Categorie articoli', $record['id_categoria'], null, null, 'class="pull-right"').'
|
||||
<div class="col-md-6">';
|
||||
if (!empty($record['id_categoria'])) {
|
||||
echo '
|
||||
'.Modules::link('Categorie articoli', $record['id_categoria'], null, null, 'class="pull-right"');
|
||||
}
|
||||
echo '
|
||||
{[ "type": "select", "label": "'.tr('Categoria').'", "name": "id_categoria", "required": 0, "value": "$id_categoria$", "ajax-source": "categorie", "icon-after": "add|'.Modules::get('Categorie articoli')['id'].'" ]}
|
||||
</div>
|
||||
|
||||
@ -127,4 +131,10 @@ function generaVarianti(button) {
|
||||
backto: "record-edit",
|
||||
});
|
||||
}
|
||||
|
||||
$("#id_categoria").change(function() {
|
||||
updateSelectOption("id_categoria", $(this).val());
|
||||
|
||||
$("#id_sottocategoria").val(null).trigger("change");
|
||||
});
|
||||
</script>';
|
||||
|
Loading…
Reference in New Issue
Block a user