1
0
mirror of https://github.com/devcode-it/openstamanager.git synced 2024-12-25 06:55:05 +01:00

Correzioni minori sui select

This commit is contained in:
Dasc3er 2020-10-30 17:15:33 +01:00
parent 4d1217e3a9
commit b7316eb837
2 changed files with 2 additions and 2 deletions

View File

@ -39,7 +39,7 @@ function menuSelection($element, $group_id, $depth, $perms_values, $perms_names)
<tr>
<td>'.str_repeat('&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;', $depth).$name.'</td>
<td>
<select name="permesso" class="form-control superselect" onchange="update_permissions('.$element['id'].', $(this).find(\'option:selected\').val())">';
<select name="permesso_'.$element['id'].'" id="permesso_'.$element['id'].'" class="form-control superselect openstamanager-input select-input" onchange="update_permissions('.$element['id'].', $(this).find(\'option:selected\').val())">';
// Permessi
$rsp = $dbo->fetchArray('SELECT permessi FROM zz_permissions WHERE idgruppo='.prepare($group_id).' AND idmodule='.prepare($element['id']));

View File

@ -277,7 +277,7 @@ class HTMLWrapper implements WrapperInterface
$value = (empty($pieces[2]) || !in_array($pieces[2], array_column($choices, 'id'))) ? $choices[0]['id'] : $pieces[2];
$result = '{[ "type": "select", "name": "tipo_'.prepareToField($values['name']).'", "value": "'.prepareToField($value).'", "values": '.json_encode($choices).', "class": "no-search", "extra": "'.$extra.'" ]}';
$result = '{[ "type": "select", "name": "tipo_'.prepareToField($values['name']).'", "id": "tipo_'.prepareToField($values['name']).'_'.rand(0, 99).'", "value": "'.prepareToField($value).'", "values": '.json_encode($choices).', "class": "no-search", "extra": "'.$extra.'" ]}';
$result = \HTMLBuilder\HTMLBuilder::replace($result);