mirror of
https://github.com/EGroupware/egroupware.git
synced 2024-11-22 16:03:47 +01:00
Add "Allow ignore conflicts" feature for resources
This commit is contained in:
parent
8d0cdd068d
commit
aac5309c8f
@ -1873,8 +1873,36 @@ class calendar_uiforms extends calendar_ui
|
||||
'conflicts' => array_values($conflicts), // conflicts have id-start as key
|
||||
);
|
||||
$GLOBALS['egw_info']['flags']['app_header'] = lang('calendar') . ' - ' . lang('Scheduling conflict');
|
||||
|
||||
$resources_config = config::read('resources');
|
||||
$readonlys = array();
|
||||
if($event['participant_types']['r'] && $resources_config) // resources Allow ignore conflicts
|
||||
{
|
||||
|
||||
$etpl->exec('calendar.calendar_uiforms.process_edit',$content,false,false,array_merge($event,$preserv),$preserv['no_popup'] ? 0 : 2);
|
||||
switch ($resources_config['ignoreconflicts'])
|
||||
{
|
||||
case 'no':
|
||||
$readonlys['button[ignore]'] = true;
|
||||
break;
|
||||
case 'allusers':
|
||||
$readonlys['button[ignore]'] = false;
|
||||
break;
|
||||
default:
|
||||
foreach ($event['participants'] as $pIds => $val)
|
||||
{
|
||||
if ($val != 'ACHAIR')
|
||||
{
|
||||
if (!$this->bo->check_status_perms($pIds, $event))
|
||||
{
|
||||
$readonlys['button[ignore]'] = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
$etpl->exec('calendar.calendar_uiforms.process_edit',$content,false,$readonlys,array_merge($event,$preserv),$preserv['no_popup'] ? 0 : 2);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -23,6 +23,18 @@
|
||||
</select>
|
||||
</td>
|
||||
</tr>
|
||||
<tr class="row_on">
|
||||
<td>
|
||||
{lang_Allow_ignore_conflicts}
|
||||
</td>
|
||||
<td>
|
||||
<select name="newsettings[ignoreconflicts]">
|
||||
<option value=""{selected_ignoreconflicts_directbooking}>{lang_Yes,_only_users_with_direct_booking_permission}</option>
|
||||
<option value="allusers"{selected_ignoreconflicts_allusers}>{lang_Yes,_all_users_can_ignore_conflicts}</option>
|
||||
<option value="no">{lang_No}</option>
|
||||
</select>
|
||||
</td>
|
||||
</tr>
|
||||
<!-- END body -->
|
||||
|
||||
<!-- BEGIN footer -->
|
||||
|
Loading…
Reference in New Issue
Block a user