Swap out button/submit inputs for button elements
[civicrm-core.git] / templates / CRM / Block / FullTextSearch.tpl
CommitLineData
6a488035
TO
1{*
2 +--------------------------------------------------------------------+
1188c7a8 3 | Copyright CiviCRM LLC. All rights reserved. |
6a488035 4 | |
1188c7a8
TO
5 | This work is published under the GNU AGPLv3 license with some |
6 | permitted exceptions and without any warranty. For full license |
7 | and copyright information, see https://civicrm.org/licensing |
6a488035
TO
8 +--------------------------------------------------------------------+
9*}
10<script type="text/javascript">
11 {literal}
12 function submitForm( ) {
13 var text = document.getElementById('text').value;
14 var table = document.getElementById('fulltext_table').value;
15 var url = {/literal}'{crmURL p="civicrm/contact/search/custom" h=0 q="csid=`$fullTextSearchID`&reset=1&force=1&text="}'{literal} + text;
16 if ( table ) {
17 url = url + '&table=' + table;
18 }
19 document.getElementById('id_fulltext_search').action = url;
20 }
21 {/literal}
22</script>
23
24<div class="block-crm crm-container">
25 <form method="post" id="id_fulltext_search">
26 <div style="margin-bottom: 8px;">
cbd83dde 27 <input type="text" name="text" id='text' value="" class="crm-form-text" style="width: 10em;" />&nbsp;<button type="submit" name="submit" id="fulltext_submit" class="crm-button crm-form-submit" onclick='submitForm();'>{ts}Go{/ts}</button>
fd0bc470 28 <input type="hidden" name="qfKey" value="{crmKey name='CRM_Contact_Controller_Search' addSequence=1}" />
6a488035
TO
29 </div>
30 <select class="form-select" id="fulltext_table" name="fulltext_table">
31{if call_user_func(array('CRM_Core_Permission','giveMeAllACLs'))}
32 <option value="">{ts}All{/ts}</option>
33 <option value="Contact">{ts}Contacts{/ts}</option>
34{/if}
35 <option value="Activity">{ts}Activities{/ts}</option>
36{if call_user_func(array('CRM_Core_Permission','access'), 'CiviCase')}
37 <option value="Case">{ts}Cases{/ts}</option>
38{/if}
39{if call_user_func(array('CRM_Core_Permission','access'), 'CiviContribute')}
40 <option value="Contribution">{ts}Contributions{/ts}</option>
41{/if}
42{if call_user_func(array('CRM_Core_Permission','access'), 'CiviEvent')}
43 <option value="Participant">{ts}Participants{/ts}</option>
44{/if}
45{if call_user_func(array('CRM_Core_Permission','access'), 'CiviMember')}
46 <option value="Membership">{ts}Memberships{/ts}</option>
47{/if}
e4ae4d1d 48 </select> {help id="id-fullText" file="CRM/Contact/Form/Search/Custom/FullText.hlp"}
6a488035
TO
49 </form>
50</div>