]> CyberLeo.Net >> Repos - Github/sugarcrm.git/blob - include/SearchForm/tpls/SearchFormGenericAdvanced.tpl
Release 6.4.0
[Github/sugarcrm.git] / include / SearchForm / tpls / SearchFormGenericAdvanced.tpl
1 <table width="100%" cellspacing="0" cellpadding="0" border="0">
2 <tr>
3 {{foreach name=colIteration from=$formData key=col item=colData}}
4         
5         {counter assign=index}
6         {math equation="left % right"
7                   left=$index
8           right=$templateMeta.maxColumns
9           assign=modVal
10     }
11         {if ($index % $templateMeta.maxColumns == 1 && $index != 1)}
12         {if $isHelperShown==0}
13             {assign var="isHelperShown" value="1"}
14             <td class="helpIcon" width="*">
15                 <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">
16             </td>
17         {else}
18             <td>&nbsp;</td>
19         {/if}
20                 </tr><tr>
21         {/if}
22         
23         <td scope="row" nowrap="nowrap" width='{{$templateMeta.widths.label}}%' >
24         {{if isset($colData.field.label)}}      
25                 <label for='{{$colData.field.name}}'>{sugar_translate label='{{$colData.field.label}}' module='{{$module}}'}</label>
26     {{elseif isset($fields[$colData.field.name])}}
27                 <label for='{{$fields[$colData.field.name].name}}'>{sugar_translate label='{{$fields[$colData.field.name].vname}}' module='{{$module}}'}</label>
28         {{/if}}
29         </td>
30         <td  nowrap="nowrap" width='{{$templateMeta.widths.field}}%'>
31         {{if $fields[$colData.field.name]}}
32                 {{sugar_field parentFieldArray='fields' vardef=$fields[$colData.field.name] displayType=$displayType displayParams=$colData.field.displayParams typeOverride=$colData.field.type formName=$form_name}}
33         {{/if}}
34         </td>
35 {{/foreach}}
36         </tr>
37 <tr>
38         <td colspan='20'>
39                 &nbsp;
40         </td>
41 </tr>   
42 {if $DISPLAY_SAVED_SEARCH}
43 <tr>
44         <td colspan='2'>
45                 <a class='tabFormAdvLink' onhover href='javascript:toggleInlineSearch()'>
46             {capture assign="alt_show_hide"}{sugar_translate label='LBL_ALT_SHOW_OPTIONS'}{/capture}
47                 {sugar_getimage alt=$alt_show_hide name="advanced_search" ext=".gif" other_attributes='border="0" id="up_down_img" '}&nbsp;{$APP.LNK_SAVED_VIEWS}
48                 </a><br>
49                 <input type='hidden' id='showSSDIV' name='showSSDIV' value='{$SHOWSSDIV}'><p>
50         </td>
51         <td scope='row' width='10%' nowrap="nowrap">
52                 {sugar_translate label='LBL_SAVE_SEARCH_AS' module='SavedSearch'}:
53         </td>
54         <td width='30%' nowrap>
55                 <input type='text' name='saved_search_name'>
56                 <input type='hidden' name='search_module' value=''>
57                 <input type='hidden' name='saved_search_action' value=''>
58                 <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");'>
59         </td>
60         <td scope='row' width='10%' nowrap="nowrap">
61             {sugar_translate label='LBL_MODIFY_CURRENT_SEARCH' module='SavedSearch'}:
62         </td>
63         <td width='30%' nowrap>
64         <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' >
65                 <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'>
66                 <br><span id='curr_search_name'></span>
67         </td>
68 </tr>
69
70 <tr>
71 <td colspan='6'>
72 <div style='{$DISPLAYSS}' id='inlineSavedSearch' >
73         {$SAVED_SEARCH}
74 </div>
75 </td>
76 </tr>
77
78 {/if}
79 {if $displayType != 'popupView'}
80 <tr>
81         <td colspan='5'>
82         <input tabindex='2' title='{$APP.LBL_SEARCH_BUTTON_TITLE}' accessKey='{$APP.LBL_SEARCH_BUTTON_KEY}' onclick='SUGAR.savedViews.setChooser()' class='button' type='submit' name='button' value='{$APP.LBL_SEARCH_BUTTON_LABEL}' id='search_form_submit'/>&nbsp;
83         <input tabindex='2' title='{$APP.LBL_CLEAR_BUTTON_TITLE}' accessKey='{$APP.LBL_CLEAR_BUTTON_KEY}' 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}'/>
84         {if $DOCUMENTS_MODULE}
85         &nbsp;<input title="{$APP.LBL_BROWSE_DOCUMENTS_BUTTON_TITLE}" accessKey="{$APP.LBL_BROWSE_DOCUMENTS_BUTTON_KEY}" type="button" class="button" value="{$APP.LBL_BROWSE_DOCUMENTS_BUTTON_LABEL}" onclick='open_popup("Documents", 600, 400, "&caller=Documents", true, false, "");' />
86         {/if}
87         <a id="basic_search_link" onclick="SUGAR.searchForm.searchFormSelect('{$module}|basic_search','{$module}|advanced_search')" href="javascript:void(0)">{$APP.LNK_BASIC_SEARCH}</a>
88         <span class='white-space'>
89             &nbsp;&nbsp;&nbsp;{if $SAVED_SEARCHES_OPTIONS}|&nbsp;&nbsp;&nbsp;<b>{$APP.LBL_SAVED_SEARCH_SHORTCUT}</b>&nbsp;
90             {$SAVED_SEARCHES_OPTIONS} {/if}
91             <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>     
92         </span>
93         </td>
94         <td class="help">
95             {if $DISPLAY_SEARCH_HELP}
96             <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">
97             {/if}
98     </td>
99 </tr>
100 {/if}
101 </table>
102
103 <script>
104 {literal}
105         if(typeof(loadSSL_Scripts)=='function'){
106                 loadSSL_Scripts();
107         }
108 {/literal}      
109 </script>