-
-
Notifications
You must be signed in to change notification settings - Fork 825
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
dev/core#101 Implement field spec pattern for advanced search form.
By implementing the field spec pattern as detailed in dev/core#115 extension developers have more control over what is displayed in this template without needing to resort to overriding it
- Loading branch information
Showing
7 changed files
with
220 additions
and
169 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
49 changes: 49 additions & 0 deletions
49
templates/CRM/Contact/Form/Search/Criteria/Fields/group.tpl
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
<div id='groupselect'> | ||
<label>{ts}Group(s){/ts} | ||
<span class="description"> | ||
(<a href="#" id='searchbygrouptype'>{ts}search by group type{/ts}</a>) | ||
</span> | ||
</label> | ||
<br/> | ||
{$form.group.html} | ||
</div> | ||
<div id='grouptypeselect'> | ||
<label> | ||
{ts}Group Type(s){/ts} | ||
<span class="description"> | ||
(<a href="#" id='searchbygroup'>{ts}search by group{/ts}</a>) | ||
</span> | ||
</label> | ||
<br/> | ||
{$form.group_type.html} | ||
{literal} | ||
<script type="text/javascript"> | ||
CRM.$(function ($) { | ||
function showGroupSearch() { | ||
$('#grouptypeselect').hide(); | ||
$('#groupselect').show(); | ||
$('#group_type').select2('val', ''); | ||
return false; | ||
} | ||
|
||
function showGroupTypeSearch() { | ||
$('#groupselect').hide(); | ||
$('#grouptypeselect').show(); | ||
$('#group').select2('val', ''); | ||
return false; | ||
} | ||
|
||
$('#searchbygrouptype').click(showGroupTypeSearch); | ||
$('#searchbygroup').click(showGroupSearch); | ||
|
||
if ($('#group_type').val()) { | ||
showGroupTypeSearch(); | ||
} | ||
else { | ||
showGroupSearch(); | ||
} | ||
|
||
}); | ||
</script> | ||
{/literal} | ||
</div> |
10 changes: 10 additions & 0 deletions
10
templates/CRM/Contact/Form/Search/Criteria/Fields/preferred_communication_method.tpl
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
{$form.preferred_communication_method.label} | ||
<br/> | ||
{$form.preferred_communication_method.html} | ||
<br/> | ||
|
||
{if $form.email_on_hold} | ||
<div class="spacer"></div> | ||
{$form.email_on_hold.html} | ||
{$form.email_on_hold.label} | ||
{/if} |
Oops, something went wrong.