You are here

function onepixelout_admin_form in SWF Tools 6

Same name and namespace in other branches
  1. 5 onepixelout/onepixelout.module \onepixelout_admin_form()
  2. 6.2 onepixelout/onepixelout.admin.inc \onepixelout_admin_form()
1 string reference to 'onepixelout_admin_form'
onepixelout_menu in onepixelout/onepixelout.module
Implementation of hook_menu().

File

onepixelout/onepixelout.admin.inc, line 3

Code

function onepixelout_admin_form() {
  $saved = _onepixelout_settings();
  $form = array();
  $form['onepixelout_mediaplayer']['autostart'] = array(
    '#type' => 'select',
    '#options' => array(
      'yes' => 'yes',
      'no' => 'no',
    ),
    '#default_value' => $saved['autostart'],
    '#title' => t('Autostart'),
    '#description' => t('Automatically start playing the MP3. (<em>autostart</em>)'),
  );
  $form['onepixelout_mediaplayer']['loop'] = array(
    '#type' => 'select',
    '#options' => array(
      'yes' => 'yes',
      'no' => 'no',
    ),
    '#default_value' => $saved['loop'],
    '#title' => t('Loop'),
    '#description' => t('Loop the sound file back to the beginning when done. (<em>loop</em>)'),
  );
  $form['onepixelout_mediaplayer']['map'] = array(
    '#value' => '<img src="http://www.1pixelout.net/wp-content/plugins/audio-player/map.gif" alt="Player Map" />',
  );
  unset($saved['loop']);
  unset($saved['autostart']);
  foreach ($saved as $key => $color) {
    $form['onepixelout_mediaplayer'][$key] = array(
      '#type' => 'textfield',
      '#default_value' => $color,
      '#size' => 8,
      '#maxlength' => 8,
      '#title' => t($key . ' color'),
      '#description' => t('Hexadecimal color of the format 0xRRGGBB'),
    );
  }
  $form['submit'] = array(
    '#type' => 'submit',
    '#value' => t('Save configuration'),
  );
  $form['reset'] = array(
    '#type' => 'submit',
    '#value' => t('Reset to defaults'),
  );
  $form['#theme'] = 'system_settings_form';
  return $form;
}