]> CyberLeo.Net >> Repos - Github/sugarcrm.git/blob - include/SearchForm/tpls/SearchFormGenericAdvanced.tpl
Release 6.4.1
[Github/sugarcrm.git] / include / SearchForm / tpls / SearchFormGenericAdvanced.tpl
1 <table width="100%" cellspacing="0" cellpadding="0" border="0">
2 <tr>
3 {{assign var='accesskeycount' value=0}}  {{assign var='ACCKEY' value=''}}
4 {{foreach name=colIteration from=$formData key=col item=colData}}
5     {{math assign="accesskeycount" equation="$accesskeycount + 1"}}
6     {{if $accesskeycount==1}} {{assign var='ACCKEY' value=$APP.LBL_FIRST_INPUT_SEARCH_KEY}} {{else}} {{assign var='ACCKEY' value=''}} {{/if}}
7
8         
9         {counter assign=index}
10         {math equation="left % right"
11                   left=$index
12           right=$templateMeta.maxColumns
13           assign=modVal
14     }
15         {if ($index % $templateMeta.maxColumns == 1 && $index != 1)}
16         {if $isHelperShown==0}
17             {assign var="isHelperShown" value="1"}
18             <td class="helpIcon" width="*">
19                 <img alt="{$APP.LBL_SEARCH_HELP_TITLE}" id="helper_popup_image" border="0" src='{sugar_getimagepath file="help-dashlet.gif"}' onmouseover="return overlib(SUGAR.language.get('app_strings', 'LBL_SEARCH_HELP_TEXT'), STICKY, MOUSEOFF, 1000,WIDTH, 700, LEFT,CAPTION,'<div style=\'float:left\'>'+SUGAR.language.get('app_strings', 'LBL_SEARCH_HELP_TITLE')+'</div>', CLOSETEXT, '<div style=\'float: right\'><img border=0 style=\'margin-left:2px; margin-right: 2px;\' src={sugar_getimagepath file='close.gif'}></div>',CLOSETITLE, SUGAR.language.get('app_strings', 'LBL_SEARCH_HELP_CLOSE_TOOLTIP'), CLOSECLICK,FGCLASS, 'olFgClass', CGCLASS, 'olCgClass', BGCLASS, 'olBgClass', TEXTFONTCLASS, 'olFontClass', CAPTIONFONTCLASS, 'olCapFontClass');" class="help-search">
20             </td>
21         {else}
22             <td>&nbsp;</td>
23         {/if}
24                 </tr><tr>
25         {/if}
26         
27         <td scope="row" nowrap="nowrap" width='{{$templateMeta.widths.label}}%' >
28         {{if isset($colData.field.label)}}      
29                 <label for='{{$colData.field.name}}'>{sugar_translate label='{{$colData.field.label}}' module='{{$module}}'}</label>
30     {{elseif isset($fields[$colData.field.name])}}
31                 <label for='{{$fields[$colData.field.name].name}}'>{sugar_translate label='{{$fields[$colData.field.name].vname}}' module='{{$module}}'}</label>
32         {{/if}}
33         </td>
34         <td  nowrap="nowrap" width='{{$templateMeta.widths.field}}%'>
35         {{if $fields[$colData.field.name]}}
36                 {{sugar_field parentFieldArray='fields' accesskey=$ACCKEY vardef=$fields[$colData.field.name] displayType=$displayType displayParams=$colData.field.displayParams typeOverride=$colData.field.type formName=$form_name}}
37         {{/if}}
38         </td>
39 {{/foreach}}
40         </tr>
41 <tr>
42         <td colspan='20'>
43                 &nbsp;
44         </td>
45 </tr>   
46 {if $DISPLAY_SAVED_SEARCH}
47 <tr>
48         <td colspan='2'>
49                 <a class='tabFormAdvLink' onhover href='javascript:toggleInlineSearch()'>
50             {capture assign="alt_show_hide"}{sugar_translate label='LBL_ALT_SHOW_OPTIONS'}{/capture}
51                 {sugar_getimage alt=$alt_show_hide name="advanced_search" ext=".gif" other_attributes='border="0" id="up_down_img" '}&nbsp;{$APP.LNK_SAVED_VIEWS}
52                 </a><br>
53                 <input type='hidden' id='showSSDIV' name='showSSDIV' value='{$SHOWSSDIV}'><p>
54         </td>
55         <td scope='row' width='10%' nowrap="nowrap">
56                 {sugar_translate label='LBL_SAVE_SEARCH_AS' module='SavedSearch'}:
57         </td>
58         <td width='30%' nowrap>
59                 <input type='text' name='saved_search_name'>
60                 <input type='hidden' name='search_module' value=''>
61                 <input type='hidden' name='saved_search_action' value=''>
62                 <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");'>
63         </td>
64         <td scope='row' width='10%' nowrap="nowrap">
65             {sugar_translate label='LBL_MODIFY_CURRENT_SEARCH' module='SavedSearch'}:
66         </td>
67         <td width='30%' nowrap>
68         <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' >
69                 <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'>
70                 <br><span id='curr_search_name'></span>
71         </td>
72 </tr>
73
74 <tr>
75 <td colspan='6'>
76 <div style='{$DISPLAYSS}' id='inlineSavedSearch' >
77         {$SAVED_SEARCH}
78 </div>
79 </td>
80 </tr>
81
82 {/if}
83 {if $displayType != 'popupView'}
84 <tr>
85         <td colspan='5'>
86         <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;
87         <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}'/>
88         {if $DOCUMENTS_MODULE}
89         &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, "");' />
90         {/if}
91         <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>
92         <span class='white-space'>
93             &nbsp;&nbsp;&nbsp;{if $SAVED_SEARCHES_OPTIONS}|&nbsp;&nbsp;&nbsp;<b>{$APP.LBL_SAVED_SEARCH_SHORTCUT}</b>&nbsp;
94             {$SAVED_SEARCHES_OPTIONS} {/if}
95             <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>     
96         </span>
97         </td>
98         <td class="help">
99             {if $DISPLAY_SEARCH_HELP}
100             <img  border='0' src='{sugar_getimagepath file="help-dashlet.gif"}' onmouseover="return overlib(SUGAR.language.get('app_strings', 'LBL_SEARCH_HELP_TEXT'), STICKY, MOUSEOFF,1000,WIDTH, 700, LEFT,CAPTION,'<div style=\'float:left\'>'+SUGAR.language.get('app_strings', 'LBL_SEARCH_HELP_TITLE')+'</div>', CLOSETEXT, '<div style=\'float: right\'><img border=0 style=\'margin-left:2px; margin-right: 2px;\' src={sugar_getimagepath file='close.gif'}></div>',CLOSETITLE, SUGAR.language.get('app_strings', 'LBL_SEARCH_HELP_CLOSE_TOOLTIP'), CLOSECLICK,FGCLASS, 'olFgClass', CGCLASS, 'olCgClass', BGCLASS, 'olBgClass', TEXTFONTCLASS, 'olFontClass', CAPTIONFONTCLASS, 'olCapFontClass');" class="help-search">
101             {/if}
102     </td>
103 </tr>
104 {/if}
105 </table>
106
107 <script>
108 {literal}
109         if(typeof(loadSSL_Scripts)=='function'){
110                 loadSSL_Scripts();
111         }
112 {/literal}      
113 </script>