function brightcove_cck_filter_form in Brightcove Video Connect 6.2
Same name and namespace in other branches
- 6 brightcove_cck/brightcove_cck.module \brightcove_cck_filter_form()
Filter form for video browser.
1 string reference to 'brightcove_cck_filter_form'
- brightcove_cck_browse in brightcove_cck/
brightcove_cck.browse.inc - This function is a callback for modalframe window, providing an access to browse videos.
File
- brightcove_cck/
brightcove_cck.module, line 741 - Brightcove CCK module provides a Content Construction Kit module to developers, allowing them to browse videos in their Brightcove Studio and upload them.
Code
function brightcove_cck_filter_form(&$form_state) {
$form['search'] = array(
'#type' => 'fieldset',
'#title' => t('Filter videos'),
'#collapsible' => TRUE,
'#collapsed' => empty($_SESSION['brightcove_cck_filter']) ? TRUE : FALSE,
);
$keywords = '';
if (!empty($_SESSION['brightcove_cck_filter']['keywords'])) {
$keywords = $_SESSION['brightcove_cck_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_cck_filter']['search']) ? $_SESSION['brightcove_cck_filter']['search'] : 'name',
'#attributes' => array(
'class' => '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',
'#value' => t('Filter'),
);
$form['search']['reset'] = array(
'#type' => 'submit',
'#name' => 'reset',
'#value' => t('Reset'),
);
return $form;
}