-
-
Notifications
You must be signed in to change notification settings - Fork 824
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
10 changed files
with
226 additions
and
168 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
10 changes: 10 additions & 0 deletions
10
templates/CRM/Contact/Form/Search/Criteria/Fields/contact_tags.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 @@ | ||
<div class="search-field"> | ||
{$form.contact_tags.label}<br /> | ||
{$form.contact_tags.html} | ||
</div> | ||
|
||
{if $isTagset} | ||
<div class="search-field search-field__span-2"> | ||
{include file="CRM/common/Tagset.tpl"} | ||
</div> | ||
{/if} |
51 changes: 51 additions & 0 deletions
51
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,51 @@ | ||
<div class="search-field"> | ||
<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> | ||
</div> |
9 changes: 9 additions & 0 deletions
9
templates/CRM/Contact/Form/Search/Criteria/Fields/phone_numeric.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,9 @@ | ||
<div class="search-field"> | ||
<div> | ||
{$form.phone_numeric.label}<br/> | ||
{$form.phone_numeric.html} | ||
</div> | ||
<div class="description font-italic"> | ||
{ts}Punctuation and spaces are ignored.{/ts} | ||
</div> | ||
</div> |
12 changes: 12 additions & 0 deletions
12
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,12 @@ | ||
<div class="search-field"> | ||
{$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} | ||
</div> |
Oops, something went wrong.