function brightcove_field_filter_form in Brightcove Video Connect 7.3
Same name and namespace in other branches
- 7.7 brightcove.module \brightcove_field_filter_form()
- 7.2 brightcove_field/brightcove_field.module \brightcove_field_filter_form()
- 7.4 brightcove_field/brightcove_field.module \brightcove_field_filter_form()
- 7.5 brightcove_field/brightcove_field.module \brightcove_field_filter_form()
- 7.6 brightcove.module \brightcove_field_filter_form()
Filter form for video browser.
1 string reference to 'brightcove_field_filter_form'
- _brightcove_field_video_browse in brightcove_field/
brightcove_field.video.inc
File
- brightcove_field/
brightcove_field.module, line 1059 - Brightcove field module provides a Content Construction Kit module to developers, allowing them to browse videos in their Brightcove Studio and upload them.
Code
function brightcove_field_filter_form($form, &$form_state) {
$form['search'] = array(
'#type' => 'fieldset',
'#title' => t('Filter videos'),
'#collapsible' => TRUE,
'#collapsed' => empty($_SESSION['brightcove_field_filter']) ? TRUE : FALSE,
);
$keywords = '';
if (!empty($_SESSION['brightcove_field_filter']['keywords'])) {
$keywords = $_SESSION['brightcove_field_filter']['keywords'];
}
$form['search']['keywords'] = array(
'#type' => 'textfield',
'#title' => t('Keywords'),
'#size' => 25,
'#default_value' => $keywords,
'#description' => t('Comma separated keywords to search for.'),
);
$form['search']['search'] = array(
'#type' => 'radios',
'#title' => t('Search in'),
'#options' => array(
'name' => t('Names and descriptions'),
'tags' => t('Tags: at least one of these'),
'and_tags' => t('Tags: all of these'),
),
'#default_value' => isset($_SESSION['brightcove_field_filter']['search']) ? $_SESSION['brightcove_field_filter']['search'] : 'name',
'#attributes' => array(
'class' => array(
'search-radio',
),
),
'#description' => t('"Names and descriptions" searches in Video name, short and long descriptions. Tags searches in Video associated tags.'),
);
$form['search']['submit'] = array(
'#type' => 'submit',
'#name' => 'submit',
'#default_value' => t('Filter'),
);
$form['search']['reset'] = array(
'#type' => 'submit',
'#name' => 'reset',
'#default_value' => t('Reset'),
);
$form['#submit'] = array(
'brightcove_field_filter_form_submit',
);
return $form;
}