function document_block1_form in Document 6
Same name and namespace in other branches
- 7 document.module \document_block1_form()
- 8.x document.module \document_block1_form()
1 string reference to 'document_block1_form'
- document_block in ./
document.module - Implementation of hook_block().
File
- ./
document.module, line 478
Code
function document_block1_form() {
$form = array();
$action = url('document');
$form['document_block1_label'] = array(
'#type' => 'item',
'#value' => t('Search for a document'),
'#prefix' => '<div class="document-block-label">',
'#suffix' => '</div>',
);
$form['document_block1_input'] = array(
'#type' => 'textfield',
'#attributes' => array(
'class' => 'document-block-input',
),
);
$form['document_block1_submit'] = array(
'#type' => 'image_button',
'#src' => document_image_url('doc-search.png'),
'#attributes' => array(
'class' => 'document-block-submit',
),
);
$form['document_block1_fields'] = array(
'#type' => 'radios',
'#options' => array(
DOCUMENT_SEARCH_AUTHOR => t('Author |'),
DOCUMENT_SEARCH_KEYWORDS => t('Keywords |'),
-1 => t('Type |'),
),
'#default_value' => DOCUMENT_SEARCH_AUTHOR,
'#attributes' => array(
'class' => 'document-block-fields',
),
);
$form['document_block1_advanced'] = array(
'#type' => 'markup',
'#value' => "<div class='document-block-advanced'><a href='{$action}'>" . t('Advanced Search') . "</a></div>",
);
$form['#method'] = 'get';
$form['#action'] = $action;
return $form;
}