You are here

public function sweaver_plugin_images::sweaver_form in Sweaver 6

Same name and namespace in other branches
  1. 7 plugins/sweaver_plugin_images/sweaver_plugin_images.inc \sweaver_plugin_images::sweaver_form()

Frontend form: add image form.

Overrides sweaver_plugin::sweaver_form

File

plugins/sweaver_plugin_images/sweaver_plugin_images.inc, line 47
Images plugin.

Class

sweaver_plugin_images
@file Images plugin.

Code

public function sweaver_form() {
  $form = array();
  if (variable_get('sweaver_plugin_images_tab', TRUE)) {
    $form['image_form']['image_description'] = array(
      '#type' => 'textfield',
      '#title' => t('Description'),
      '#description' => t('Description of the image used in the select box for files.'),
    );
    $form['image_form']['image_image'] = array(
      '#type' => 'file',
      '#title' => t('Image'),
      '#size' => '40',
      '#description' => t('Upload images which you can use as background images. Extensions are limited to jpg, jpeg, png and gif.<br />Note: there is no scaling on the images on upload.'),
    );
    $form['image_form']['image_submit'] = array(
      '#type' => 'submit',
      '#value' => t('Save image'),
    );
  }
  return $form;
}