mirror of
https://github.com/EGroupware/egroupware.git
synced 2024-12-26 00:29:38 +01:00
Add "Allow ignore conflicts" feature for resources
This commit is contained in:
parent
6f74c42111
commit
8147adcb95
@ -1793,8 +1793,35 @@ 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)
|
||||
{
|
||||
|
||||
$etpl->exec('calendar.calendar_uiforms.process_edit',$content,array(),array(),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;
|
||||
case 'directbooking':
|
||||
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,array(),$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="no">{lang_No}</option>
|
||||
<option value="allusers"{selected_ignoreconflicts_allusers}>{lang_Yes,_all_users_ignore_conflicts}</option>
|
||||
<option value="directbooking"{selected_ignoreconflicts_directbooking}>{lang_Yes,_only_users_with_direct_booking_permission}</option>
|
||||
</select>
|
||||
</td>
|
||||
</tr>
|
||||
<!-- END body -->
|
||||
|
||||
<!-- BEGIN footer -->
|
||||
|
Loading…
Reference in New Issue
Block a user