disable form patch

http://drupal.org/node/1512086
Signed-off-by: bachy <git@g-u-i.net>
This commit is contained in:
bachy
2012-07-22 16:27:00 +02:00
parent 5e63575d94
commit 256475e716
4 changed files with 320 additions and 1 deletions

View File

@@ -177,6 +177,14 @@ function search_api_page_admin_add(array $form, array &$form_state) {
'#default_value' => 10,
);
$form['result_page_search_form'] = array(
'#type' => 'radios',
'#title' => t('Search form on result page'),
'#default_value' => 1,
'#options' => array('1' => t('Enabled'), '0' => t('Disabled')),
'#description' => t('Enable or disable the search form on the result page'),
);
$form['get_per_page'] = array(
'#type' => 'checkbox',
'#title' => t('Allow GET override'),
@@ -359,6 +367,14 @@ function search_api_page_admin_edit(array $form, array &$form_state, Entity $pag
'#default_value' => $page->options['per_page'],
);
$form['result_page_search_form'] = array(
'#type' => 'radios',
'#title' => t('Search form on result page'),
'#default_value' => $page->options['per_page'],
'#options' => array('1' => t('Enabled'), '0' => t('Disabled')),
'#description' => t('Enable or disable the search form on the result page'),
);
$form['options']['get_per_page'] = array(
'#type' => 'checkbox',
'#title' => t('Allow GET override'),