function rules_ui_confirm_operations

Gets the confirmation question for valid operations, or else FALSE.

1 call to rules_ui_confirm_operations()
rules_ui_form_rules_config_confirm_op in ui/ui.forms.inc
Confirmation form for applying the operation to the config.

File

ui/ui.forms.inc, line 165

Code

function rules_ui_confirm_operations($op, $rules_config) {
    $vars = array(
        '%plugin' => $rules_config->plugin(),
        '%label' => $rules_config->label(),
    );
    switch ($op) {
        case 'enable':
            return array(
                t('Are you sure you want to enable the %plugin %label?', $vars),
                '',
            );
        case 'disable':
            return array(
                t('Are you sure you want to disable the %plugin %label?', $vars),
                '',
            );
        case 'revert':
            return array(
                t('Are you sure you want to revert the %plugin %label?', $vars),
                t('This action cannot be undone.'),
            );
        case 'delete':
            return array(
                t('Are you sure you want to delete the %plugin %label?', $vars),
                t('This action cannot be undone.'),
            );
        default:
            return FALSE;
    }
}