You are here

function layout_breakpoint_edit_form in Layout 7

Breakpoint item settings form.

See also

layout_breakpoint_edit_form_validate().

1 string reference to 'layout_breakpoint_edit_form'
layout_breakpoint.inc in plugins/export_ui/layout_breakpoint.inc

File

plugins/export_ui/layout_breakpoint.inc, line 38

Code

function layout_breakpoint_edit_form(&$form, $form_state) {
  $breakpoint = $form_state['item'];

  // Common form elements are already provided by ctools for admin_title
  // (human readable label) and name (machine name).
  $form['width'] = array(
    '#type' => 'textfield',
    '#title' => t('Breakpoint'),
    // http://blog.cloudfour.com/the-ems-have-it-proportional-media-queries-ftw/
    // has some great points for em based responsive layouts, we allow for pixel
    // and em based layouts so long as the same unit is used. We do not explicitly
    // deny separate units, but our orderings assumes the same unit is used.
    '#description' => t('Width point where this breakpoint is applied. Examples: 960px, 41em. Do not mix pixel and em based widths.'),
    '#default_value' => @$breakpoint->width,
  );
  $form['grid_name'] = array(
    '#type' => 'select',
    '#options' => layout_breakpoint_grid_name_list(),
    '#default_value' => @$breakpoint->grid_name,
    '#description' => t('Grid to be applied to this breakpoint. <a href="@editgrids">You can edit and add grids</a>.', array(
      '@editgrids' => url('admin/structure/panels/layouts/grids'),
    )),
  );
}