function gathercontent_pages_form in GatherContent 7.2
Form constructor for selecting pages.
1 string reference to 'gathercontent_pages_form'
- gathercontent_menu in ./
gathercontent.module - Implements hook_menu().
File
- includes/
pages.inc, line 10 - Contains selecting pages to process.
Code
function gathercontent_pages_form($form, &$form_state) {
gathercontent_check_step('pages');
$obj = gathercontent_get_obj();
$obj
->getProjects();
$obj
->getStates();
$obj
->getPages();
$obj
->getStateDropdown();
$obj
->getProjectsDropdown();
$form['page_header'] = array(
'#prefix' => '<div class="gc_page_header gc_cf">',
'#suffix' => '</div>',
);
$form['page_header']['title'] = array(
'#markup' => '<h2>' . check_plain(t('Choose pages to import')) . '</h2>',
);
$form['page_header']['account_link'] = array(
'#type' => 'link',
'#title' => t('Account settings'),
'#href' => 'admin/config/content/gathercontent/login',
);
$form['page_options'] = array();
$form['page_options']['project_dropdown'] = array(
'#prefix' => '<div class="gc_search_pages gc_cf"><div class="gc_left">',
'#markup' => $obj->data['projects_dropdown'],
'#suffix' => '</div>',
);
$form['page_options']['live_filter'] = array(
'#prefix' => '<div class="gc_right">',
'#suffix' => '</div></div>',
);
$form['page_options']['live_filter']['state_dropdown'] = array(
'#markup' => $obj->data['state_dropdown'],
);
$form['page_options']['live_filter']['filter_input'] = array(
'#markup' => '<input type="text" name="search" id="gc_live_filter" placeholder="' . check_plain(t('Search...')) . '" />',
);
$form['page_options']['live_filter']['submit'] = array(
'#type' => 'submit',
'#value' => t('Configure selected pages'),
);
$form['page_list'] = array();
$form['pages'] = array();
$form = $obj
->generateFormSettings($form, $obj->pages);
$form['page_options_bottom'] = array(
'#prefix' => '<div class="gc_search_pages gc_search_bottom gc_cf"><div class="gc_right">',
'#type' => 'submit',
'#value' => t('Configure selected pages'),
'#suffix' => '</div></div>',
);
return $form;
}