| 1 | {* |
| 2 | +--------------------------------------------------------------------+ |
| 3 | | CiviCRM version 4.3 | |
| 4 | +--------------------------------------------------------------------+ |
| 5 | | Copyright CiviCRM LLC (c) 2004-2013 | |
| 6 | +--------------------------------------------------------------------+ |
| 7 | | This file is a part of CiviCRM. | |
| 8 | | | |
| 9 | | CiviCRM is free software; you can copy, modify, and distribute it | |
| 10 | | under the terms of the GNU Affero General Public License | |
| 11 | | Version 3, 19 November 2007 and the CiviCRM Licensing Exception. | |
| 12 | | | |
| 13 | | CiviCRM is distributed in the hope that it will be useful, but | |
| 14 | | WITHOUT ANY WARRANTY; without even the implied warranty of | |
| 15 | | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. | |
| 16 | | See the GNU Affero General Public License for more details. | |
| 17 | | | |
| 18 | | You should have received a copy of the GNU Affero General Public | |
| 19 | | License and the CiviCRM Licensing Exception along | |
| 20 | | with this program; if not, contact CiviCRM LLC | |
| 21 | | at info[AT]civicrm[DOT]org. If you have questions about the | |
| 22 | | GNU Affero General Public License or the licensing of CiviCRM, | |
| 23 | | see the CiviCRM license FAQ at http://civicrm.org/licensing | |
| 24 | +--------------------------------------------------------------------+ |
| 25 | *} |
| 26 | <script type="text/javascript"> |
| 27 | {literal} |
| 28 | function submitForm( ) { |
| 29 | var text = document.getElementById('text').value; |
| 30 | var table = document.getElementById('fulltext_table').value; |
| 31 | var url = {/literal}'{crmURL p="civicrm/contact/search/custom" h=0 q="csid=`$fullTextSearchID`&reset=1&force=1&text="}'{literal} + text; |
| 32 | if ( table ) { |
| 33 | url = url + '&table=' + table; |
| 34 | } |
| 35 | document.getElementById('id_fulltext_search').action = url; |
| 36 | } |
| 37 | {/literal} |
| 38 | </script> |
| 39 | |
| 40 | <div class="block-crm crm-container"> |
| 41 | <form method="post" id="id_fulltext_search"> |
| 42 | <div style="margin-bottom: 8px;"> |
| 43 | <input type="text" name="text" id='text' value="" style="width: 10em;" /> <input type="submit" name="submit" id="fulltext_submit" value="{ts}Go{/ts}" class="form-submit"/ onclick='submitForm();'> |
| 44 | <input type="hidden" name="qfKey" value="{crmKey name='CRM_Contact_Controller_Search' addSequence=1}" /> |
| 45 | </div> |
| 46 | <select class="form-select" id="fulltext_table" name="fulltext_table"> |
| 47 | {if call_user_func(array('CRM_Core_Permission','giveMeAllACLs'))} |
| 48 | <option value="">{ts}All{/ts}</option> |
| 49 | <option value="Contact">{ts}Contacts{/ts}</option> |
| 50 | {/if} |
| 51 | <option value="Activity">{ts}Activities{/ts}</option> |
| 52 | {if call_user_func(array('CRM_Core_Permission','access'), 'CiviCase')} |
| 53 | <option value="Case">{ts}Cases{/ts}</option> |
| 54 | {/if} |
| 55 | {if call_user_func(array('CRM_Core_Permission','access'), 'CiviContribute')} |
| 56 | <option value="Contribution">{ts}Contributions{/ts}</option> |
| 57 | {/if} |
| 58 | {if call_user_func(array('CRM_Core_Permission','access'), 'CiviEvent')} |
| 59 | <option value="Participant">{ts}Participants{/ts}</option> |
| 60 | {/if} |
| 61 | {if call_user_func(array('CRM_Core_Permission','access'), 'CiviMember')} |
| 62 | <option value="Membership">{ts}Memberships{/ts}</option> |
| 63 | {/if} |
| 64 | </select> {help id="id-fullText" file="CRM/Contact/Form/Search/Custom/FullText.hlp"} |
| 65 | </form> |
| 66 | </div> |