You are here

function lingotek_clear_exceptions_form in Lingotek Translation 7.6

Same name and namespace in other branches
  1. 7.5 lingotek.module \lingotek_clear_exceptions_form()
1 string reference to 'lingotek_clear_exceptions_form'
lingotek_clear_exceptions_modal in ./lingotek.module

File

./lingotek.module, line 2558

Code

function lingotek_clear_exceptions_form($form, $form_state) {
  $profile_options = lingotek_get_profiles_by_name();
  $content_type = $form_state['bundle_name'];
  $entity_profiles = variable_get('lingotek_entity_profiles');
  $profile_index = $entity_profiles['node'][$content_type];
  $profile = $profile_options[$profile_index];
  $description = t("This will apply the selected profile (@profile) to all @content_type nodes that have previously been configured independent of the rest of their content type. Note: some settings may remain different such as vault, project, workflow, and translation method (node-based/field-based).", array(
    '@profile' => $profile,
    '@content_type' => $content_type,
  ));
  $form['clear_exceptions'] = array(
    '#type' => 'fieldset',
    '#title' => t('Clear Profile Exceptions'),
    '#description' => filter_xss($description),
  );
  $form['clear_exceptions']['submit'] = array(
    '#type' => 'submit',
    '#value' => t('Submit'),
  );
  $form['bundle_name'] = array(
    '#type' => 'hidden',
    '#value' => $content_type,
  );
  return $form;
}