mirror of
https://github.com/devcode-it/openstamanager.git
synced 2025-02-02 17:07:01 +01:00
Fix inserimento checklist non associate ad utenti o gruppi
This commit is contained in:
parent
8677b6aec8
commit
5bc8ba3a9a
22
actions.php
22
actions.php
@ -259,11 +259,15 @@ elseif (filter('op') == 'copia-checklist') {
|
||||
$content = post('content');
|
||||
$checklist_id = post('checklist');
|
||||
|
||||
$users = post('assigned_users');
|
||||
$users = array_clean($users);
|
||||
|
||||
$group_id = post('group_id');
|
||||
if (!empty(post('assigned_users'))){
|
||||
$users = post('assigned_users');
|
||||
$users = array_clean($users);
|
||||
}
|
||||
|
||||
if (!empty(post('group_id'))){
|
||||
$group_id = post('group_id');
|
||||
}
|
||||
|
||||
$checklist = Checklist::find($checklist_id);
|
||||
$checklist->copia($user, $id_record, $users, $group_id);
|
||||
}
|
||||
@ -273,10 +277,14 @@ elseif (filter('op') == 'aggiungi-check') {
|
||||
$content = post('content');
|
||||
$parent_id = post('parent') ?: null;
|
||||
|
||||
$users = post('assigned_users');
|
||||
$users = array_clean($users);
|
||||
if (!empty(post('assigned_users'))){
|
||||
$users = post('assigned_users');
|
||||
$users = array_clean($users);
|
||||
}
|
||||
|
||||
$group_id = post('group_id');
|
||||
if (!empty(post('group_id'))){
|
||||
$group_id = post('group_id');
|
||||
}
|
||||
|
||||
$check = Check::build($user, $structure, $id_record, $content, $parent_id);
|
||||
$check->setAccess($users, $group_id);
|
||||
|
@ -34,7 +34,7 @@ echo '
|
||||
<form action="" method="post" id="check-form">
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
{[ "type": "select", "label": "'.tr('Checklist').'", "name": "checklist", "values": '.json_encode($list).' ]}
|
||||
{[ "type": "select", "label": "'.tr('Checklist').'", "name": "checklist", "values": '.json_encode($list).', "required": 1 ]}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user