You are here

function iek_image_border_form in Image effect kit 7

Effect configuration form for iek_image_border.

1 string reference to 'iek_image_border_form'
iek_image_effect_info in ./iek.module
Implements hook_image_effect_info().

File

./iek.module, line 324
Primarily Drupal hooks and global API functions to manipulate image styles.

Code

function iek_image_border_form($data) {
  $form['border_color'] = array(
    '#type' => 'textfield',
    '#title' => t('Border color'),
    '#default_value' => isset($data['border_color']) ? $data['border_color'] : '#ededed',
    '#required' => TRUE,
    '#size' => 10,
    '#element_validate' => array(
      'iek_image_effect_color_validate',
    ),
    '#allow_natural_number' => array(
      'zero',
      'positive',
    ),
  );
  $form['border_thick_top'] = array(
    '#type' => 'textfield',
    '#title' => t('Border thick - top'),
    '#default_value' => isset($data['border_thick_top']) ? $data['border_thick_top'] : '5',
    '#field_suffix' => ' ' . t('pixels'),
    '#required' => TRUE,
    '#size' => 5,
    '#element_validate' => array(
      'iek_effect_natural_number_validate',
    ),
    '#allow_natural_number' => array(
      'zero',
      'positive',
    ),
  );
  $form['border_thick_right'] = array(
    '#type' => 'textfield',
    '#title' => t('Border thick - right'),
    '#default_value' => isset($data['border_thick_right']) ? $data['border_thick_right'] : '5',
    '#field_suffix' => ' ' . t('pixels'),
    '#required' => TRUE,
    '#size' => 5,
    '#element_validate' => array(
      'iek_effect_natural_number_validate',
    ),
    '#allow_natural_number' => array(
      'zero',
      'positive',
    ),
  );
  $form['border_thick_bottom'] = array(
    '#type' => 'textfield',
    '#title' => t('Border thick - bottom'),
    '#default_value' => isset($data['border_thick_bottom']) ? $data['border_thick_bottom'] : '5',
    '#field_suffix' => ' ' . t('pixels'),
    '#required' => TRUE,
    '#size' => 5,
    '#element_validate' => array(
      'iek_effect_natural_number_validate',
    ),
    '#allow_natural_number' => array(
      'zero',
      'positive',
    ),
  );
  $form['border_thick_left'] = array(
    '#type' => 'textfield',
    '#title' => t('Border thick - left'),
    '#default_value' => isset($data['border_thick_left']) ? $data['border_thick_left'] : '5',
    '#field_suffix' => ' ' . t('pixels'),
    '#required' => TRUE,
    '#size' => 5,
    '#element_validate' => array(
      'iek_effect_natural_number_validate',
    ),
    '#allow_natural_number' => array(
      'zero',
      'positive',
    ),
  );
  return $form;
}