atr_file_process

Versions
6.1
atr_file_process($element, $form_state)

Form process handler for 'atr_file'.

Code

atr/atr.module, line 542

<?php
function atr_file_process($element, $form_state) {
  $tar = atr_app_exists('tar') ? ' ' . t('!tar files are supported.', array('!tar' => '<code>*.tar.gz</code>')) : NULL;
  $element[$element['#name'] . '_online'] = array(
    '#type' => 'textfield',
    '#title' => t('Online file'),
    '#description' => t('The directory or file that needs to be reviewed. Files may be located on another website.') . $tar,
    // We trigger validation for the entire 'atr_file' element through this
    // textfield.
    '#element_validate' => array('atr_file_validate'),
  );
  $element[$element['#name'] . '_upload'] = array(
    '#type' => 'file',
    '#title' => t('File upload'),
    '#description' => $tar,
  );
  // Unset the wrapper element's type. Otherwise the child elements won't be rendered.
  unset($element['#type']);

  return $element;
}
?>