Added theme: blogger-1.5.zip
[vanilla-miry.git] / themes / search_form.php
blob27d043b32e6dcb3ff7ca4ea43904fbe28d69e9dc
1 <?php
2 // Note: This file is included from the library/Vanilla/Vanilla.Control.SearchForm.php class.
4 $this->PostBackParams->Add("PostBackAction", "Search");
6 echo '<div id="Form" class="Account Search">
7 <fieldset id="SearchSimpleFields">
8 <legend>'.$this->Context->GetDefinition('Search').'</legend>
9 <a href="./" onclick="ShowAdvancedSearch(); return false;" class="SearchSwitch">'.$this->Context->GetDefinition('Advanced').'</a>';
10 $this->Render_PostBackForm('SearchSimple', 'get');
11 $this->TypeRadio->CssClass = 'SearchRadio';
12 echo '<ul>
13 <li id="MainSearchInput">
14 <label for="txtKeywords">'.$this->Context->GetDefinition('SearchTerms').'</label>
15 <input id="txtKeywords" type="text" name="Keywords" value="'.$this->Search->Keywords.'" class="SearchInput" />
16 </li>
17 <li id="SimpleSearchRadios">'
18 .$this->Context->GetDefinition('ChooseSearchType')
19 .$this->TypeRadio->Get()
20 .'</li>
21 <li>
22 <input type="submit" name="btnSubmit" value="'.$this->Context->GetDefinition('Search').'" class="Button SearchButton" />
23 </li>
24 </ul>
25 </form>
26 </fieldset>';
28 // Begin Advanced Topic Search Form
29 echo '<fieldset id="SearchDiscussionFields">
30 <legend>'.$this->Context->GetDefinition('DiscussionTopicSearch').'</legend>
31 <a href="./" onclick="ShowSimpleSearch(); return false;" class="SearchSwitch">'.$this->Context->GetDefinition('Simple').'</a>';
32 $this->PostBackParams->Add('Type', 'Discussions');
33 $this->PostBackParams->Add('Advanced', '1');
34 $this->Render_PostBackForm('SearchDiscussions', 'get');
35 echo '<ul>
36 <li>
37 <label for="txtDiscussionKeywords">'.$this->Context->GetDefinition('FindDiscussionsContaining').'</label>
38 <input id="txtDiscussionKeywords" type="text" name="Keywords" value="'.($this->Search->Type == 'Topics'?$this->Search->Query:'').'" class="SearchInput AdvancedSearchInput" />
39 </li>';
40 if ($this->Context->Configuration['USE_CATEGORIES']) {
41 $this->CategorySelect->Attributes = ' id="ddDiscussionCategories"';
42 $this->CategorySelect->CssClass = 'SearchSelect';
43 $this->CategorySelect->SelectedValue = ($this->Search->Type == 'Topics' ? $this->Search->Categories : '');
44 echo '<li>
45 <label for="ddDiscussionCategories">'.$this->Context->GetDefinition('InTheCategory').'</label>'
46 .$this->CategorySelect->Get().'
47 </li>';
49 echo '<li>
50 <label for="DiscussionAuthUsername">'.$this->Context->GetDefinition('WhereTheAuthorWas').'</label>
51 <input id="DiscussionAuthUsername" name="AuthUsername" type="text" value="'.($this->Search->Type == 'Topics'?$this->Search->AuthUsername:'').'" class="SearchInput AdvancedUserInput" />
52 <script type="text/javascript">
53 var DiscussionAutoComplete = new AutoComplete("DiscussionAuthUsername", false);
54 DiscussionAutoComplete.TableID = "DiscussionAutoCompleteResults";
55 DiscussionAutoComplete.KeywordSourceUrl = "'.$this->Context->Configuration['WEB_ROOT'].'ajax/getusers.php?Search=";
56 </script>
57 </li>
58 <li>
59 <input type="submit" name="btnSubmit" value="'.$this->Context->GetDefinition('Search').'" class="Button SearchButton" />
60 </li>
61 </ul>
62 </form>
63 </fieldset>';
65 // Begin Advanced Comment Search Form
66 echo '<fieldset id="SearchCommentFields">
67 <legend>'.$this->Context->GetDefinition('DiscussionCommentSearch').'</legend>';
68 $this->PostBackParams->Set('Type', 'Comments');
69 $this->Render_PostBackForm('SearchComments', 'get');
70 echo '<ul>
71 <li>
72 <label for="txtCommentKeywords">'.$this->Context->GetDefinition('FindCommentsContaining').'</label>
73 <input id="txtCommentKeywords" type="text" name="Keywords" value="'.($this->Search->Type == 'Comments'?$this->Search->Query:'').'" class="SearchInput AdvancedSearchInput" />
74 </li>';
75 if ($this->Context->Configuration['USE_CATEGORIES']) {
76 $this->CategorySelect->Attributes = ' id="ddCommentCategories"';
77 $this->CategorySelect->CssClass = 'SearchSelect';
78 $this->CategorySelect->SelectedValue = ($this->Search->Type == 'Comments' ? $this->Search->Categories : '');
79 echo '<li>
80 <label for="ddCommentCategories">'.$this->Context->GetDefinition('InTheCategory').'</label>'
81 .$this->CategorySelect->Get().'
82 </li>';
84 echo '<li>
85 <label for="CommentAuthUsername">'.$this->Context->GetDefinition('WhereTheAuthorWas').'</label>
86 <input id="CommentAuthUsername" name="AuthUsername" type="text" value="'.($this->Search->Type == 'Comments'?$this->Search->AuthUsername:'').'" class="SearchInput AdvancedUserInput" />
87 <script type="text/javascript">
88 var CommentAutoComplete = new AutoComplete("CommentAuthUsername", false);
89 CommentAutoComplete.TableID = "CommentAutoCompleteResults";
90 CommentAutoComplete.KeywordSourceUrl = "'.$this->Context->Configuration['WEB_ROOT'].'ajax/getusers.php?Search=";
91 </script>
92 </li>
93 <li>
94 <input type="submit" name="btnSubmit" value="'.$this->Context->GetDefinition('Search').'" class="Button SearchButton" />
95 </li>
96 </ul>
97 </form>
98 </fieldset>';
100 // Begin Advanced User Search Form
102 echo '<fieldset id="SearchUserFields">
103 <legend>'.$this->Context->GetDefinition('UserAccountSearch').'</legend>';
104 $this->RoleSelect->Attributes = ' id="ddRoles"';
105 $this->RoleSelect->CssClass = 'SearchSelect';
106 $this->OrderSelect->Attributes = ' id="ddOrder"';
107 $this->OrderSelect->CssClass = 'SearchSelect';
108 $this->PostBackParams->Set('Type', 'Users');
109 $this->Render_PostBackForm('SearchUsers', 'get');
110 echo '<ul>
111 <li>
112 <label for="txtUserKeywords">'.$this->Context->GetDefinition('FindUserAccountsContaining').'</label>
113 <input id="txtUserKeywords" type="text" name="Keywords" value="'.($this->Search->Type == 'Users'?$this->Search->Query:'').'" class="SearchInput AdvancedSearchInput" />
114 </li>
115 <li>
116 <label for="ddRoles">'.$this->Context->GetDefinition('InTheRole').'</label>
117 '.$this->RoleSelect->Get().'
118 </li>
119 <li>
120 <label for="ddOrder">'.$this->Context->GetDefinition('SortResultsBy').'</label>
121 '.$this->OrderSelect->Get().'
122 </li>
123 <li>
124 <input type="submit" name="btnSubmit" value="'.$this->Context->GetDefinition('Search').'" class="Button SearchButton" />
125 </li>
126 </ul>
127 </form>
128 </fieldset>
129 </div>';