You are here

function image_hotspots_build_row in Image Hotspots 7.2

Pattern to build a row with the style elements.

1 call to image_hotspots_build_row()
image_hotspots_style_config in includes/image_hotspots.admin.inc
Builds Hotspots-style configuration form.

File

includes/image_hotspots.admin.inc, line 145
Admin configuration for module.

Code

function image_hotspots_build_row() {
  $row = array(
    '#attributes' => array(
      'class' => array(
        'container-inline',
      ),
    ),
    '#type' => 'fieldset',
  );
  $row['color'] = array(
    '#type' => 'textfield',
    '#size' => 8,
    '#maxlength' => 6,
    '#attributes' => array(
      'placeholder' => t('color'),
      'class' => array(
        'hotspot_color_field',
      ),
    ),
  );
  $row['border'] = array(
    '#prefix' => '<div class="hotspots_border_settings">',
    '#suffix' => '</div>',
  );
  $row['border']['style'] = array(
    '#type' => 'select',
    '#options' => drupal_map_assoc(array(
      'none',
      'dotted',
      'dashed',
      'solid',
      'double',
      'groove',
      'ridge',
      'inset',
      'outset',
    )),
    '#attributes' => array(
      'class' => array(
        'hotspot_border_style_field',
      ),
    ),
  );
  $row['border']['width'] = array(
    '#type' => 'textfield',
    '#size' => 5,
    '#attributes' => array(
      'placeholder' => t('width'),
      'class' => array(
        'hotspot_border_width_field',
      ),
    ),
    '#suffix' => 'px',
  );
  $row['border']['color'] = array(
    '#type' => 'textfield',
    '#size' => 8,
    '#maxlength' => 6,
    '#attributes' => array(
      'placeholder' => t('border color'),
      'class' => array(
        'hotspot_border_color_field',
      ),
    ),
  );
  $row['opacity'] = array(
    '#type' => 'textfield',
    '#number_type' => 'decimal',
    '#size' => 5,
    '#maxlength' => 7,
    '#attributes' => array(
      'placeholder' => t('opacity'),
      'class' => array(
        'hotspot_opacity_field',
      ),
    ),
    '#value' => '0.3',
  );
  $row['remove'] = array(
    '#title' => t('Remove'),
    '#type' => 'checkbox',
  );
  return $row;
}