You are here

function rules_ui_import_form in Rules 7.2

Import form for rule configurations.

1 string reference to 'rules_ui_import_form'
rules_admin_menu in rules_admin/rules_admin.module
Implements hook_menu().

File

ui/ui.forms.inc, line 549
Rules User Interface forms.

Code

function rules_ui_import_form($form, &$form_state, $base_path) {
  RulesPluginUI::$basePath = $base_path;
  RulesPluginUI::formDefaults($form, $form_state);
  $form['import'] = array(
    '#type' => 'textarea',
    '#title' => t('Import'),
    '#description' => t('Paste an exported Rules configuration here.'),
    '#rows' => 20,
  );
  $form['overwrite'] = array(
    '#title' => t('Overwrite'),
    '#type' => 'checkbox',
    '#description' => t('If checked, any existing configuration with the same identifier will be replaced by the import.'),
    '#default_value' => FALSE,
  );
  $form['submit'] = array(
    '#type' => 'submit',
    '#value' => t('Import'),
  );
  return $form;
}