function accessibility_test_add_form

cis7 accessibility.module accessibility_test_add_form($form, &$form_state, $test)
cle7 accessibility.module accessibility_test_add_form($form, &$form_state, $test)
elmsmedia7 accessibility.module accessibility_test_add_form($form, &$form_state, $test)
icor7 accessibility.module accessibility_test_add_form($form, &$form_state, $test)
meedjum_blog7 accessibility.module accessibility_test_add_form($form, &$form_state, $test)
mooc7 accessibility.module accessibility_test_add_form($form, &$form_state, $test)

Form for saving accessibiliy test entities.

1 string reference to 'accessibility_test_add_form'
accessibility_test_add in sites/all/modules/ulmus/accessibility/accessibility.module
New accessibility test form.

File

sites/all/modules/ulmus/accessibility/accessibility.module, line 456

Code

function accessibility_test_add_form($form, &$form_state, $test) {
  $form['name'] = array(
    '#type' => 'textfield',
    '#title' => t('Test Name'),
    '#required' => TRUE,
  );

  $form['quail_name'] = array(
    '#type' => 'textfield',
    '#title' => t('QUAIL Name'),
    '#required' => TRUE,
  );

  $form['severity'] = array(
    '#type' => 'select',
    '#title' => t('Severity'),
    '#required' => TRUE,
    '#options' => array(
      ACCESSIBILITY_TEST_SEVERE => t('Severe'),
      ACCESSIBILITY_TEST_MODERATE => t('Moderate'),
      ACCESSIBILITY_TEST_SUGGESTION => t('Suggestion'),
    ),
  );

  $form['status'] = array(
    '#type' => 'checkbox',
    '#title' => t('Test is active'),
  );

  $form['submit'] = array(
    '#type' => 'submit',
    '#value' => t('Save'),
  );

  $test = new stdClass();
  $test->type = 'accessibility_test';

  field_attach_form('accessibility_test', $test, $form, $form_state);

  return $form;
}