]> CyberLeo.Net >> Repos - Github/sugarcrm.git/blob - include/SearchForm/tpls/SearchFormGenericAdvanced.tpl
Release 6.5.0
[Github/sugarcrm.git] / include / SearchForm / tpls / SearchFormGenericAdvanced.tpl
1
2 <script>
3 {literal}
4         $(function() {
5         var $dialog = $('<div></div>')
6                 .html(SUGAR.language.get('app_strings', 'LBL_SEARCH_HELP_TEXT'))
7                 .dialog({
8                         autoOpen: false,
9                         title: SUGAR.language.get('app_strings', 'LBL_SEARCH_HELP_TITLE'),
10                         width: 700
11                 });
12                 
13                 $('.help-search').click(function() {
14                 $dialog.dialog('open');
15                 // prevent the default action, e.g., following a link
16         });
17         
18         });
19 {/literal}
20 </script>
21 <table width="100%" cellspacing="0" cellpadding="0" border="0">
22 <tr>
23 {{assign var='accesskeycount' value=0}}  {{assign var='ACCKEY' value=''}}
24 {{foreach name=colIteration from=$formData key=col item=colData}}
25     {{math assign="accesskeycount" equation="$accesskeycount + 1"}}
26     {{if $accesskeycount==1}} {{assign var='ACCKEY' value=$APP.LBL_FIRST_INPUT_SEARCH_KEY}} {{else}} {{assign var='ACCKEY' value=''}} {{/if}}
27
28         
29         {counter assign=index}
30         {math equation="left % right"
31                   left=$index
32           right=$templateMeta.maxColumns
33           assign=modVal
34     }
35         {if ($index % $templateMeta.maxColumns == 1 && $index != 1)}
36         {if $isHelperShown==0}
37             {assign var="isHelperShown" value="1"}
38             <td class="helpIcon" width="*">
39                 <img alt="{$APP.LBL_SEARCH_HELP_TITLE}" id="helper_popup_image" border="0" src='{sugar_getimagepath file="help-dashlet.gif"}' class="help-search">
40             </td>
41         {else}
42             <td>&nbsp;</td>
43         {/if}
44                 </tr><tr>
45         {/if}
46         
47         <td scope="row" nowrap="nowrap" width='{{$templateMeta.widths.label}}%' >
48         {{if isset($colData.field.label)}}      
49                 <label for='{{$colData.field.name}}'>{sugar_translate label='{{$colData.field.label}}' module='{{$module}}'}</label>
50     {{elseif isset($fields[$colData.field.name])}}
51                 <label for='{{$fields[$colData.field.name].name}}'>{sugar_translate label='{{$fields[$colData.field.name].vname}}' module='{{$module}}'}</label>
52         {{/if}}
53         </td>
54         <td  nowrap="nowrap" width='{{$templateMeta.widths.field}}%'>
55         {{if $fields[$colData.field.name]}}
56                 {{sugar_field parentFieldArray='fields' accesskey=$ACCKEY vardef=$fields[$colData.field.name] displayType=$displayType displayParams=$colData.field.displayParams typeOverride=$colData.field.type formName=$form_name}}
57         {{/if}}
58         </td>
59 {{/foreach}}
60         </tr>
61 <tr>
62         <td colspan='20'>
63                 &nbsp;
64         </td>
65 </tr>   
66 {if $DISPLAY_SAVED_SEARCH}
67 <tr>
68         <td colspan='2'>
69                 <a class='tabFormAdvLink' onhover href='javascript:toggleInlineSearch()'>
70             {capture assign="alt_show_hide"}{sugar_translate label='LBL_ALT_SHOW_OPTIONS'}{/capture}
71                 {sugar_getimage alt=$alt_show_hide name="advanced_search" ext=".gif" other_attributes='border="0" id="up_down_img" '}&nbsp;{$APP.LNK_SAVED_VIEWS}
72                 </a><br>
73                 <input type='hidden' id='showSSDIV' name='showSSDIV' value='{$SHOWSSDIV}'><p>
74         </td>
75         <td scope='row' width='10%' nowrap="nowrap">
76                 {sugar_translate label='LBL_SAVE_SEARCH_AS' module='SavedSearch'}:
77         </td>
78         <td width='30%' nowrap>
79                 <input type='text' name='saved_search_name'>
80                 <input type='hidden' name='search_module' value=''>
81                 <input type='hidden' name='saved_search_action' value=''>
82                 <input title='{$APP.LBL_SAVE_BUTTON_LABEL}' value='{$APP.LBL_SAVE_BUTTON_LABEL}' class='button' type='button' name='saved_search_submit' onclick='SUGAR.savedViews.setChooser(); return SUGAR.savedViews.saved_search_action("save");'>
83         </td>
84         <td scope='row' width='10%' nowrap="nowrap">
85             {sugar_translate label='LBL_MODIFY_CURRENT_SEARCH' module='SavedSearch'}:
86         </td>
87         <td width='30%' nowrap>
88         <input class='button' onclick='SUGAR.savedViews.setChooser(); return SUGAR.savedViews.saved_search_action("update")' value='{$APP.LBL_UPDATE}' title='{$APP.LBL_UPDATE}' name='ss_update' id='ss_update' type='button' >
89                 <input class='button' onclick='return SUGAR.savedViews.saved_search_action("delete", "{sugar_translate label='LBL_DELETE_CONFIRM' module='SavedSearch'}")' value='{$APP.LBL_DELETE}' title='{$APP.LBL_DELETE}' name='ss_delete' id='ss_delete' type='button'>
90                 <br><span id='curr_search_name'></span>
91         </td>
92 </tr>
93
94 <tr>
95 <td colspan='6'>
96 <div style='{$DISPLAYSS}' id='inlineSavedSearch' >
97         {$SAVED_SEARCH}
98 </div>
99 </td>
100 </tr>
101
102 {/if}
103 {if $displayType != 'popupView'}
104 <tr>
105         <td colspan='5'>
106         <input tabindex='2' title='{$APP.LBL_SEARCH_BUTTON_TITLE}' onclick='SUGAR.savedViews.setChooser()' class='button' type='submit' name='button' value='{$APP.LBL_SEARCH_BUTTON_LABEL}' id='search_form_submit'/>&nbsp;
107         <input tabindex='2' title='{$APP.LBL_CLEAR_BUTTON_TITLE}'  onclick='SUGAR.searchForm.clear_form(this.form); document.getElementById("saved_search_select").options[0].selected=true; return false;' class='button' type='button' name='clear' id='search_form_clear' value='{$APP.LBL_CLEAR_BUTTON_LABEL}'/>
108         {if $DOCUMENTS_MODULE}
109         &nbsp;<input title="{$APP.LBL_BROWSE_DOCUMENTS_BUTTON_TITLE}" type="button" class="button" value="{$APP.LBL_BROWSE_DOCUMENTS_BUTTON_LABEL}" onclick='open_popup("Documents", 600, 400, "&caller=Documents", true, false, "");' />
110         {/if}
111         <a id="basic_search_link" onclick="SUGAR.searchForm.searchFormSelect('{$module}|basic_search','{$module}|advanced_search')" href="javascript:void(0)" accesskey="{$APP.LBL_ADV_SEARCH_LNK_KEY}" >{$APP.LNK_BASIC_SEARCH}</a>
112         <span class='white-space'>
113             &nbsp;&nbsp;&nbsp;{if $SAVED_SEARCHES_OPTIONS}|&nbsp;&nbsp;&nbsp;<b>{$APP.LBL_SAVED_SEARCH_SHORTCUT}</b>&nbsp;
114             {$SAVED_SEARCHES_OPTIONS} {/if}
115             <span id='go_btn_span' style='display:none'><input tabindex='2' title='go_select' id='go_select'  onclick='SUGAR.searchForm.clear_form(this.form);' class='button' type='button' name='go_select' value=' {$APP.LBL_GO_BUTTON_LABEL} '/></span>     
116         </span>
117         </td>
118         <td class="help">
119             {if $DISPLAY_SEARCH_HELP}
120             <img  border='0' src='{sugar_getimagepath file="help-dashlet.gif"}' class="help-search">
121             {/if}
122     </td>
123 </tr>
124 {/if}
125 </table>
126
127 <script>
128 {literal}
129         if(typeof(loadSSL_Scripts)=='function'){
130                 loadSSL_Scripts();
131         }
132 {/literal}      
133 </script>