First commit
This commit is contained in:
commit
c6e2478c40
13918 changed files with 2303184 additions and 0 deletions
|
@ -0,0 +1,104 @@
|
|||
{*
|
||||
+--------------------------------------------------------------------+
|
||||
| CiviCRM version 4.7 |
|
||||
+--------------------------------------------------------------------+
|
||||
| Copyright CiviCRM LLC (c) 2004-2017 |
|
||||
+--------------------------------------------------------------------+
|
||||
| This file is a part of CiviCRM. |
|
||||
| |
|
||||
| CiviCRM is free software; you can copy, modify, and distribute it |
|
||||
| under the terms of the GNU Affero General Public License |
|
||||
| Version 3, 19 November 2007 and the CiviCRM Licensing Exception. |
|
||||
| |
|
||||
| CiviCRM 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 and the CiviCRM Licensing Exception along |
|
||||
| with this program; if not, contact CiviCRM LLC |
|
||||
| at info[AT]civicrm[DOT]org. If you have questions about the |
|
||||
| GNU Affero General Public License or the licensing of CiviCRM, |
|
||||
| see the CiviCRM license FAQ at http://civicrm.org/licensing |
|
||||
+--------------------------------------------------------------------+
|
||||
*}
|
||||
<div class="crm-accordion-wrapper collapsed">
|
||||
<div class="crm-accordion-header">
|
||||
Advanced Settings
|
||||
</div><!-- /.crm-accordion-header -->
|
||||
<div class="crm-accordion-body">
|
||||
<div class="crm-block crm-form-block crm-uf-advancesetting-form-block">
|
||||
<table class="form-layout">
|
||||
<tr class="crm-uf-advancesetting-form-block-group">
|
||||
<td class="label">{$form.group.label}</td>
|
||||
<td>{$form.group.html} {help id='id-limit_group' file="CRM/UF/Form/Group.hlp"}</td>
|
||||
</tr>
|
||||
|
||||
<tr class="crm-uf-advancesetting-form-block-add_contact_to_group">
|
||||
<td class="label">{$form.add_contact_to_group.label}</td>
|
||||
<td>{$form.add_contact_to_group.html} {help id='id-add_group' file="CRM/UF/Form/Group.hlp"}</td>
|
||||
</tr>
|
||||
|
||||
<tr class="crm-uf-advancesetting-form-block-notify">
|
||||
<td class="label">{$form.notify.label}</td>
|
||||
<td>{$form.notify.html} {help id='id-notify_email' file="CRM/UF/Form/Group.hlp"}</td>
|
||||
</tr>
|
||||
|
||||
<tr class="crm-uf-advancesetting-form-block-post_URL">
|
||||
<td class="label">{$form.post_URL.label}</td>
|
||||
<td>{$form.post_URL.html} {help id='id-post_URL' file="CRM/UF/Form/Group.hlp"}</td>
|
||||
</tr>
|
||||
|
||||
<tr class="crm-uf-advancesetting-form-block-cancel_URL">
|
||||
<td class="label">{$form.cancel_URL.label}</td>
|
||||
<td>{$form.cancel_URL.html} {help id='id-cancel_URL' file="CRM/UF/Form/Group.hlp"}</td>
|
||||
</tr>
|
||||
|
||||
<tr class="crm-uf-advancesetting-form-block-cancel_button_text">
|
||||
<td class="label">{$form.cancel_button_text.label}</td>
|
||||
<td>{$form.cancel_button_text.html} {help id='id-cancel_button_text' file="CRM/UF/Form/Group.hlp"}</td>
|
||||
</tr>
|
||||
|
||||
<tr class="crm-uf-advancesetting-form-block-submit_button_text">
|
||||
<td class="label">{$form.submit_button_text.label}</td>
|
||||
<td>{$form.submit_button_text.html} {help id='id-submit_button_text' file="CRM/UF/Form/Group.hlp"}</td>
|
||||
</tr>
|
||||
|
||||
<tr class="crm-uf-advancesetting-form-block-add_captcha">
|
||||
<td class="label"></td>
|
||||
<td>{$form.add_captcha.html} {$form.add_captcha.label} {help id='id-add_captcha' file="CRM/UF/Form/Group.hlp"}</td>
|
||||
</tr>
|
||||
|
||||
<tr class="crm-uf-advancesetting-form-block-is_cms_user">
|
||||
<td class="label">{$form.is_cms_user.label}</td>
|
||||
<td>{$form.is_cms_user.html} {help id='id-is_cms_user' file="CRM/UF/Form/Group.hlp"}</td>
|
||||
</tr>
|
||||
|
||||
<tr class="crm-uf-advancesetting-form-block-is_update_dupe">
|
||||
<td class="label">{$form.is_update_dupe.label}</td>
|
||||
<td>{$form.is_update_dupe.html} {help id='id-is_update_dupe' file="CRM/UF/Form/Group.hlp"}</td>
|
||||
</tr>
|
||||
|
||||
<tr class="crm-uf-advancesetting-form-block-is_proximity_search">
|
||||
<td class="label">{$form.is_proximity_search.label}</td>
|
||||
<td>{$form.is_proximity_search.html} {help id='id-is_proximity_search' file="CRM/UF/Form/Group.hlp"}</td></tr>
|
||||
|
||||
<tr class="crm-uf-advancesetting-form-block-is_map">
|
||||
<td class="label"></td>
|
||||
<td>{$form.is_map.html} {$form.is_map.label} {help id='id-is_map' file="CRM/UF/Form/Group.hlp"}</td>
|
||||
</tr>
|
||||
|
||||
<tr class="crm-uf-advancesetting-form-block-is_edit_link">
|
||||
<td class="label"></td>
|
||||
<td>{$form.is_edit_link.html} {$form.is_edit_link.label} {help id='id-is_edit_link' file="CRM/UF/Form/Group.hlp"}</td>
|
||||
</tr>
|
||||
|
||||
<tr class="crm-uf-advancesetting-form-block-is_uf_link">
|
||||
<td class="label"></td>
|
||||
<td>{$form.is_uf_link.html} {$form.is_uf_link.label} {help id='id-is_uf_link' file="CRM/UF/Form/Group.hlp"}</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div><!-- / .crm-block -->
|
||||
</div><!-- /.crm-accordion-body -->
|
||||
</div><!-- /.crm-accordion-wrapper -->
|
60
sites/all/modules/civicrm/templates/CRM/UF/Form/Block.tpl
Normal file
60
sites/all/modules/civicrm/templates/CRM/UF/Form/Block.tpl
Normal file
|
@ -0,0 +1,60 @@
|
|||
{*
|
||||
+--------------------------------------------------------------------+
|
||||
| CiviCRM version 4.7 |
|
||||
+--------------------------------------------------------------------+
|
||||
| Copyright CiviCRM LLC (c) 2004-2017 |
|
||||
+--------------------------------------------------------------------+
|
||||
| This file is a part of CiviCRM. |
|
||||
| |
|
||||
| CiviCRM is free software; you can copy, modify, and distribute it |
|
||||
| under the terms of the GNU Affero General Public License |
|
||||
| Version 3, 19 November 2007 and the CiviCRM Licensing Exception. |
|
||||
| |
|
||||
| CiviCRM 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 and the CiviCRM Licensing Exception along |
|
||||
| with this program; if not, contact CiviCRM LLC |
|
||||
| at info[AT]civicrm[DOT]org. If you have questions about the |
|
||||
| GNU Affero General Public License or the licensing of CiviCRM, |
|
||||
| see the CiviCRM license FAQ at http://civicrm.org/licensing |
|
||||
+--------------------------------------------------------------------+
|
||||
*}
|
||||
{* Edit or display Profile fields, when embedded in an online contribution or event registration form. *}
|
||||
{if ! empty( $fields )}
|
||||
{strip}
|
||||
{if $help_pre && $action neq 4}<div class="messages help">{$help_pre}</div>{/if}
|
||||
{assign var=zeroField value="Initial Non Existent Fieldset"}
|
||||
{assign var=fieldset value=$zeroField}
|
||||
{include file="CRM/UF/Form/Fields.tpl"}
|
||||
|
||||
{if $field.groupHelpPost && $action neq 4 && $action neq 1028}
|
||||
<div class="messages help">{$field.groupHelpPost}</div>
|
||||
{/if}
|
||||
|
||||
{if $mode eq 4}
|
||||
<div class="crm-submit-buttons">
|
||||
{$form.buttons.html}
|
||||
</div>
|
||||
{/if}
|
||||
|
||||
{if $mode ne 8 && $action neq 1028 && !$hideFieldset}
|
||||
</fieldset>
|
||||
{/if}
|
||||
|
||||
{if $help_post && $action neq 4}<br /><div class="messages help">{$help_post}</div>{/if}
|
||||
{/strip}
|
||||
|
||||
{/if} {* fields array is not empty *}
|
||||
|
||||
{literal}
|
||||
<script type="text/javascript">
|
||||
CRM.$(function($) {
|
||||
$('#selector tr:even').addClass('odd-row');
|
||||
$('#selector tr:odd ').addClass('even-row');
|
||||
});
|
||||
</script>
|
||||
{/literal}
|
110
sites/all/modules/civicrm/templates/CRM/UF/Form/Field.hlp
Normal file
110
sites/all/modules/civicrm/templates/CRM/UF/Form/Field.hlp
Normal file
|
@ -0,0 +1,110 @@
|
|||
{htxt id='field_name_0-title'}
|
||||
{ts}Field Name{/ts}
|
||||
{/htxt}
|
||||
{htxt id='field_name_0'}
|
||||
{capture assign="ltURL"}{crmURL p="civicrm/admin/locationType" q="reset=1"}{/capture}
|
||||
<p>
|
||||
{ts}Choose the field to add to the profile.{/ts}<br/>
|
||||
<strong>{ts}Restrictions:{/ts}</strong><br/>
|
||||
{ts}Only one field of each communication type (EG. phone) can use the primary location type.{/ts}
|
||||
</p>
|
||||
<p>
|
||||
{ts 1=$ltURL}When you choose the primary location type the collected data will use the default location type from the <a href="%1">Location types</a> setup.{/ts}
|
||||
</p>
|
||||
{/htxt}
|
||||
|
||||
{htxt id='label-title'}
|
||||
{ts}Field Label{/ts}
|
||||
{/htxt}
|
||||
{htxt id='label'}
|
||||
<p>
|
||||
{ts}The field label displayed on the form (over-ride the default field label here, if desired).{/ts}
|
||||
</p>
|
||||
{/htxt}
|
||||
|
||||
{htxt id='is_multi_summary-title'}
|
||||
{ts}Multi-record listing{/ts}
|
||||
{/htxt}
|
||||
{htxt id='is_multi_summary'}
|
||||
<p>
|
||||
{ts}Fields which are part of a custom data set that supports multiple records will be listed below the standard single-record fields when in profile edit view. Use this option to determine which fields you want displayed in that listing{/ts}
|
||||
</p>
|
||||
{/htxt}
|
||||
|
||||
{htxt id='is_required-title'}
|
||||
{ts}Required{/ts}
|
||||
{/htxt}
|
||||
{htxt id='is_required'}
|
||||
<p>
|
||||
{ts}Are users required to complete this field?{/ts}
|
||||
</p>
|
||||
{/htxt}
|
||||
|
||||
{htxt id='is_view-title'}
|
||||
{ts}View Only{/ts}
|
||||
{/htxt}
|
||||
{htxt id='is_view'}
|
||||
<p>
|
||||
{ts}If checked, users can view but not edit this field.{/ts}
|
||||
</p>
|
||||
<p>
|
||||
{ts}NOTE: View Only fields can not be included in Profile Search forms.{/ts}
|
||||
</p>
|
||||
{/htxt}
|
||||
|
||||
{htxt id='visibility-title'}
|
||||
{ts}Visibility{/ts}
|
||||
{/htxt}
|
||||
{htxt id='visibility'}
|
||||
<p>
|
||||
{ts}Is this field hidden from public search ('User and User Admin Only'), or is it visible to the public and potentially searchable in the Profile Search form ('Expose Publicly' or 'Expose Publicly and for Listings')? ('User and User Admin Only') fields can still be used for Edit and Create mode.{/ts}
|
||||
</p>
|
||||
<p>
|
||||
{ts}When visibility is 'Expose Publicly and for Listings', users can also click the field value when viewing a contact in order to locate other contacts with the same value(s) (i.e. other contacts who live in Poland).{/ts}
|
||||
</p>
|
||||
{/htxt}
|
||||
|
||||
{htxt id='is_searchable-title'}
|
||||
{ts}Searchable{/ts}
|
||||
{/htxt}
|
||||
{htxt id='is_searchable'}
|
||||
<p>
|
||||
{ts}Do you want to include this field in the Profile's Search form?{/ts}
|
||||
</p>
|
||||
{/htxt}
|
||||
|
||||
{htxt id='in_selector-title'}
|
||||
{ts}Results Column{/ts}
|
||||
{/htxt}
|
||||
{htxt id='in_selector'}
|
||||
<p>
|
||||
{ts}Is this field included as a column in the search results table? This setting applies only to fields with 'Public Pages' or 'Public Pages and Listings' visibility.{/ts}
|
||||
</p>
|
||||
{/htxt}
|
||||
|
||||
{htxt id='help-title'}
|
||||
{ts}Help Text{/ts}
|
||||
{/htxt}
|
||||
{htxt id='help'}
|
||||
<p>
|
||||
{ts}Explanatory text displayed to users for this field (can include HTML formatting tags).{/ts}
|
||||
</p>
|
||||
{/htxt}
|
||||
|
||||
{htxt id='weight-title'}
|
||||
{ts}Order{/ts}
|
||||
{/htxt}
|
||||
{htxt id='weight'}
|
||||
<p>
|
||||
{ts}Weight controls the order in which fields are displayed within a profile. Enter a positive or negative integer - lower numbers are displayed ahead of higher numbers. Note: The field order will not respect non-multi fields interspersed with multi record fields in edit mode.{/ts}
|
||||
</p>
|
||||
{/htxt}
|
||||
|
||||
{htxt id='is_active-title'}
|
||||
{ts}Active{/ts}
|
||||
{/htxt}
|
||||
{htxt id='is_active'}
|
||||
<p>
|
||||
{ts}Disable this option to remove the field from the profile without deleting it.{/ts}
|
||||
</p>
|
||||
{/htxt}
|
304
sites/all/modules/civicrm/templates/CRM/UF/Form/Field.tpl
Normal file
304
sites/all/modules/civicrm/templates/CRM/UF/Form/Field.tpl
Normal file
|
@ -0,0 +1,304 @@
|
|||
{*
|
||||
+--------------------------------------------------------------------+
|
||||
| CiviCRM version 4.7 |
|
||||
+--------------------------------------------------------------------+
|
||||
| Copyright CiviCRM LLC (c) 2004-2017 |
|
||||
+--------------------------------------------------------------------+
|
||||
| This file is a part of CiviCRM. |
|
||||
| |
|
||||
| CiviCRM is free software; you can copy, modify, and distribute it |
|
||||
| under the terms of the GNU Affero General Public License |
|
||||
| Version 3, 19 November 2007 and the CiviCRM Licensing Exception. |
|
||||
| |
|
||||
| CiviCRM 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 and the CiviCRM Licensing Exception along |
|
||||
| with this program; if not, contact CiviCRM LLC |
|
||||
| at info[AT]civicrm[DOT]org. If you have questions about the |
|
||||
| GNU Affero General Public License or the licensing of CiviCRM, |
|
||||
| see the CiviCRM license FAQ at http://civicrm.org/licensing |
|
||||
+--------------------------------------------------------------------+
|
||||
*}
|
||||
<div class="crm-block crm-form-block crm-uf-field-form-block">
|
||||
{if $action eq 8}
|
||||
<div class="messages status no-popup">
|
||||
<div class="icon inform-icon"></div>
|
||||
{ts}WARNING: Deleting this profile field will remove it from Profile forms and listings. If this field is used in any 'stand-alone' Profile forms, you will need to update those forms to remove this field.{/ts} {ts}Do you want to continue?{/ts}
|
||||
</div>
|
||||
{else}
|
||||
<div class="crm-submit-buttons">{include file="CRM/common/formButtons.tpl" location="top"}</div>
|
||||
<table class="form-layout-compressed">
|
||||
<tr class="crm-uf-field-form-block-field_name">
|
||||
<td class="label">{$form.field_name.label} {help id='field_name_0'}</td>
|
||||
<td>{$form.field_name.html}<br />
|
||||
<span class="description"> {ts}Select the type of CiviCRM record and the field you want to include in this Profile.{/ts}</span></td>
|
||||
</tr>
|
||||
<tr class="crm-uf-field-form-block-label">
|
||||
<td class="label">{$form.label.label} {help id='label'}{if $action == 2}{include file='CRM/Core/I18n/Dialog.tpl' table='civicrm_uf_field' field='label' id=$fieldId}{/if}</td>
|
||||
<td>{$form.label.html}</td>
|
||||
</tr>
|
||||
<tr class="crm-uf-field-form-block-is_multi">
|
||||
<td class="label">{$form.is_multi_summary.label}{help id='is_multi_summary'}</td>
|
||||
<td>{$form.is_multi_summary.html}<br />
|
||||
</tr>
|
||||
<tr class="crm-uf-field-form-block-is_required">
|
||||
<td class="label">{$form.is_required.label} {help id='is_required'}</td>
|
||||
<td>{$form.is_required.html}</td>
|
||||
</tr>
|
||||
<tr class="crm-uf-field-form-block-is_view">
|
||||
<td class="label">{$form.is_view.label} {help id='is_view'}</td>
|
||||
<td>{$form.is_view.html}</td>
|
||||
</tr>
|
||||
<tr id="profile_visibility" class="crm-uf-field-form-block-visibility">
|
||||
<td class="label">{$form.visibility.label} {help id='visibility'}</td>
|
||||
<td>{$form.visibility.html}</td>
|
||||
</tr>
|
||||
<tr class="crm-uf-field-form-block-is_searchable">
|
||||
<td class="label"><div id="is_search_label">{$form.is_searchable.label} {help id='is_searchable'}</div></td>
|
||||
<td><div id="is_search_html">{$form.is_searchable.html}</td>
|
||||
</tr>
|
||||
<tr class="crm-uf-field-form-block-in_selector">
|
||||
<td class="label"><div id="in_selector_label">{$form.in_selector.label}{help id='in_selector'}</div></td>
|
||||
<td><div id="in_selector_html">{$form.in_selector.html}</div></td>
|
||||
</tr>
|
||||
<tr class="crm-uf-field-form-block-help_pre">
|
||||
<td class="label">{$form.help_pre.label}{if $action == 2}{include file='CRM/Core/I18n/Dialog.tpl' table='civicrm_uf_field' field='help_pre' id=$fieldId}{/if} {help id='help'}</td>
|
||||
<td>{$form.help_pre.html}</td>
|
||||
</tr>
|
||||
<tr class="crm-uf-field-form-block-help_post">
|
||||
<td class="label">{$form.help_post.label}{if $action == 2}{include file='CRM/Core/I18n/Dialog.tpl' table='civicrm_uf_field' field='help_post' id=$fieldId}{/if} {help id='help'}</td>
|
||||
<td>{$form.help_post.html}</td>
|
||||
</tr>
|
||||
<tr class="crm-uf-field-form-block-weight">
|
||||
<td class="label">{$form.weight.label} {help id='weight'}</td>
|
||||
<td> {$form.weight.html}</td>
|
||||
</tr>
|
||||
<tr class="crm-uf-field-form-block-is_active">
|
||||
<td class="label">{$form.is_active.label} {help id='is_active'}</td>
|
||||
<td>{$form.is_active.html}</td>
|
||||
</tr>
|
||||
</table>
|
||||
{/if}
|
||||
<div class="crm-submit-buttons">{include file="CRM/common/formButtons.tpl" location="bottom"}</div>
|
||||
</div>
|
||||
|
||||
{$initHideBoxes}
|
||||
|
||||
{literal}
|
||||
<script type="text/javascript">
|
||||
|
||||
CRM.$(function($) {
|
||||
var otherModule = {/literal}{$otherModules|@json_encode}{literal};
|
||||
if ( $.inArray( "Profile", otherModule ) > -1 && $.inArray( "Search Profile", otherModule ) == -1 ){
|
||||
$('#profile_visibility').show();
|
||||
}
|
||||
else if( $.inArray( "Search Profile", otherModule ) > -1 ){
|
||||
$('#profile_visibility').show();
|
||||
$("#in_selector").prop('checked',true);
|
||||
}
|
||||
else if( $.inArray( "Profile", otherModule ) == -1 && $.inArray( "Search Profile", otherModule ) == -1 ){
|
||||
$('#profile_visibility').hide();
|
||||
}
|
||||
$('[id^=field_name]').change(function() {
|
||||
showLabel();
|
||||
mixProfile();
|
||||
});
|
||||
});
|
||||
|
||||
var preHelpLabel = "";
|
||||
function showLabel( ) {
|
||||
if (preHelpLabel) {
|
||||
cj(".crm-uf-field-form-block-help_pre .label").html(preHelpLabel);
|
||||
}
|
||||
var $elements = cj(".crm-uf-field-form-block-is_view, .crm-uf-field-form-block-is_required, .crm-uf-field-form-block-visibility, .crm-uf-field-form-block-is_searchable, .crm-uf-field-form-block-in_selector, .crm-uf-field-form-block-help_post");
|
||||
|
||||
$elements.show();
|
||||
|
||||
if (cj('[name="field_name[0]"]').val() == "Formatting") {
|
||||
if (!preHelpLabel) {
|
||||
preHelpLabel = cj(".crm-uf-field-form-block-help_post .label").html();
|
||||
}
|
||||
cj(".crm-uf-field-form-block-help_pre .label").html('<label for="help_pre">HTML Code</label>');
|
||||
$elements.hide();
|
||||
}
|
||||
|
||||
// Set the Field Label
|
||||
var labelValue = '';
|
||||
if (cj('[name="field_name[0]"]').val()) {
|
||||
var fieldId = cj('[name="field_name[1]"]').val();
|
||||
if (fieldId) {
|
||||
labelValue = cj('[name="field_name[1]"] :selected').text().split(' :: ', 2)[0];
|
||||
if (cj('[name="field_name[3]"]').val()) {
|
||||
labelValue += '-' + cj('[name="field_name[3]"] :selected').text();
|
||||
}
|
||||
if (cj('[name="field_name[2]"]').val()) {
|
||||
labelValue += ' (' + cj('[name="field_name[2]"] :selected').text() + ')';
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
cj('#label').val(labelValue);
|
||||
|
||||
/* Code to hide searchable attribute for no searchable fields */
|
||||
if (document.getElementsByName("field_name[1]")[0].selectedIndex == -1) {
|
||||
return;
|
||||
}
|
||||
var field2 = document.getElementsByName("field_name[1]")[0][document.getElementsByName("field_name[1]")[0].selectedIndex].text;
|
||||
{/literal}
|
||||
{foreach from=$noSearchable key=dnc item=val}
|
||||
{literal}
|
||||
if (field2 == "{/literal}{$val}{literal}") {
|
||||
cj('#is_search_label, #is_search_html').hide();
|
||||
}
|
||||
{/literal}
|
||||
{/foreach}
|
||||
{literal}
|
||||
|
||||
// Code to set Profile Field help, from custom data field help
|
||||
if (fieldId.substring(0, 7) == 'custom_') {
|
||||
fieldId = fieldId.substring( fieldId.length, 7);
|
||||
var dataUrl = {/literal}"{crmURL p='civicrm/ajax/custom' h=0 }"{literal};
|
||||
cj.post( dataUrl, { id: fieldId }, function(data) {
|
||||
cj('#help_post').val(data.help_post);
|
||||
cj('#help_pre').val(data.help_pre);
|
||||
}, 'json');
|
||||
}
|
||||
}
|
||||
|
||||
{/literal}{if $action neq 8}{literal}
|
||||
showHideSeletorSearch();
|
||||
|
||||
function showHideSeletorSearch() {
|
||||
var is_search = cj('#is_search_label, #is_search_html');
|
||||
var in_selector = cj('#in_selector_label, #in_selector_html');
|
||||
if (cj("#visibility").val() == "User and User Admin Only") {
|
||||
is_search.hide();
|
||||
in_selector.hide();
|
||||
cj("#is_searchable").prop('checked',false);
|
||||
}
|
||||
else {
|
||||
if (!cj("#is_view").prop('checked')) {
|
||||
is_search.show();
|
||||
}
|
||||
var fldName = cj("#field_name_1").val();
|
||||
if (fldName == 'group' || fldName == 'tag') {
|
||||
in_selector.hide();
|
||||
}
|
||||
else {
|
||||
in_selector.show();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
cj("#field_name_1").bind( 'change blur', function( ) {
|
||||
showHideSeletorSearch( );
|
||||
});
|
||||
|
||||
CRM.$(function($) {
|
||||
cj("#field_name_1").addClass( 'huge' );
|
||||
viewOnlyShowHide( );
|
||||
cj("#is_view").click( function(){
|
||||
viewOnlyShowHide();
|
||||
});
|
||||
});
|
||||
{/literal}{/if}{literal}
|
||||
|
||||
cj("#field_name_1").change(
|
||||
function() {
|
||||
multiSummaryToggle(cj(this).val());
|
||||
});
|
||||
|
||||
CRM.$(function($) {
|
||||
var fieldId = cj("#field_name_1").val();
|
||||
multiSummaryToggle(fieldId);
|
||||
});
|
||||
|
||||
function multiSummaryToggle(customId) {
|
||||
if (customId && customId.match(/custom_[\d]/)) {
|
||||
|
||||
var dataUrl = "{/literal}{crmURL p='civicrm/ajax/rest' q='className=CRM_UF_Page_AJAX&fnName=checkIsMultiRecord&json=1' h=0 }"{literal};
|
||||
dataUrl = dataUrl + '&customId=' + customId;
|
||||
cj.ajax({ url: dataUrl,
|
||||
async: false,
|
||||
global: false,
|
||||
dataType : 'json',
|
||||
success : function(response) {
|
||||
if (response.is_multi != 0 ) {
|
||||
cj('.crm-uf-field-form-block-is_multi').show();
|
||||
}
|
||||
else {
|
||||
if (cj('#is_multi_summary').is(':checked')) {
|
||||
cj('#is_multi_summary').prop('checked', false);
|
||||
}
|
||||
cj('.crm-uf-field-form-block-is_multi').hide();
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
else {
|
||||
if (cj('#is_multi_summary').is(':checked')) {
|
||||
cj('#is_multi_summary').prop('checked', false);
|
||||
}
|
||||
cj('.crm-uf-field-form-block-is_multi').hide();
|
||||
}
|
||||
}
|
||||
|
||||
function viewOnlyShowHide() {
|
||||
var is_search = cj('#is_search_label, #is_search_html');
|
||||
if (cj("#is_view").prop('checked')) {
|
||||
is_search.hide();
|
||||
cj("#is_searchable").prop('checked', false);
|
||||
}
|
||||
else if (cj("#visibility").val() != "User and User Admin Only") {
|
||||
is_search.show();
|
||||
}
|
||||
}
|
||||
|
||||
//CRM-4363
|
||||
function mixProfile( ) {
|
||||
var allMixTypes = ["Participant", "Membership", "Contribution"];
|
||||
var type = document.forms.Field['field_name[0]'].value;
|
||||
var alreadyMixProfile = {/literal}{if $alreadyMixProfile}true{else}false{/if}{literal};
|
||||
if (allMixTypes.indexOf( type ) != -1 || alreadyMixProfile) {
|
||||
if (document.getElementById("is_searchable").checked) {
|
||||
document.getElementById("is_searchable").checked = false;
|
||||
if ( alreadyMixProfile ) {
|
||||
var message = {/literal}'{ts escape="js"}You can not mark fields as Searchable in a profile that contains fields for multiple record types.{/ts}'{literal};
|
||||
}
|
||||
else {
|
||||
var message = type + {/literal}'{ts escape="js"} fields can not be marked as Searchable in a profile.{/ts}'{literal};
|
||||
}
|
||||
cj().crmError(message, {/literal}'{ts escape="js"}Error{/ts}'{literal});
|
||||
}
|
||||
if ( document.getElementById("in_selector").checked ) {
|
||||
document.getElementById("in_selector").checked = false;
|
||||
if ( alreadyMixProfile ) {
|
||||
var message = {/literal}'{ts escape="js"}You can not mark a field as a Result Column in a profile that contains fields from multiple record types.{/ts}'{literal};
|
||||
}
|
||||
else {
|
||||
var message = type + {/literal}'{ts escape="js"} can not be used as a Result Column for profile searches.{/ts}'{literal};
|
||||
}
|
||||
cj().crmError(message, {/literal}'{ts escape="js"}Error{/ts}'{literal});
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function verify( ) {
|
||||
var allMixTypes = ["Participant", "Membership", "Contribution"];
|
||||
var type = document.forms.Field['field_name[0]'].value;
|
||||
if ( allMixTypes.indexOf( type ) != -1 ) {
|
||||
var message = {/literal}'{ts escape='js'}Oops. One or more fields in this profile are configured to be Searchable and / or shown in a Results Column, AND you are trying to add a {/ts}'
|
||||
+ type + '{ts} field. Profiles with a mixture of field types can not include Searchable or Results Column fields. If you save this field now, the Seachable and Results Column settings will be removed for all fields in this profile. Do you want to continue?{/ts}'{literal};
|
||||
var ok = confirm( message );
|
||||
if ( !ok ) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
</script>
|
||||
{/literal}
|
142
sites/all/modules/civicrm/templates/CRM/UF/Form/Fields.tpl
Normal file
142
sites/all/modules/civicrm/templates/CRM/UF/Form/Fields.tpl
Normal file
|
@ -0,0 +1,142 @@
|
|||
{foreach from=$fields item=field key=fieldName}
|
||||
{if $field.skipDisplay}
|
||||
{continue}
|
||||
{/if}
|
||||
|
||||
{assign var=profileFieldName value=$field.name}
|
||||
{if $prefix}
|
||||
{assign var="formElement" value=$form.$prefix.$profileFieldName}
|
||||
{else}
|
||||
{assign var="formElement" value=$form.$profileFieldName}
|
||||
{/if}
|
||||
|
||||
{if $field.groupTitle != $fieldset}
|
||||
{if $fieldset != $zeroField}
|
||||
{if $groupHelpPost && $action neq 4}
|
||||
<div class="messages help">{$groupHelpPost}</div>
|
||||
{/if}
|
||||
{if $mode ne 8}
|
||||
</fieldset>
|
||||
{/if}
|
||||
{/if}
|
||||
|
||||
{if $mode ne 8 && $action ne 1028 && $action ne 4 && !$hideFieldset}
|
||||
<fieldset class="crm-profile crm-profile-id-{$field.group_id} crm-profile-name-{$field.groupName}"><legend>{$field.groupTitle}</legend>
|
||||
{/if}
|
||||
|
||||
{if ($form.formName eq 'Confirm' OR $form.formName eq 'ThankYou') AND $prefix neq 'honor'}
|
||||
<div class="header-dark">{$field.groupTitle} </div>
|
||||
{/if}
|
||||
{assign var=fieldset value=`$field.groupTitle`}
|
||||
{assign var=groupHelpPost value=`$field.groupHelpPost`}
|
||||
{if $field.groupHelpPre && $action neq 4 && $action neq 1028}
|
||||
<div class="messages help">{$field.groupHelpPre}</div>
|
||||
{/if}
|
||||
{/if}
|
||||
|
||||
{if $field.field_type eq "Formatting"}
|
||||
{if $action neq 4 && $action neq 1028}
|
||||
{$field.help_pre}
|
||||
{/if}
|
||||
{elseif $profileFieldName}
|
||||
{* Show explanatory text for field if not in 'view' or 'preview' modes *}
|
||||
{if $field.help_pre && $action neq 4 && $action neq 1028}
|
||||
<div class="crm-section helprow-{$profileFieldName}-section helprow-pre" id="helprow-{$profileFieldName}">
|
||||
<div class="content description">{$field.help_pre}</div>
|
||||
</div>
|
||||
{/if}
|
||||
{if $field.options_per_line != 0}
|
||||
<div class="crm-section editrow_{$profileFieldName}-section form-item" id="editrow-{$profileFieldName}">
|
||||
<div class="label option-label">{$formElement.label}</div>
|
||||
<div class="content 3">
|
||||
|
||||
{assign var="count" value="1"}
|
||||
{strip}
|
||||
<table class="form-layout-compressed">
|
||||
<tr>
|
||||
{* sort by fails for option per line. Added a variable to iterate through the element array*}
|
||||
{assign var="index" value="1"}
|
||||
{foreach name=outer key=key item=item from=$formElement}
|
||||
{if $index < 10}
|
||||
{assign var="index" value=`$index+1`}
|
||||
{else}
|
||||
<td class="labels font-light">{$formElement.$key.html}</td>
|
||||
{if $count == $field.options_per_line}
|
||||
</tr>
|
||||
<tr>
|
||||
{assign var="count" value="1"}
|
||||
{else}
|
||||
{assign var="count" value=`$count+1`}
|
||||
{/if}
|
||||
{/if}
|
||||
{/foreach}
|
||||
</tr>
|
||||
</table>
|
||||
{/strip}
|
||||
</div>
|
||||
<div class="clear"></div>
|
||||
</div>
|
||||
{else}
|
||||
<div class="crm-section editrow_{$profileFieldName}-section form-item" id="editrow-{$profileFieldName}">
|
||||
<div class="label">
|
||||
{$formElement.label}
|
||||
</div>
|
||||
<div class="content">
|
||||
{if $profileFieldName|substr:0:3 eq 'im-'}
|
||||
{assign var="provider" value=profileFieldNamen|cat:"-provider_id"}
|
||||
{$form.$provider.html}
|
||||
{/if}
|
||||
|
||||
{if $profileFieldName eq 'email_greeting' or $profileFieldName eq 'postal_greeting' or $profileFieldName eq 'addressee'}
|
||||
{include file="CRM/Profile/Form/GreetingType.tpl"}
|
||||
{elseif ($profileFieldName eq 'group' && $form.group) || ($profileFieldName eq 'tag' && $form.tag)}
|
||||
{include file="CRM/Contact/Form/Edit/TagsAndGroups.tpl" type=$profileFieldName title=null context="profile"}
|
||||
{elseif $field.is_datetime_field && $action & 4}
|
||||
<span class="crm-frozen-field">
|
||||
{$formElement.value|crmDate:$field.smarty_view_format}
|
||||
<input type="hidden"
|
||||
name="{$formElement.name}"
|
||||
value="{$formElement.value}" id="{$formElement.name}"
|
||||
>
|
||||
</span>
|
||||
{elseif $profileFieldName|substr:0:5 eq 'phone'}
|
||||
{assign var="phone_ext_field" value=$profileFieldName|replace:'phone':'phone_ext'}
|
||||
{$formElement.html}
|
||||
{if $form.$phone_ext_field.html}
|
||||
{$form.$phone_ext_field.html}
|
||||
{/if}
|
||||
{else}
|
||||
{if $prefix}
|
||||
{if $profileFieldName eq 'organization_name' && !empty($form.onbehalfof_id)}
|
||||
{$form.onbehalfof_id.html}
|
||||
{/if}
|
||||
{if $field.html_type eq 'File' && $viewOnlyPrefixFileValues}
|
||||
{$viewOnlyPrefixFileValues.$prefix.$profileFieldName}
|
||||
{else}
|
||||
{$formElement.html}
|
||||
{/if}
|
||||
{elseif $field.html_type eq 'File' && $viewOnlyFileValues}
|
||||
{$viewOnlyFileValues.$profileFieldName}
|
||||
{else}
|
||||
{$formElement.html}
|
||||
{/if}
|
||||
{/if}
|
||||
|
||||
{*CRM-4564*}
|
||||
{if $field.html_type eq 'Autocomplete-Select'}
|
||||
{if $field.data_type eq 'ContactReference'}
|
||||
{include file="CRM/Custom/Form/ContactReference.tpl" element_name = $profileFieldName}
|
||||
{/if}
|
||||
{/if}
|
||||
</div>
|
||||
<div class="clear"></div>
|
||||
</div>
|
||||
{/if}
|
||||
{* Show explanatory text for field if not in 'view' or 'preview' modes *}
|
||||
{if $field.help_post && $action neq 4 && $action neq 1028}
|
||||
<div class="crm-section helprow-{$profileFieldName}-section helprow-post" id="helprow-{$profileFieldName}">
|
||||
<div class="content description">{$field.help_post}</div>
|
||||
</div>
|
||||
{/if}
|
||||
{/if}
|
||||
{/foreach}
|
191
sites/all/modules/civicrm/templates/CRM/UF/Form/Group.hlp
Normal file
191
sites/all/modules/civicrm/templates/CRM/UF/Form/Group.hlp
Normal file
|
@ -0,0 +1,191 @@
|
|||
{*
|
||||
+--------------------------------------------------------------------+
|
||||
| CiviCRM version 4.7 |
|
||||
+--------------------------------------------------------------------+
|
||||
| Copyright CiviCRM LLC (c) 2004-2017 |
|
||||
+--------------------------------------------------------------------+
|
||||
| This file is a part of CiviCRM. |
|
||||
| |
|
||||
| CiviCRM is free software; you can copy, modify, and distribute it |
|
||||
| under the terms of the GNU Affero General Public License |
|
||||
| Version 3, 19 November 2007 and the CiviCRM Licensing Exception. |
|
||||
| |
|
||||
| CiviCRM 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 and the CiviCRM Licensing Exception along |
|
||||
| with this program; if not, contact CiviCRM LLC |
|
||||
| at info[AT]civicrm[DOT]org. If you have questions about the |
|
||||
| GNU Affero General Public License or the licensing of CiviCRM, |
|
||||
| see the CiviCRM license FAQ at http://civicrm.org/licensing |
|
||||
+--------------------------------------------------------------------+
|
||||
*}
|
||||
{htxt id='id-description-title'}
|
||||
{ts}Help Description{/ts}
|
||||
{/htxt}
|
||||
{htxt id='id-description'}
|
||||
{ts}Explanatory text for profile.{/ts}
|
||||
{/htxt}
|
||||
|
||||
{htxt id='id-used_for-title'}
|
||||
{ts}Used For{/ts}
|
||||
{/htxt}
|
||||
{htxt id='id-used_for'}
|
||||
{ts}Profiles can be used in many different ways (and a single profile can be used in multiple contexts){/ts}:<br />
|
||||
<ul class="left-alignment">
|
||||
<li>{ts}You can collect additional information about a donor or event participant by including profiles directly in Online Contribution Pages and Event Registration forms. When using a profile in this manner you do not need to check any of the "Used For" checkboxes.{/ts}</li>
|
||||
<li>{ts}Check <strong>Standalone Form or Directory</strong> if you want it to use this profile for custom forms, or contact listing and view screens (from the civicrm/profile path).{/ts}</li>
|
||||
<li>{ts}Check <strong>Search Results</strong> to use this profile to display an alternate set of results columns for CiviCRM Basic and Advanced Search.{/ts}</li>
|
||||
{if $config->userSystem->supports_form_extensions EQ '1'}
|
||||
<li>{ts}Check <strong>User Registration</strong> if you want this Profile to be included in the New Account registration form.{/ts}</li>
|
||||
<li>{ts}Check <strong>View/Edit User Account</strong> to include it in the view and edit screens for existing user accounts.{/ts}</li>
|
||||
{/if}
|
||||
</ul>
|
||||
{docURL page="user/organising-your-data/profiles/"}
|
||||
{/htxt}
|
||||
|
||||
{htxt id='id-profile_weight-title'}
|
||||
{ts}Weight{/ts}
|
||||
{/htxt}
|
||||
{htxt id='id-profile_weight'}
|
||||
{ts}Weight controls the order in which profiles are presented when more than one profile is included in User Registration or My Account screens. Enter a positive or negative integer - lower numbers are displayed ahead of higher numbers.{/ts}
|
||||
{/htxt}
|
||||
|
||||
{htxt id='id-help_pre-title'}
|
||||
{ts}Help Pre-Form{/ts}
|
||||
{/htxt}
|
||||
{htxt id='id-help_pre'}
|
||||
{ts}Explanatory text displayed at the beginning of the form.{/ts}{ts}Note that this help text is displayed on profile create/edit screens only.{/ts}
|
||||
{/htxt}
|
||||
|
||||
{htxt id='id-help_post-title'}
|
||||
{ts}Help Post-Form{/ts}
|
||||
{/htxt}
|
||||
{htxt id='id-help_post'}
|
||||
{ts}Explanatory text displayed at the end of the form.{/ts}{ts}Note that this help text is displayed on profile create/edit screens only.{/ts}
|
||||
{/htxt}
|
||||
|
||||
{htxt id='id-limit_group-title'}
|
||||
{ts}Limit Group{/ts}
|
||||
{/htxt}
|
||||
{htxt id='id-limit_group'}
|
||||
{ts}Select a group if you are using this profile for search and listings, AND you want to limit the listings to members of a specific group.{/ts}
|
||||
{/htxt}
|
||||
|
||||
{htxt id='id-add_group-title'}
|
||||
{ts}Add to Group{/ts}
|
||||
{/htxt}
|
||||
{htxt id='id-add_group'}
|
||||
{ts}Select a group if you are using this profile for adding new contacts, AND you want the new contacts to be automatically assigned to a group.{/ts}
|
||||
{/htxt}
|
||||
|
||||
{htxt id='id-notify_email-title'}
|
||||
{ts}Notify Email{/ts}
|
||||
{/htxt}
|
||||
{htxt id='id-notify_email'}
|
||||
{ts}If you want member(s) of your organization to receive a notification email whenever this Profile form is used to enter or update contact information, enter one or more email addresses here. Multiple email addresses should be separated by a comma (e.g. jane@example.org, paula@example.org). The first email address listed will be used as the FROM address in the notifications.{/ts}
|
||||
{/htxt}
|
||||
|
||||
{htxt id='id-post_URL-title'}
|
||||
{ts}Redirect{/ts}
|
||||
{/htxt}
|
||||
{htxt id='id-post_URL'}
|
||||
{ts}If you are using this profile as a contact signup or edit form, and want to redirect the user to a static URL after they've submitted the form, you can also use contact tokens in URL - enter the complete URL here. If this field is left blank, the built-in Profile form will be redisplayed with a generic status message - 'Your contact information has been saved.'{/ts}
|
||||
{/htxt}
|
||||
|
||||
{htxt id='id-cancel_URL-title'}
|
||||
{ts}Cancel Redirect{/ts}
|
||||
{/htxt}
|
||||
{htxt id='id-cancel_URL'}
|
||||
{ts}If you are using this profile as a contact signup or edit form, and want to redirect the user to a static URL if they click the Cancel button - enter the complete URL here. If this field is left blank, the built-in Profile form will be redisplayed.{/ts}
|
||||
{/htxt}
|
||||
|
||||
{htxt id='id-cancel_button_text-title'}
|
||||
{ts}Cancel Button Text{/ts}
|
||||
{/htxt}
|
||||
{htxt id='id-cancel_button_text'}
|
||||
{ts}Override the default button text for the cancel button for this profile{/ts}
|
||||
{/htxt}
|
||||
|
||||
{htxt id='id-submit_button_text-title'}
|
||||
{ts}Submit Button Text{/ts}
|
||||
{/htxt}
|
||||
{htxt id='id-submit_button_text'}
|
||||
{ts}Override the default button text for the submit button for this profile{/ts}
|
||||
{/htxt}
|
||||
|
||||
{htxt id='id-add_captcha-title'}
|
||||
{ts}reCaptcha{/ts}
|
||||
{/htxt}
|
||||
{htxt id='id-add_captcha'}
|
||||
{capture assign="miscURL"}{crmURL p="civicrm/admin/setting/misc" q="reset=1"}{/capture}
|
||||
<p>{ts}When reCAPTCHA is enabled for a profile form, anonymous users are required to read an image with letters and numbers and enter the value in a field. This helps prevent abuse by automated scripts.{/ts}</p>
|
||||
<p>{ts 1="https://www.google.com/recaptcha" 2=$miscURL}To use reCAPTCHA you must sign up at <a href="%1" target="_blank">Google's reCaptcha site</a> to get your public and private keys. Then enter both keys in <a href="%2">Administer CiviCRM » System Settings » Misc (Undelete, PDFs, Limits, Logging, Captcha, etc.)</a>.{/ts}</p>
|
||||
<p><strong>{ts}Do not enable this feature if you are using this profile as an HTML Form Snippet embedded in a non-CiviCRM web page. reCAPTCHA requires dynamic page generation. Submitting a stand-alone form with reCAPTCHA included will always result in a reCAPTCHA validation error.{/ts}</strong></p>
|
||||
{if $config->userSystem->supports_form_extensions EQ '1'}
|
||||
<p><strong>{ts}reCAPTCHA is also not available when a profile is used inside the User Registration and My Account screens.{/ts}</strong></p>
|
||||
{/if}
|
||||
{/htxt}
|
||||
|
||||
{htxt id='id-is_cms_user-title'}
|
||||
{ts}Account Creation{/ts}
|
||||
{/htxt}
|
||||
{htxt id='id-is_cms_user'}
|
||||
{ts 1=`$config->userFramework`}If you are using this profile as a contact signup form, using it in an online contribution page OR an event registration page, anonymous users will be given the option to create a %1 User Account as part of completing the form.{/ts}
|
||||
{if $config->userSystem->is_drupal EQ '1'}
|
||||
{ts}This feature requires your Drupal User Settings to allow 'vistors to create accounts' (with or without administrator approval). The 'Email Verification' option may be enabled or disabled.{/ts}
|
||||
{ts}If the 'Email Verification' option is enabled, users will receive a welcome email from Drupal with login information. Otherwise they will select a Password inline, and if administrator approval is not required they will be automatically logged in as soon as the transaction is completed.{/ts}
|
||||
{elseif $config->userFramework EQ 'Joomla'}
|
||||
{ts}This feature requires the 'Allow User Registration' setting to be 'Yes' in Joomla Global Configuration >> System Settings.{/ts}
|
||||
{/if}
|
||||
{ts}In addition, you must include a Primary Email Address field in the profile.{/ts}
|
||||
{/htxt}
|
||||
|
||||
{htxt id='id-is_update_dupe-title'}
|
||||
{ts}Duplicate Matching{/ts}
|
||||
{/htxt}
|
||||
{htxt id='id-is_update_dupe'}
|
||||
<p>{ts}If you are using the profile as a contact signup and editing form - this option controls what happens if the data matches an existing contact record. Using this option user can update the matching record or create a duplicate record or otherwise he will get a 'duplicate record' warning, and their input will not be saved. Contact matching is based on your configured 'Strict' rule for identifying duplicate contacts.{/ts} {docURL page="user/common-workflows/deduping-and-merging"}</p>
|
||||
<p>{ts}This setting is ignored if the profile is embedded in an online contribution, membership signup or event registration form. In this case a contact match always results in the transaction being linked to the matching contact.</p>{/ts}
|
||||
<p>{ts}In all cases, the check for an existing matching contact uses the default "Individual Strict Duplicate Matching Rule" (match on email address). If you are concerned with existing contact data being over-written by anonymous visitors, you can modify this rule to make matches less likely (or even impossible). For example, if you NEVER want anonymous input to match (i.e. always create a new contact record) - edit that rule and set the 'weight threshold' higher than 10. You will then need to run Find Duplicates periodically using a different rule, and merge any duplicate records with their associated memberships, contributions, etc.{/ts}</p>
|
||||
<p>{ts}NOTE: If there are multiple matching contacts, the first matching record is used.{/ts}</p>
|
||||
{/htxt}
|
||||
|
||||
{htxt id='id-is_map-title'}
|
||||
{ts}Map Link{/ts}
|
||||
{/htxt}
|
||||
{htxt id='id-is_map'}
|
||||
{ts}If enabled, a Map link is included on the profile listings rows and detail screens for any contacts whose records include sufficient location data for your mapping provider.{/ts}
|
||||
{/htxt}
|
||||
|
||||
{htxt id='id-is_edit_link-title'}
|
||||
{ts}Edit Link{/ts}
|
||||
{/htxt}
|
||||
{htxt id='id-is_edit_link'}
|
||||
{ts}Check this box if you want to include a link in the listings to Edit profile fields. Only users with permission to edit the contact will see this link.{/ts}
|
||||
{/htxt}
|
||||
|
||||
{htxt id='id-is_uf_link-title'}
|
||||
{ts}User Link{/ts}
|
||||
{/htxt}
|
||||
{htxt id='id-is_uf_link'}
|
||||
{ts 1=`$config->userFramework`}Check this box if you want to include a link in the listings to view contacts' %1 user account information (e.g. their 'My Account' page). This link will only be included for contacts who have a user account on your website.{/ts}
|
||||
{/htxt}
|
||||
|
||||
{htxt id='id-is_proximity_search-title'}
|
||||
{ts}Proximity Search{/ts}
|
||||
{/htxt}
|
||||
{htxt id='id-is_proximity_search'}
|
||||
<p>
|
||||
{ts}If you are using this profile as a search form, you can choose to include proximity searching. When enabled, a proximity search block will be added to the search criteria. This block will contain fields to set the proximity start address, and a field to set a 'Radius' (distance from that address).{/ts}
|
||||
</p>
|
||||
<p>
|
||||
{ts}Set Proximity Search as required if you want all searches using this profile to require the user to enter a start address and a radius.{/ts}
|
||||
</p>
|
||||
<p>
|
||||
{ts}IMPORTANT: You must enable a Mapping Provider in order to use the Proximity Search feature (Administer > System Settings > Mapping and Geocoding).{/ts}
|
||||
</p>
|
||||
{/htxt}
|
83
sites/all/modules/civicrm/templates/CRM/UF/Form/Group.tpl
Normal file
83
sites/all/modules/civicrm/templates/CRM/UF/Form/Group.tpl
Normal file
|
@ -0,0 +1,83 @@
|
|||
{*
|
||||
+--------------------------------------------------------------------+
|
||||
| CiviCRM version 4.7 |
|
||||
+--------------------------------------------------------------------+
|
||||
| Copyright CiviCRM LLC (c) 2004-2017 |
|
||||
+--------------------------------------------------------------------+
|
||||
| This file is a part of CiviCRM. |
|
||||
| |
|
||||
| CiviCRM is free software; you can copy, modify, and distribute it |
|
||||
| under the terms of the GNU Affero General Public License |
|
||||
| Version 3, 19 November 2007 and the CiviCRM Licensing Exception. |
|
||||
| |
|
||||
| CiviCRM 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 and the CiviCRM Licensing Exception along |
|
||||
| with this program; if not, contact CiviCRM LLC |
|
||||
| at info[AT]civicrm[DOT]org. If you have questions about the |
|
||||
| GNU Affero General Public License or the licensing of CiviCRM, |
|
||||
| see the CiviCRM license FAQ at http://civicrm.org/licensing |
|
||||
+--------------------------------------------------------------------+
|
||||
*}
|
||||
{* add/update/view CiviCRM Profile *}
|
||||
{if $action eq 8}
|
||||
<h3> {ts}Delete CiviCRM Profile{/ts} - {$profileTitle}</h3>
|
||||
{/if}
|
||||
<div class=" crm-block crm-form-block crm-uf_group-form-block">
|
||||
{* CRM-13693 Duplicate Delete button *}
|
||||
{if $action neq 8}
|
||||
<div class="crm-submit-buttons">{include file="CRM/common/formButtons.tpl" location="top"}</div>
|
||||
{/if}
|
||||
{if ($action eq 2 or $action eq 4) and $snippet neq 'json' } {* Update or View*}
|
||||
<div class="action-link">
|
||||
<a href="{crmURL p='civicrm/admin/uf/group/field' q="action=browse&reset=1&gid=$gid"}" class="button"><span>{ts}View or Edit Fields for this Profile{/ts}</a></span>
|
||||
<div class="clear"></div>
|
||||
</div>
|
||||
{/if}
|
||||
|
||||
{if $action eq 8 or $action eq 64}
|
||||
<div class="messages status no-popup">
|
||||
<div class="icon inform-icon"></div>
|
||||
{$message}
|
||||
</div>
|
||||
{else}
|
||||
<table class="form-layout">
|
||||
<tr class="crm-uf_group-form-block-title">
|
||||
<td class="label">{$form.title.label} {if $action == 2}{include file='CRM/Core/I18n/Dialog.tpl' table='civicrm_uf_group' field='title' id=$gid}{/if}</td>
|
||||
<td class="html-adjust">{$form.title.html}</td>
|
||||
</tr>
|
||||
<tr class="crm-uf_group-form-block-description">
|
||||
<td class="label">{$form.description.label} {help id='id-description' file="CRM/UF/Form/Group.hlp"}</td>
|
||||
<td class="html-adjust">{$form.description.html}</td>
|
||||
</tr>
|
||||
<tr class="crm-uf_group-form-block-uf_group_type">
|
||||
<td class="label">{$form.uf_group_type.label} {help id='id-used_for' file="CRM/UF/Form/Group.hlp"}</td>
|
||||
<td class="html-adjust">{$form.uf_group_type.html} {$otherModuleString}</td>
|
||||
</tr>
|
||||
<tr class="crm-uf_group-form-block-weight" >
|
||||
<td class="label">{$form.weight.label}{if $config->userSystem->is_drupal EQ '1'} {help id='id-profile_weight' file="CRM/UF/Form/Group.hlp"}{/if}</td>
|
||||
<td class="html-adjust">{$form.weight.html}</td>
|
||||
</tr>
|
||||
<tr class="crm-uf_group-form-block-help_pre" >
|
||||
<td class="label">{$form.help_pre.label} {help id='id-help_pre' file="CRM/UF/Form/Group.hlp"} {if $action == 2}{include file='CRM/Core/I18n/Dialog.tpl' table='civicrm_uf_group' field='help_pre' id=$gid}{/if}</td>
|
||||
<td class="html-adjust">{$form.help_pre.html}</td>
|
||||
</tr>
|
||||
<tr class="crm-uf_group-form-block-help_post" >
|
||||
<td class="label">{$form.help_post.label} {help id='id-help_post' file="CRM/UF/Form/Group.hlp"} {if $action == 2}{include file='CRM/Core/I18n/Dialog.tpl' table='civicrm_uf_group' field='help_post' id=$gid}{/if}</td>
|
||||
<td class="html-adjust">{$form.help_post.html}</td>
|
||||
</tr>
|
||||
<tr class="crm-uf_group-form-block-is_active" >
|
||||
<td class="label"></td><td class="html-adjust">{$form.is_active.html} {$form.is_active.label}</td>
|
||||
</tr>
|
||||
</table>
|
||||
{* adding advance setting tab *}
|
||||
{include file='CRM/UF/Form/AdvanceSetting.tpl'}
|
||||
{/if}
|
||||
|
||||
<div class="crm-submit-buttons">{include file="CRM/common/formButtons.tpl" location="bottom"}</div>
|
||||
</div>
|
||||
{include file="CRM/common/showHide.tpl"}
|
61
sites/all/modules/civicrm/templates/CRM/UF/Form/Preview.tpl
Normal file
61
sites/all/modules/civicrm/templates/CRM/UF/Form/Preview.tpl
Normal file
|
@ -0,0 +1,61 @@
|
|||
{*
|
||||
+--------------------------------------------------------------------+
|
||||
| CiviCRM version 4.7 |
|
||||
+--------------------------------------------------------------------+
|
||||
| Copyright CiviCRM LLC (c) 2004-2017 |
|
||||
+--------------------------------------------------------------------+
|
||||
| This file is a part of CiviCRM. |
|
||||
| |
|
||||
| CiviCRM is free software; you can copy, modify, and distribute it |
|
||||
| under the terms of the GNU Affero General Public License |
|
||||
| Version 3, 19 November 2007 and the CiviCRM Licensing Exception. |
|
||||
| |
|
||||
| CiviCRM 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 and the CiviCRM Licensing Exception along |
|
||||
| with this program; if not, contact CiviCRM LLC |
|
||||
| at info[AT]civicrm[DOT]org. If you have questions about the |
|
||||
| GNU Affero General Public License or the licensing of CiviCRM, |
|
||||
| see the CiviCRM license FAQ at http://civicrm.org/licensing |
|
||||
+--------------------------------------------------------------------+
|
||||
*}
|
||||
{if $previewField}
|
||||
{capture assign=infoTitle}{ts}Profile Field Preview{/ts}{/capture}
|
||||
{else}
|
||||
{capture assign=infoTitle}{ts}Profile Preview{/ts}{/capture}
|
||||
{/if}
|
||||
{include file="CRM/common/info.tpl" infoType="no-popup profile-preview-msg" infoMessage=" "}
|
||||
<div class="crm-form-block">
|
||||
|
||||
{if ! empty( $fields )}
|
||||
{if $viewOnly}
|
||||
{* wrap in crm-container div so crm styles are used *}
|
||||
<div id="crm-container-inner" lang="{$config->lcMessages|truncate:2:"":true}" xml:lang="{$config->lcMessages|truncate:2:"":true}">
|
||||
{include file="CRM/common/CMSUser.tpl"}
|
||||
{strip}
|
||||
{if $help_pre && $action neq 4}<div class="messages help">{$help_pre}</div>{/if}
|
||||
{assign var=zeroField value="Initial Non Existent Fieldset"}
|
||||
{assign var=fieldset value=$zeroField}
|
||||
{include file="CRM/UF/Form/Fields.tpl"}
|
||||
{if $addCAPTCHA }
|
||||
{include file='CRM/common/ReCAPTCHA.tpl'}
|
||||
{/if}
|
||||
{if $field.groupHelpPost}
|
||||
<div class="messages help">{$field.groupHelpPost}</div>
|
||||
{/if}
|
||||
{/strip}
|
||||
</div> {* end crm-container div *}
|
||||
{else}
|
||||
{capture assign=infoMessage}{ts}This CiviCRM profile field is view only.{/ts}{/capture}
|
||||
{include file="CRM/common/info.tpl"}
|
||||
{/if}
|
||||
{/if} {* fields array is not empty *}
|
||||
|
||||
<div class="crm-submit-buttons">
|
||||
{include file="CRM/common/formButtons.tpl"}
|
||||
</div>
|
||||
</div>
|
98
sites/all/modules/civicrm/templates/CRM/UF/Page/Field.tpl
Normal file
98
sites/all/modules/civicrm/templates/CRM/UF/Page/Field.tpl
Normal file
|
@ -0,0 +1,98 @@
|
|||
{*
|
||||
+--------------------------------------------------------------------+
|
||||
| CiviCRM version 4.7 |
|
||||
+--------------------------------------------------------------------+
|
||||
| Copyright CiviCRM LLC (c) 2004-2017 |
|
||||
+--------------------------------------------------------------------+
|
||||
| This file is a part of CiviCRM. |
|
||||
| |
|
||||
| CiviCRM is free software; you can copy, modify, and distribute it |
|
||||
| under the terms of the GNU Affero General Public License |
|
||||
| Version 3, 19 November 2007 and the CiviCRM Licensing Exception. |
|
||||
| |
|
||||
| CiviCRM 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 and the CiviCRM Licensing Exception along |
|
||||
| with this program; if not, contact CiviCRM LLC |
|
||||
| at info[AT]civicrm[DOT]org. If you have questions about the |
|
||||
| GNU Affero General Public License or the licensing of CiviCRM, |
|
||||
| see the CiviCRM license FAQ at http://civicrm.org/licensing |
|
||||
+--------------------------------------------------------------------+
|
||||
*}
|
||||
|
||||
{if $action eq 1 or $action eq 2 or $action eq 4 or $action eq 8 }
|
||||
{include file="CRM/UF/Form/Field.tpl"}
|
||||
{elseif $action eq 1024 }
|
||||
{include file="CRM/UF/Form/Preview.tpl"}
|
||||
{else}
|
||||
<div class="crm-content-block">
|
||||
{if $ufField}
|
||||
<div id="field_page">
|
||||
{if not ($action eq 2 or $action eq 1)}
|
||||
<div class="action-link">
|
||||
{crmButton p="civicrm/admin/uf/group/field/add" q="reset=1&action=add&gid=$gid" icon="plus-circle"}{ts}Add Field{/ts}{/crmButton}{if !$isGroupReserved}{crmButton p="civicrm/admin/uf/group/update" q="action=update&id=`$gid`&reset=1&context=field" icon="wrench"}{ts}Edit Settings{/ts}{/crmButton}{/if}{crmButton p="civicrm/admin/uf/group" q="action=preview&id=`$gid`&reset=1&field=0&context=field" icon="television"}{ts}Preview (all fields){/ts}{/crmButton}{if !$skipCreate }{crmButton p="civicrm/profile/create" q="gid=$gid&reset=1" icon="play-circle"}{ts}Use (create mode){/ts}{/crmButton}{/if}
|
||||
<div class="clear"></div>
|
||||
</div>
|
||||
{/if}
|
||||
{strip}
|
||||
{* handle enable/disable actions*}
|
||||
{include file="CRM/common/enableDisableApi.tpl"}
|
||||
<table id="options" class="row-highlight">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>{ts}Field Name{/ts}</th>
|
||||
{if in_array("Profile",$otherModules) or in_array("Search Profile",$otherModules) }
|
||||
<th>{ts}Visibility{/ts}</th>
|
||||
<th>{ts}Searchable?{/ts}</th>
|
||||
<th>{ts}Results Column?{/ts}</th>
|
||||
{/if}
|
||||
<th>{ts}Order{/ts}</th>
|
||||
<th>{ts}Required{/ts}</th>
|
||||
<th>{ts}View Only{/ts}</th>
|
||||
<th>{ts}Reserved{/ts}</th>
|
||||
<th></th>
|
||||
</tr>
|
||||
</thead>
|
||||
{foreach from=$ufField item=row}
|
||||
<tr id="UFField-{$row.id}" data-action="setvalue" class="crm-entity {cycle values="odd-row,even-row"} {$row.class}{if NOT $row.is_active} disabled{/if}">
|
||||
<td><span class="crmf-label crm-editable">{$row.label}</span>({$row.field_type})</td>
|
||||
{if in_array("Profile",$otherModules) or in_array("Search Profile",$otherModules) }
|
||||
<td class="crm-editable crmf-visibility" data-type="select">{$row.visibility_display}</td>
|
||||
<td class="crm-editable crmf-is_searchable" data-type="boolean">{if $row.is_searchable eq 1} {ts}Yes{/ts} {else} {ts}No{/ts} {/if}</td>
|
||||
<td class="crm-editable crmf-in_selector" data-type="boolean">{if $row.in_selector eq 1} {ts}Yes{/ts} {else} {ts}No{/ts} {/if}</td>
|
||||
{/if}
|
||||
<td class="nowrap">{$row.weight}</td>
|
||||
<td class="crm-editable crmf-is_required" data-type="boolean">{if $row.is_required eq 1} {ts}Yes{/ts} {else} {ts}No{/ts} {/if}</td>
|
||||
<td class="crm-editable crmf-is_view" data-type="boolean">{if $row.is_view eq 1} {ts}Yes{/ts} {else} {ts}No{/ts} {/if}</td>
|
||||
<td>{if $row.is_reserved eq 1} {ts}Yes{/ts} {else} {ts}No{/ts} {/if}</td>
|
||||
<td>{$row.action|replace:'xx':$row.id}</td>
|
||||
</tr>
|
||||
{/foreach}
|
||||
</table>
|
||||
{/strip}
|
||||
{if not ($action eq 2 or $action eq 1)}
|
||||
<div class="action-link">
|
||||
{crmButton p="civicrm/admin/uf/group/field/add" q="reset=1&action=add&gid=$gid" icon="plus-circle"}{ts}Add Field{/ts}{/crmButton}{if !$isGroupReserved}{crmButton p="civicrm/admin/uf/group" q="action=update&id=`$gid`&reset=1&context=field" icon="wrench"}{ts}Edit Settings{/ts}{/crmButton}{/if}{crmButton p="civicrm/admin/uf/group" q="action=preview&id=`$gid`&reset=1&field=0&context=field" icon="television"}{ts}Preview (all fields){/ts}{/crmButton}{if !$skipCreate }{crmButton p="civicrm/profile/create" q="gid=$gid&reset=1" icon="play-circle"}{ts}Use (create mode){/ts}{/crmButton}{/if}
|
||||
<div class="clear"></div>
|
||||
</div>
|
||||
{/if}
|
||||
|
||||
</div>
|
||||
{else}
|
||||
{if $action eq 16}
|
||||
{capture assign=crmURL}{crmURL p="civicrm/admin/uf/group/field/add" q="reset=1&action=add&gid=$gid"}{/capture}
|
||||
<div class="messages status no-popup crm-empty-table">
|
||||
<div class="icon inform-icon"></div>
|
||||
{ts}None found.{/ts}
|
||||
</div>
|
||||
<div class="action-link">
|
||||
{crmButton p="civicrm/admin/uf/group/field/add" q="reset=1&action=add&gid=$gid" icon="plus-circle"}{ts}Add Field{/ts}{/crmButton}
|
||||
</div>
|
||||
{/if}
|
||||
{/if}
|
||||
</div>
|
||||
{/if}
|
59
sites/all/modules/civicrm/templates/CRM/UF/Page/Group.hlp
Normal file
59
sites/all/modules/civicrm/templates/CRM/UF/Page/Group.hlp
Normal file
|
@ -0,0 +1,59 @@
|
|||
{*
|
||||
+--------------------------------------------------------------------+
|
||||
| CiviCRM version 4.7 |
|
||||
+--------------------------------------------------------------------+
|
||||
| Copyright CiviCRM LLC (c) 2004-2017 |
|
||||
+--------------------------------------------------------------------+
|
||||
| This file is a part of CiviCRM. |
|
||||
| |
|
||||
| CiviCRM is free software; you can copy, modify, and distribute it |
|
||||
| under the terms of the GNU Affero General Public License |
|
||||
| Version 3, 19 November 2007 and the CiviCRM Licensing Exception. |
|
||||
| |
|
||||
| CiviCRM 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 and the CiviCRM Licensing Exception along |
|
||||
| with this program; if not, contact CiviCRM LLC |
|
||||
| at info[AT]civicrm[DOT]org. If you have questions about the |
|
||||
| GNU Affero General Public License or the licensing of CiviCRM, |
|
||||
| see the CiviCRM license FAQ at http://civicrm.org/licensing |
|
||||
+--------------------------------------------------------------------+
|
||||
*}
|
||||
{htxt id='profile_overview-title'}
|
||||
{ts}About Profiles{/ts}
|
||||
{/htxt}
|
||||
{htxt id='profile_overview'}
|
||||
<p>{ts}Profiles may be linked to specific modules, accessed via built-in CiviCRM URLs, or embedded into any web page using the HTML Form Snippet feature. Examples include:{/ts}</p>
|
||||
<ul class="indented">
|
||||
{if $config->userSystem->supports_form_extensions EQ '1'}
|
||||
<li>{ts}<strong>User Screens</strong> - One or several profiles can be linked to either the <strong>new user registration</strong> and/or view and edit screens for <strong>existing user accounts</strong>.{/ts}</li>
|
||||
{/if}
|
||||
{capture assign=configContribURL}{crmURL p='civicrm/admin/contribute' q='reset=1'}{/capture}
|
||||
<li>{ts 1=$configContribURL}<strong>CiviContribute</strong> - When you want to collect information from Contributors via online contribution pages, you can create a profile and link it to to your contribution page as a 'custom page element' (<a href='%1'>Configure Online Contribution Pages</a>).{/ts}</li>
|
||||
{capture assign=siteRoot}<{ts}site root{/ts}>{/capture}
|
||||
<li>{ts 1=$siteRoot 2='civicrm/profile?reset=1'}<strong>Contact Search and Listings</strong> - When you want to provide a search form and search result listings for some or all of your contacts you can create a profile with the desired search fields and link users to the path for that search form. When creating a link to search and listings profiles, add the corresponding profile ID to the end of your query string using the 'gid' parameter. For example, the link to display a search and listings page for a Profile with ID = 3 would be:{/ts} <em>{$siteRoot}/civicrm/profile?reset=1&gid=3</em>
|
||||
You can limit the search results to a specific group of contacts. EXAMPLE: You only want your organization's staff members to be searchable. You would do this by limiting your profile to only contacts in your 'Staff' group under the profile's Advanced Settings.
|
||||
</li>
|
||||
<li>{ts 1=$siteRoot 2='civicrm/profile/create?reset=1&gid=3'}<strong>Contact Signup Forms</strong> - Create link(s) to 'new contact' input form(s) for your Profiles using the following path: <em>%1/%2</em>. (This example links to an input form for Profile ID 3.){/ts}</li>
|
||||
<li>{ts 1=$siteRoot 2='civicrm/profile/edit?reset=1&gid=3'}<strong>Contact Edit Forms</strong> - Allow <strong>authenticated users</strong> to edit their own contact info with a Profile using the following path: <em>%1/%2</em>. (This example links to an edit form for Profile ID 3.){/ts}</li>
|
||||
<li>{ts}<strong>HTML Form Snippet</strong> - If you want more control over form layout, or want to add Profile input forms to non-CiviCRM blocks, pages and/or sites...click the HTML Form Snippet action link for a Profile below - and copy and paste the HTML form code into any web page.{/ts}</li>
|
||||
</ul>
|
||||
<p>{docURL page="user/the-user-interface/profiles"}</p>
|
||||
{/htxt}
|
||||
|
||||
{htxt id='standalone-title'}
|
||||
{ts}Form Snippet{/ts}
|
||||
{/htxt}
|
||||
{htxt id='standalone'}
|
||||
<p>{ts}The HTML Form Snippet code will display a form consisting of the active fields in this Profile. You can copy this HTML code and paste it into any block or page on your website where you want to collect contact information.{/ts}</p>
|
||||
<p>{ts}By changing the relative URLs included in the snippet to absolute URLs (e.g. change "/sites/all/modules/civicrm/bower_components/jquery/dist/jquery.min.js?r=dXCgD" to "https://yourdomain.com/sites/all/modules/civicrm/bower_components/jquery/dist/jquery.min.js?r=dXCgD") you will be able to use the snippet on any website.{/ts}</p>
|
||||
<p><strong>{ts}If the web page you are pasting the snippet code to is hosted in a different domain from your CiviCRM site, you may NOT be able to include Country and State fields in the form (the script which dynamically loads the states based on selected country may not be able to execute across domains).{/ts}</strong></p>
|
||||
<p>{ts}You can control the web page that someone is directed to AFTER completing the form by modifying the contents of the hidden <strong>postURL</strong> input field. Replace the default value with any valid complete URL prior to saving the form code to the desired page(s).{/ts}</p>
|
||||
<p>{ts}EXAMPLE:{/ts} <strong><input type="hidden" name="postURL" value="{ts}http://www.example.com/thank_you.html{/ts}"></strong></p>
|
||||
<p>{ts}If the form is submitted with errors (i.e. required field not completed...) - the default behavior is to display the errors within the 'built-in' profile form. You can override this behavior - specifying your own error page - by adding a hidden <strong>errorURL</strong> input field.{/ts}</p> {docURL page="user/organising-your-data/profiles/"}
|
||||
<p><strong>{ts}Make sure the CAPTCHA feature is NOT enabled for this profile when you are grabbing the HTML code. CAPTCHA requires dynamic page generation. Submitting an HTML Snippet profile form with CAPTCHA included will ALWAYS result in a CAPTCHA validation error - which means that the information entered by the user can not be saved.{/ts}</strong></p>
|
||||
{/htxt}
|
175
sites/all/modules/civicrm/templates/CRM/UF/Page/Group.tpl
Normal file
175
sites/all/modules/civicrm/templates/CRM/UF/Page/Group.tpl
Normal file
|
@ -0,0 +1,175 @@
|
|||
{*
|
||||
+--------------------------------------------------------------------+
|
||||
| CiviCRM version 4.7 |
|
||||
+--------------------------------------------------------------------+
|
||||
| Copyright CiviCRM LLC (c) 2004-2017 |
|
||||
+--------------------------------------------------------------------+
|
||||
| This file is a part of CiviCRM. |
|
||||
| |
|
||||
| CiviCRM is free software; you can copy, modify, and distribute it |
|
||||
| under the terms of the GNU Affero General Public License |
|
||||
| Version 3, 19 November 2007 and the CiviCRM Licensing Exception. |
|
||||
| |
|
||||
| CiviCRM 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 and the CiviCRM Licensing Exception along |
|
||||
| with this program; if not, contact CiviCRM LLC |
|
||||
| at info[AT]civicrm[DOT]org. If you have questions about the |
|
||||
| GNU Affero General Public License or the licensing of CiviCRM, |
|
||||
| see the CiviCRM license FAQ at http://civicrm.org/licensing |
|
||||
+--------------------------------------------------------------------+
|
||||
*}
|
||||
{if $action eq 1 or $action eq 2 or $action eq 4 or $action eq 8 or $action eq 64 or $action eq 16384}
|
||||
{* Add or edit Profile Group form *}
|
||||
{include file="CRM/UF/Form/Group.tpl"}
|
||||
{elseif $action eq 1024}
|
||||
{* Preview Profile Group form *}
|
||||
{include file="CRM/UF/Form/Preview.tpl"}
|
||||
{elseif $action eq 8192}
|
||||
{* Display HTML Form Snippet Code *}
|
||||
<div class="help">
|
||||
{ts}The HTML code below will display a form consisting of the active fields in this Profile. You can copy this HTML code and paste it into any block or page on your website where you want to collect contact information.{/ts} {help id='standalone'}
|
||||
</div>
|
||||
<br />
|
||||
<form name="html_code" action="{crmURL p='civicrm/admin/uf/group' q="action=profile&gid=$gid"}">
|
||||
<div id="standalone-form">
|
||||
<textarea rows="20" cols="80" name="profile" id="profile">{$profile}</textarea>
|
||||
<div class="spacer"></div>
|
||||
<a href="#" onclick="html_code.profile.select(); return false;" class="button"><span>Select HTML Code</span></a>
|
||||
</div>
|
||||
<div class="action-link">
|
||||
<a href="{crmURL p='civicrm/admin/uf/group' q="reset=1"}">» {ts}Back to Profile Listings{/ts}</a>
|
||||
</div>
|
||||
</form>
|
||||
|
||||
{else}
|
||||
<div class="help">
|
||||
{ts}CiviCRM Profile(s) allow you to aggregate groups of fields and include them in your site as input forms, contact display pages, and search and listings features. They provide a powerful set of tools for you to collect information from constituents and selectively share contact information.{/ts} {help id='profile_overview'}
|
||||
</div>
|
||||
|
||||
{if NOT ($action eq 1 or $action eq 2)}
|
||||
<div class="crm-submit-buttons">
|
||||
<a href="{crmURL p='civicrm/admin/uf/group/add' q="action=add&reset=1"}" id="newCiviCRMProfile-top" class="button"><span><i class="crm-i fa-plus-circle"></i> {ts}Add Profile{/ts}</span></a>
|
||||
</div>
|
||||
{/if}
|
||||
{if $rows}
|
||||
<div id='mainTabContainer'>
|
||||
<ul>
|
||||
<li id='tab_user-profiles'> <a href='#user-profiles' title='{ts}User-defined Profile{/ts}'>{ts}User-defined Profiles{/ts}</a></li>
|
||||
<li id='tab_reserved-profiles'><a href='#reserved-profiles' title='{ts}Reserved Profiles{/ts}'>{ts}Reserved Profiles{/ts}</a></li>
|
||||
</ul>
|
||||
|
||||
{* handle enable/disable actions*}
|
||||
{include file="CRM/common/enableDisableApi.tpl"}
|
||||
{include file="CRM/common/jsortable.tpl"}
|
||||
<div id="user-profiles">
|
||||
<div class="crm-content-block">
|
||||
<table class="display">
|
||||
<thead>
|
||||
<tr>
|
||||
<th id="sortable">{ts}Profile Title{/ts}</th>
|
||||
<th>{ts}Created By{/ts}</th>
|
||||
<th>{ts}Description{/ts}</th>
|
||||
<th>{ts}Type{/ts}</th>
|
||||
<th>{ts}ID{/ts}</th>
|
||||
<th id="nosort">{ts}Used For{/ts}</th>
|
||||
<th></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{foreach from=$rows item=row}
|
||||
{if !$row.is_reserved }
|
||||
<tr id="UFGroup-{$row.id}" data-action="setvalue" class="crm-entity {$row.class}{if NOT $row.is_active} disabled{/if}">
|
||||
<td class="crmf-title crm-editable">{$row.title}</td>
|
||||
<td>
|
||||
{if $row.created_id && $row.created_by}
|
||||
<a href="{crmURL p='civicrm/contact/view' q="reset=1&cid=`$row.created_id`"}">{ts}{$row.created_by}{/ts}</a>
|
||||
{/if}
|
||||
</td>
|
||||
<td class="crmf-description crm-editable" data-type="textarea">{$row.description}</td>
|
||||
<td>{$row.group_type}</td>
|
||||
<td>{$row.id}</td>
|
||||
<td>{$row.module}</td>
|
||||
<td>{$row.action|replace:'xx':$row.id}</td>
|
||||
</tr>
|
||||
{/if}
|
||||
{/foreach}
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
{if NOT ($action eq 1 or $action eq 2)}
|
||||
<div class="crm-submit-buttons">
|
||||
<a href="{crmURL p='civicrm/admin/uf/group/add' q='action=add&reset=1'}" id="newCiviCRMProfile-bottom" class="button"><span><i class="crm-i fa-plus-circle"></i> {ts}Add Profile{/ts}</span></a>
|
||||
</div>
|
||||
{/if}
|
||||
</div>
|
||||
</div>{* user profile*}
|
||||
|
||||
<div id="reserved-profiles">
|
||||
<div class="crm-content-block">
|
||||
<table class="display">
|
||||
<thead>
|
||||
<tr>
|
||||
<th id="sortable">{ts}Profile Title{/ts}</th>
|
||||
<th>{ts}Created By{/ts}</th>
|
||||
<th>{ts}Description{/ts}</th>
|
||||
<th>{ts}Type{/ts}</th>
|
||||
<th>{ts}ID{/ts}</th>
|
||||
<th id="nosort">{ts}Used For{/ts}</th>
|
||||
<th></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{foreach from=$rows item=row}
|
||||
{if $row.is_reserved}
|
||||
<tr id="UFGroup-{$row.id}" class="crm-entity {$row.class}{if NOT $row.is_active} disabled{/if}">
|
||||
<td>{$row.title}</td>
|
||||
<td>
|
||||
{if $row.created_id && $row.created_by}
|
||||
<a href="{crmURL p='civicrm/contact/view' q="reset=1&cid=`$row.created_id`"}">{ts}{$row.created_by}{/ts}</a>
|
||||
{/if}
|
||||
</td>
|
||||
<td>{$row.description}</td>
|
||||
<td>{$row.group_type}</td>
|
||||
<td>{$row.id}</td>
|
||||
<td>{$row.module}</td>
|
||||
<td>{$row.action|replace:'xx':$row.id}</td>
|
||||
</tr>
|
||||
{/if}
|
||||
{/foreach}
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
{if NOT ($action eq 1 or $action eq 2)}
|
||||
<div class="crm-submit-buttons">
|
||||
<a href="{crmURL p='civicrm/admin/uf/group/add' q='action=add&reset=1'}" id="newCiviCRMProfile-bottom" class="button"><span><i class="crm-i fa-plus-circle"></i> {ts}Add Profile{/ts}</span></a>
|
||||
</div>
|
||||
{/if}
|
||||
</div>
|
||||
</div>{* reserved profile*}
|
||||
|
||||
</div> {* maincontainer*}
|
||||
<script type='text/javascript'>
|
||||
var selectedTab = 'user-profiles';
|
||||
{if $selectedChild}selectedTab = '{$selectedChild}';{/if}
|
||||
{literal}
|
||||
CRM.$(function($) {
|
||||
var tabIndex = $('#tab_' + selectedTab).prevAll().length
|
||||
$("#mainTabContainer").tabs( {active: tabIndex} );
|
||||
});
|
||||
{/literal}
|
||||
</script>
|
||||
|
||||
{else}
|
||||
{if $action ne 1} {* When we are adding an item, we should not display this message *}
|
||||
<div class="messages status no-popup">
|
||||
<div class="icon inform-icon"></div>
|
||||
{capture assign=crmURL}{crmURL p='civicrm/admin/uf/group/add' q='action=add&reset=1'}{/capture}{ts 1=$crmURL}No CiviCRM Profiles have been created yet. You can <a href='%1'>add one now</a>.{/ts}
|
||||
</div>
|
||||
{/if}
|
||||
{/if}
|
||||
{/if}
|
|
@ -0,0 +1,145 @@
|
|||
{**
|
||||
* Outer Region
|
||||
*}
|
||||
<script type="text/template" id="designer_template">
|
||||
<div class="crm-designer-toolbar full-height">
|
||||
<div class="crm-designer-buttonset-region ui-dialog-buttonset">
|
||||
</div>
|
||||
<hr />
|
||||
<div class="crm-designer-palette-region full-height">
|
||||
</div>
|
||||
</div>
|
||||
<div class="crm-designer-canvas full-height scroll">
|
||||
<div class="crm-designer-preview-canvas"></div>
|
||||
<div class="crm-designer-form-region">
|
||||
</div>
|
||||
<hr />
|
||||
<div class="crm-designer-fields-region">
|
||||
</div>
|
||||
</div>
|
||||
</script>
|
||||
|
||||
{**
|
||||
* Render the field-palette container
|
||||
*}
|
||||
<script type="text/template" id="palette_template">
|
||||
<div class="crm-designer-palette">
|
||||
<div class="crm-designer-palette-search">
|
||||
<div class="crm-filter-objects">
|
||||
<span>{ts}Contact Type{/ts}:
|
||||
<select class="crm-form-select crm-contact-types">
|
||||
<option value="IndividualModel">{ts}Individual{/ts}</option>
|
||||
<option value="OrganizationModel">{ts}Organization{/ts}</option>
|
||||
<option value="HouseholdModel">{ts}Household{/ts}</option>
|
||||
</select>
|
||||
</span>
|
||||
</div>
|
||||
<hr>
|
||||
<input type="text" class="crm-form-text" placeholder="{ts}Search Fields{/ts}" />
|
||||
<a class="crm-designer-palette-clear-search crm-hover-button" href="#" style="visibility:hidden" title="{ts}Clear search{/ts}"><i class="crm-i fa-times"></i></a>
|
||||
<div class="crm-designer-palette-controls">
|
||||
<a href="#" class="crm-designer-palette-toggle" rel="open_all">{ts}Open All{/ts}</a> |
|
||||
<a href="#" class="crm-designer-palette-toggle" rel="close_all">{ts}Close All{/ts}</a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="crm-designer-palette-tree scroll">
|
||||
</div>
|
||||
</div>
|
||||
</script>
|
||||
|
||||
{**
|
||||
* Template for CRM.UF.UFFieldModel, CRM.Designer.UFFieldView
|
||||
* @see extendedSerializeData()
|
||||
*}
|
||||
<script type="text/template" id="field_row_template">
|
||||
<div class="crm-designer-row" data-field-cid="<%= _model.cid %>">
|
||||
<div class="crm-designer-field-summary"></div>
|
||||
<div class="crm-designer-field-detail"></div>
|
||||
</div>
|
||||
</script>
|
||||
|
||||
{**
|
||||
* Template for CRM.UF.UFFieldModel, CRM.Designer.UFFieldSummaryView
|
||||
* @see extendedSerializeData()
|
||||
*}
|
||||
<script type="text/template" id="field_summary_template">
|
||||
<span class="crm-designer-buttons">
|
||||
<a class="crm-i fa-pencil crm-designer-action-settings" title="{ts}Settings{/ts}"></a>
|
||||
<a class="crm-i fa-trash crm-designer-action-remove" title="{ts}Remove{/ts}"></a>
|
||||
</span>
|
||||
<div class="description"><%= help_pre %></div>
|
||||
<div class="crm-designer-row-label">
|
||||
<span class="crm-designer-label"><%= label %></span>
|
||||
<%= _view.getRequiredMarker() %>
|
||||
<span class="crm-designer-field-binding"><%= _view.getBindingLabel() %></span>
|
||||
</div>
|
||||
<div class="description"><%= help_post %></div>
|
||||
</script>
|
||||
|
||||
{**
|
||||
* @param CRM.UF.UFGroupModel form
|
||||
*}
|
||||
<script type="text/template" id="form_row_template">
|
||||
<div class="crm-designer-row">
|
||||
<div class="crm-designer-form-summary"></div>
|
||||
<div class="crm-designer-form-detail"></div>
|
||||
</div>
|
||||
</script>
|
||||
|
||||
{**
|
||||
* Variables correspond to properties of CRM.UF.UFGroupModel
|
||||
*}
|
||||
<script type="text/template" id="form_summary_template">
|
||||
<h3><%= title %></h3>
|
||||
<div class="crm-designer-buttons">
|
||||
<a class="crm-designer-action-settings crm-i fa-pencil" title="{ts}Settings{/ts}"></a>
|
||||
</div>
|
||||
</script>
|
||||
|
||||
<script type="text/template" id="designer_buttons_template">
|
||||
<button class="crm-designer-save">{ts}Save{/ts}</button>
|
||||
<button class="crm-designer-preview">{ts}Preview{/ts}</button>
|
||||
</script>
|
||||
|
||||
<script type="text/template" id="field_canvas_view_template">
|
||||
<div class="crm-designer-fields">
|
||||
<div class="crm-designer-row placeholder">{ts}To add a field to this form, drag or double-click an item from the list to the right.{/ts}</div>
|
||||
</div>
|
||||
</script>
|
||||
|
||||
{**
|
||||
* Variables correspond to properties of CRM.ProfileSelector.DummyModel
|
||||
*}
|
||||
<script type="text/template" id="profile_selector_template">
|
||||
<div>
|
||||
<span class="crm-profile-selector-select"></span>
|
||||
<button type="button" class="crm-profile-selector-preview" title="{ts}Preview{/ts}"><i class="crm-i fa-television"></i> {ts}Preview{/ts}</button>
|
||||
{if $perm}
|
||||
<button class="crm-profile-selector-edit">{ts}Edit{/ts}</button>
|
||||
<button class="crm-profile-selector-copy">{ts}Copy{/ts}</button>
|
||||
<button class="crm-profile-selector-create">{ts}Create{/ts}</button>
|
||||
{/if}
|
||||
</div>
|
||||
<form>
|
||||
<div class="crm-profile-selector-preview-pane">
|
||||
{ts}(Preview Area){/ts}
|
||||
</div>
|
||||
</form>
|
||||
</script>
|
||||
|
||||
<script type="text/template" id="profile_selector_empty_preview_template">
|
||||
{ts}(Preview Area){/ts}
|
||||
</script>
|
||||
|
||||
<script type="text/template" id="profile_selector_option_template">
|
||||
<%= title %>
|
||||
</script>
|
||||
|
||||
{**
|
||||
* Variables correspond to properties of CRM.ProfileSelector.DummyModel
|
||||
*}
|
||||
<script type="text/template" id="designer_dialog_template">
|
||||
<div class="crm-designer crm-container full-height">
|
||||
</div>
|
||||
</script>
|
Loading…
Add table
Add a link
Reference in a new issue