function services_client_event_break_lock in Services Client 7.2
Form; Confirm breaking edit lock.
1 string reference to 'services_client_event_break_lock'
- services_client_ui::break_lock_page in plugins/
export_ui/ services_client_ui.class.php - Page callback; Break edit lock.
File
- ./
services_client.forms.inc, line 333
Code
function services_client_event_break_lock($form, &$form_state, $event) {
$form_state['event'] =& $event;
$form = array();
if (!($lock = $event
->getEditLock())) {
$form['message']['#markup'] = t('There is no lock on event %name to break.', array(
'%name' => $event
->getEvent()->name,
));
return $form;
}
$cancel = $event
->getUrl('configure');
if (!empty($_REQUEST['cancel'])) {
$cancel = $_REQUEST['cancel'];
}
$account = user_load($lock->uid);
return confirm_form($form, t('Are you sure you want to break the lock on event %name?', array(
'%name' => $event
->getEvent()->name,
)), $cancel, t('By breaking this lock, any unsaved changes made by !user will be lost!', array(
'!user' => theme('username', array(
'account' => $account,
)),
)), t('Break lock'), t('Cancel'));
}