";
// 2. label - could be common text label or drop down choice
// choose whether the label is a dropdown choice:
if (isset ( $param ['alt'] ) && is_array ( $param ['alt'] ) && sizeof ( $param ['alt'] > 0 )) {
$altList = array (
$key
) + $param ['alt'];
// Yii::info ( "altList : " . implode ( $altList, "\n" ) );
// echo " ";
echo Html::dropDownList ( $key, $key, $altList, $htmlOptions = array (
'class' => "dropDownLabel",
'id2' => $key
) );
$htmlOpts += array (
"class" => "hasSelectableLabel_" . $key,
"id2" => $key
);
$alt = true;
} else {
$altList = null;
$form->field ( $model, $key )->label ( $key );
$alt = false;
}
echo $hide_button;
// 3. field itself (different types -depending on $type
CreateFormManager::createField ( $this, $model, $form, $key, $param, $selectionLists, $htmlOpts, $selectedValue = NULL, $hide_option, $hide_button );
// if there are alternate fields create them and hide them:
if ($alt) {
if (isset ( $htmlOpts ['style'] )) {
$htmlOpts ['style'] += " display:none;";
} else {
$htmlOpts ['style'] = "display:none;";
}
foreach ( $altList as $altField ) {
unset ( $param ['valueList'] );
CreateFormManager::createField ( $this, $model, $form, $altField, $param, $selectionLists, $htmlOpts, $selectedValue = NULL );
}
}
echo " ";
}
}
echo $this->render ( '/search/mapSearch' );
?>
";
echo " ";
ActiveForm::end ();
?>
";
echo Html::submitButton ( 'Submit', [
'class' => 'btn btn-primary'
] );
echo " ";
echo " ";
echo Accordion::widget ( [
'items' => [
[
'header' => "add Search Field",
'content' => $this->render ( 'searchFieldSelection', [
'hideable_fields' => $model->getHideableListFields (),
'hidden_elements' => $model->getHideableList ()
], true )
]
],
'options' => [
'tag' => 'div',
'autoHeight' => false,
'active' => false,
'delay' => '100'
],
'itemOptions' => [
'tag' => 'div',
'class' => 'balmusette_search'
],
'headerOptions' => [
'tag' => 'button',
'class' => 'btn btn-primary'
]
,
'clientOptions' => [
'collapsible' => true,
'active' => false
]
] );
echo "
The search with wildcard is not fully working yet. Please search
for complete words (or sentences) only.
-->
'form-websearch','action' => $submitWebsearch]); ?> = $form2->field($modelwebsite, 'content')?>
= Html::submitButton('Search', ['class' => 'btn btn-primary', 'name' => 'website-button'])?>
extendedSearchFormTitle; ?>
getParameters ();
$form = ActiveForm::begin ( [
'method' => 'get',
'enableClientValidation' => true,
'validateOnSubmit' => true,
] ) // this is redundant because it's true by default
;
echo $form->errorSummary ( $model );
echo "";
foreach ( $elements as $key => $param ) {
$tohandle = false;
foreach ( $param as $k => $toto ) {
try {
if (isset ( $param ['type'] ))
// echo "PARAM ".$k." vs. ".$toto." "; $tohandle = TRUE; $type = $param ['type']; } catch ( Exception $e ) { // echo "no type"; } } if ($tohandle) { // 1. preparation for the field generation $htmlOpts = isset ( $param ['config'] ) ? $param ['config'] : array (); // if the field is hideable // it's set not displayed in the first place // and it gets a button to hide it again: if (isset ( $param ['hideable'] ) && $param ['hideable'] == 'true') { $hide_option = "style=\"display:none;\""; $hide_button = "request->baseUrl . "/images/close.png \" parent_name=\"" . $key . "\" class=\"hide_button\" alt=\"close\"/>"; } else { $hide_option = ""; $hide_button = ""; } // use default size if no size is given if (! isset ( $param ['config'] ['size'] )) { $param ['config'] ['size'] = $model->getFieldSize (); } // surround label and fields with div echo " ";
// echo "
|