0
0
Fork 0
mirror of https://github.com/salesagility/SuiteCRM.git synced 2025-02-14 10:08:50 +00:00
salesagility_SuiteCRM/include/SearchForm/tpls/SearchFormGenericAdvanced.tpl
Horus68 a7dc2220a9 Fix part 4
fixing typos and license
2018-08-03 17:50:48 +01:00

204 lines
No EOL
9.7 KiB
Smarty
Executable file

{*
/**
*
* SugarCRM Community Edition is a customer relationship management program developed by
* SugarCRM, Inc. Copyright (C) 2004-2013 SugarCRM Inc.
*
* SuiteCRM is an extension to SugarCRM Community Edition developed by SalesAgility Ltd.
* Copyright (C) 2011 - 2018 SalesAgility Ltd.
*
* This program is free software; you can redistribute it and/or modify it under
* the terms of the GNU Affero General Public License version 3 as published by the
* Free Software Foundation with the addition of the following permission added
* to Section 15 as permitted in Section 7(a): FOR ANY PART OF THE COVERED WORK
* IN WHICH THE COPYRIGHT IS OWNED BY SUGARCRM, SUGARCRM DISCLAIMS THE WARRANTY
* OF NON INFRINGEMENT OF THIRD PARTY RIGHTS.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
* FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more
* details.
*
* You should have received a copy of the GNU Affero General Public License along with
* this program; if not, see http://www.gnu.org/licenses or write to the Free
* Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
* 02110-1301 USA.
*
* You can contact SugarCRM, Inc. headquarters at 10050 North Wolfe Road,
* SW2-130, Cupertino, CA 95014, USA. or at email address contact@sugarcrm.com.
*
* The interactive user interfaces in modified source and object code versions
* of this program must display Appropriate Legal Notices, as required under
* Section 5 of the GNU Affero General Public License version 3.
*
* In accordance with Section 7(b) of the GNU Affero General Public License version 3,
* these Appropriate Legal Notices must retain the display of the "Powered by
* SugarCRM" logo and "Supercharged by SuiteCRM" logo. If the display of the logos is not
* reasonably feasible for technical reasons, the Appropriate Legal Notices must
* display the words "Powered by SugarCRM" and "Supercharged by SuiteCRM".
*/
*}
<script>
{literal}
$(function () {
var $dialog = $('<div></div>')
.html(SUGAR.language.get('app_strings', 'LBL_SEARCH_HELP_TEXT'))
.dialog({
autoOpen: false,
title: SUGAR.language.get('app_strings', 'LBL_SEARCH_HELP_TITLE'),
width: 700
});
$('.help-search').click(function () {
$dialog.dialog('open');
// prevent the default action, e.g., following a link
});
});
{/literal}
</script>
<table width="100%" cellspacing="0" cellpadding="0" border="0">
<tr>
{{assign var='accesskeycount' value=0}} {{assign var='ACCKEY' value=''}}
{{foreach name=colIteration from=$formData key=col item=colData}}
{{math assign="accesskeycount" equation="$accesskeycount + 1"}}
{{if $accesskeycount==1}} {{assign var='ACCKEY' value=$APP.LBL_FIRST_INPUT_SEARCH_KEY}} {{else}} {{assign var='ACCKEY' value=''}} {{/if}}
{counter assign=index}
{math equation="left % right"
left=$index
right=$templateMeta.maxColumns
assign=modVal
}
{if ($index % $templateMeta.maxColumns == 1 && $index != 1)}
{if $isHelperShown==0}
{assign var="isHelperShown" value="1"}
<td class="helpIcon" width="*">
<img alt="{$APP.LBL_SEARCH_HELP_TITLE}" id="helper_popup_image" border="0"
src='{sugar_getimagepath file="help-dashlet.gif"}' class="help-search">
</td>
{else}
<td>&nbsp;</td>
{/if}
</tr>
<tr>
{/if}
<td scope="row" nowrap="nowrap" width='{{$templateMeta.widths.label}}%'>
{{if isset($colData.field.label)}}
<label for='{{$colData.field.name}}'>{sugar_translate label='{{$colData.field.label}}' module='{{$module}}'}</label>
{{elseif isset($fields[$colData.field.name])}}
<label for='{{$fields[$colData.field.name].name}}'>{sugar_translate label='{{$fields[$colData.field.name].vname}}' module='{{$module}}'}</label>
{{/if}}
</td>
<td nowrap="nowrap" width='{{$templateMeta.widths.field}}%'>
{{if $fields[$colData.field.name]}}
{{sugar_field parentFieldArray='fields' accesskey=$ACCKEY vardef=$fields[$colData.field.name] displayType=$displayType displayParams=$colData.field.displayParams typeOverride=$colData.field.type formName=$form_name}}
{{/if}}
</td>
{{/foreach}}
</tr>
<tr>
<td colspan='20'>
&nbsp;
</td>
</tr>
{if $DISPLAY_SAVED_SEARCH}
<tr>
<td colspan='2'>
<a class='tabFormAdvLink' onhover href='javascript:toggleInlineSearch()'>
{capture assign="alt_show_hide"}{sugar_translate label='LBL_ALT_SHOW_OPTIONS'}{/capture}
{sugar_getimage alt=$alt_show_hide name="advanced_search" ext=".gif" other_attributes='border="0" id="up_down_img" '}
&nbsp;{$APP.LNK_SAVED_VIEWS}
</a><br>
<input type='hidden' id='showSSDIV' name='showSSDIV' value='{$SHOWSSDIV}'>
<p>
</td>
<td scope='row' width='10%' nowrap="nowrap">
{sugar_translate label='LBL_SAVE_SEARCH_AS' module='SavedSearch'}:
</td>
<td width='30%' nowrap>
<input type='text' name='saved_search_name'>
<input type='hidden' name='search_module' value=''>
<input type='hidden' name='saved_search_action' value=''>
<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");'>
</td>
<td scope='row' width='10%' nowrap="nowrap">
{sugar_translate label='LBL_MODIFY_CURRENT_FILTER' module='SavedSearch'}:
</td>
<td width='30%' nowrap>
<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'>
<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'>
<br><span id='curr_search_name'></span>
</td>
</tr>
<tr>
<td colspan='6'>
<div style='{$DISPLAYSS}' id='inlineSavedSearch'>
{$SAVED_SEARCH}
</div>
</td>
</tr>
{/if}
{if $displayType != 'popupView'}
<tr>
<td colspan='5'>
<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_advanced'/>&nbsp;
<input tabindex='2' title='{$APP.LBL_CLEAR_BUTTON_TITLE}'
onclick='SUGAR.searchForm.clear_form(this.form); if(document.getElementById("saved_search_select")){ldelim}document.getElementById("saved_search_select").options[0].selected=true;{rdelim} return false;'
class='button' type='button' name='clear' id='search_form_clear_advanced'
value='{$APP.LBL_CLEAR_BUTTON_LABEL}'/>
{if $DOCUMENTS_MODULE}
&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, "");'/>
{/if}
<a id="basic_search_link" href="javascript:void(0)"
accesskey="{$APP.LBL_ADV_SEARCH_LNK_KEY}">{$APP.LNK_BASIC_FILTER}</a>
<span class='white-space'>
&nbsp;&nbsp;&nbsp;{if $SAVED_SEARCHES_OPTIONS}|&nbsp;&nbsp;&nbsp;<b>{$APP.LBL_SAVED_FILTER_SHORTCUT}</b>&nbsp;
{$SAVED_SEARCHES_OPTIONS} {/if}
<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>
</span>
</td>
<td class="help">
{if $DISPLAY_SEARCH_HELP}
<img border='0' src='{sugar_getimagepath file="help-dashlet.gif"}' class="help-search">
{/if}
</td>
</tr>
{/if}
</table>
<script>
{literal}
if (typeof(loadSSL_Scripts) == 'function') {
loadSSL_Scripts();
}
{/literal}
</script>
<script>
{literal}
$(document).ready(function () {
$('#basic_search_link').one("click", function () {
//alert( "This will be displayed only once." );
SUGAR.searchForm.searchFormSelect('{/literal}{$module}{literal}|basic_search', '{/literal}{$module}{literal}|advanced_search');
});
});
{/literal}
</script>