First commit

This commit is contained in:
Theodotos Andreou 2018-01-14 13:10:16 +00:00
commit c6e2478c40
13918 changed files with 2303184 additions and 0 deletions

View file

@ -0,0 +1,113 @@
{*
+--------------------------------------------------------------------+
| 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 $showCMS }{*true if is_cms_user field is set *}
<fieldset class="crm-group crm_user-group">
<div class="messages help cms_user_help-section">
{if !$isCMS}
{ts}If you would like to create an account on this site, check the box below and enter a Username{/ts}{if $form.cms_pass} {ts}and a password{/ts}.{/if}
{else}
{ts}Please enter a Username to create an account.{/ts}
{/if}
{ts 1=$loginURL}If you already have an account <a href='%1'>please login</a> before completing this form.{/ts}
</div>
<div>{$form.cms_create_account.html} {$form.cms_create_account.label}</div>
<div id="details" class="crm_user_signup-section">
<div class="form-layout-compressed">
<div class="crm-section cms_name-section">
<div class="label">
<label for="cms_name">{$form.cms_name.label}</label>
</div>
<div class="content">
{$form.cms_name.html} <a id="checkavailability" href="#" onClick="return false;">{ts}<strong>Check Availability</strong>{/ts}</a>
<span id="msgbox" style="display:none"></span><br />
<span class="description">{ts}Punctuation is not allowed in a Username with the exception of periods, hyphens and underscores.{/ts}</span>
</div>
</div>
{if $form.cms_pass}
<div class="crm-section cms_pass-section">
<div class="label">
<label for="cms_pass">{$form.cms_pass.label}</label>
</div>
<div class="content">
{$form.cms_pass.html}
</div>
<div class="clear"></div>
<div class="label">
<label for="crm_confirm_pass-section">{$form.cms_confirm_pass.label}</label>
</div>
<div class="content">
{$form.cms_confirm_pass.html}<br/>
<span class="description">{ts}Provide a password for the new account in both fields.{/ts}</span>
</div>
</div>
{/if}
</div>
</div>
</fieldset>
{literal}
<script type="text/javascript">
{/literal}
{if !$isCMS}
{literal}
if ( document.getElementsByName("cms_create_account")[0].checked ) {
cj('#details').show();
} else {
cj('#details').hide();
}
{/literal}
{/if}
{literal}
function showMessage( frm )
{
var cId = {/literal}'{$cId}'{literal};
if ( cId ) {
alert('{/literal}{ts escape="js"}You are logged-in user{/ts}{literal}');
frm.checked = false;
} else {
var siteName = {/literal}'{$config->userFrameworkBaseURL}'{literal};
alert('{/literal}{ts escape="js"}Please login if you have an account on this site with the link{/ts}{literal} ' + siteName );
}
}
{/literal}
{include file="CRM/common/checkUsernameAvailable.tpl"}
{literal}
</script>
{/literal}
{if !$isCMS}
{include file="CRM/common/showHideByFieldValue.tpl"
trigger_field_id ="cms_create_account"
trigger_value =""
target_element_id ="details"
target_element_type ="block"
field_type ="radio"
invert = 0
}
{/if}
{/if}

View file

@ -0,0 +1,40 @@
{*
+--------------------------------------------------------------------+
| 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 $recaptchaHTML}
{literal}
<script type="text/javascript">
var RecaptchaOptions = {{/literal}{$recaptchaOptions}{literal}};
</script>
{/literal}
<div class="crm-section recaptcha-section">
<table class="form-layout-compressed">
<tr>
<td class="recaptcha_label">&nbsp;</td>
<td>{$recaptchaHTML}</td>
</tr>
</table>
</div>
{/if}

View file

@ -0,0 +1,51 @@
{*
+--------------------------------------------------------------------+
| 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 |
+--------------------------------------------------------------------+
*}
{* Navigation template for multi-section Wizards *}
{if count( $category.steps ) > 0}
<div id="wizard-steps">
<ul class="section-list">
{foreach from=$category.steps item=step}
{assign var=i value=$smarty.section.step.iteration}
{if $step.current}
{assign var="stepClass" value="current-section"}
{else}
{assign var="stepClass" value="future-section"}
{/if}
{if !$step.valid}
{assign var="stepClass" value="$stepClass not-valid"}
{/if}
{* Skip "Submit Application" category - it is shown separately *}
{if $step.title NEQ 'Submit Application'}
{* step.link value is passed for section usages which allow clickable navigation AND when section state is clickable *}
<li class="{$stepClass}">{if $step.link && !$step.current}<a href="{$step.link}">{/if}{$step.title}{if $step.link && !$step.current}</a>{/if}</li>
{if $step.current}
{include file="CRM/common/WizardHeader.tpl"}
{/if}
{/if}
{/foreach}
</ul>
</div>
{/if}

View file

@ -0,0 +1,82 @@
{*
+--------------------------------------------------------------------+
| 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 |
+--------------------------------------------------------------------+
*}
{* Adds social networking buttons (Facebook like, Twitter tweet, Google +1, LinkedIn) to public pages (online contributions, event info) *}
<div class="crm-section crm-socialnetwork help">
<h3 class="nobackground">{ts}Help spread the word{/ts}</h3>
<div class="description">
{ts}Please help us and let your friends, colleagues and followers know about our page{/ts}{if $title}:
<span class="bold"><a href="{$pageURL}">{$title}</a></span>
{else}.{/if}
</div>
<div class="crm-fb-tweet-buttons">
{if $emailMode eq true}
{*use images for email*}
<a href="https://twitter.com/share?url={$url|escape:'url'}&amp;text={$title}" id="crm_tweet">
<img title="Twitter Tweet Button" src="{$config->userFrameworkResourceURL|replace:'https://':'http://'}/i/tweet.png" width="55px" height="20px" alt="Tweet Button">
</a>
<a href="https://www.facebook.com/plugins/like.php?href={$url}" target="_blank">
<img title="Facebook Like Button" src="{$config->userFrameworkResourceURL|replace:'https://':'http://'}/i/fblike.png" alt="Facebook Button" />
</a>
{else}
<script type="text/javascript" src="https://apis.google.com/js/plusone.js"></script>
{*use advanced buttons for pages*}
<div class="label">
<iframe allowtransparency="true" frameborder="0" scrolling="no"
src="https://platform.twitter.com/widgets/tweet_button.html?text={$title}&amp;url={$url|escape:'url'}"
style="width:100px; height:20px;">
</iframe>
</div>
<div class="label">
<g:plusone href={$url}></g:plusone>
</div>
<div class="label" style="width:300px;">
<iframe src="https://www.facebook.com/plugins/like.php?app_id=240719639306341&amp;href={$url|escape:'url'}&amp;send=false&amp;layout=standard&amp;show_faces=false&amp;action=like&amp;colorscheme=light" scrolling="no" frameborder="0" style="border:none; overflow:hidden; width:300px; height:30px;" allowTransparency="true">
</iframe>
</div>
<div class="label">
<script src="https://platform.linkedin.com/in.js" type="text/javascript"></script>
<script type="IN/Share" data-url={$url} data-counter="right"></script>
</div>
{/if}
</div>
{if $pageURL}
{if $emailMode neq true}
<br/>
{/if}
<br/>
<div class="clear"></div>
<div>
<span class="bold">{ts}You can also share the below link in an email or on your website.{/ts}</span>
<br/>
<a href="{$pageURL}">{$pageURL}</a>
</div>
{else}
<div class="clear"></div>
{/if}
</div>

View file

@ -0,0 +1,149 @@
// https://civicrm.org/licensing
/**
* By default this simply loads tabs via ajax CRM.loadPage method
* Tabs with class 'ajaxForm' will use CRM.loadForm instead, suitable for most forms
* Tabs with class 'livePage' will get popup action links, suitable for crud tables
*/
CRM.$(function($) {
var tabSettings = CRM.tabSettings || {};
tabSettings.active = tabSettings.active ? $('#tab_' + tabSettings.active).prevAll().length : 0;
$("#mainTabContainer")
.on('tabsbeforeactivate', function(e, ui) {
// CRM-14353 - Warn of unsaved changes for all forms except those which have opted out
if (CRM.utils.initialValueChanged($('form:not([data-warn-changes=false])', ui.oldPanel))) {
CRM.alert(ts('Your changes in the <em>%1</em> tab have not been saved.', {1: ui.oldTab.text()}), ts('Unsaved Changes'), 'warning');
}
})
.on('tabsbeforeload', function(e, ui) {
// Use civicrm ajax wrappers rather than the default $.load
if (!ui.panel.data("civiCrmSnippet")) {
var method = ui.tab.hasClass('ajaxForm') ? 'loadForm' : 'loadPage';
var params = {target: ui.panel};
if (method === 'loadForm') {
params.autoClose = params.openInline = params.cancelButton = params.refreshAction = false;
ui.panel.on('crmFormLoad', function() {
// Hack: "Save and done" and "Cancel" buttons submit without ajax
$('.cancel.crm-form-submit, input[name$=upload_done]', this).on('click', function(e) {
$(this).closest('form').ajaxFormUnbind();
});
});
}
if (ui.tab.hasClass('livePage') && CRM.config.ajaxPopupsEnabled) {
ui.panel
.off('click.crmLivePage')
.on('click.crmLivePage', 'a.button, a.action-item', CRM.popup)
.on('crmPopupFormSuccess.crmLivePage', 'a.button, a.action-item:not(.crm-enable-disable)', CRM.refreshParent);
}
ui.panel
.off('.tabInfo')
.on('crmLoad.tabInfo crmFormSuccess.tabInfo', function(e, data) {
if (data) {
if (typeof(data.tabCount) !== 'undefined') {
CRM.tabHeader.updateCount(ui.tab, data.tabCount);
}
if (typeof(data.tabValid) !== 'undefined') {
var method = data.tabValid ? 'removeClass' : 'addClass';
ui.tab[method]('disabled');
}
}
});
CRM[method]($('a', ui.tab).attr('href'), params);
}
e.preventDefault();
})
.tabs(tabSettings);
// Any load/submit event could potentially call for tabs to refresh.
$(document).on('crmLoad.tabInfo crmFormSuccess.tabInfo', function(e, data) {
if (data && $.isPlainObject(data.updateTabs)) {
$.each(data.updateTabs, CRM.tabHeader.updateCount);
$.each(data.updateTabs, CRM.tabHeader.resetTab);
}
});
});
(function($) {
// Utility functions
CRM.tabHeader = CRM.tabHeader || {};
/**
* Return active tab
*/
CRM.tabHeader.getActiveTab = function() {
return $('.ui-tabs-active', '#mainTabContainer');
};
/**
* Make a given tab the active one
* @param tab jQuery selector
*/
CRM.tabHeader.focus = function(tab) {
$('#mainTabContainer').tabs('option', 'active', $(tab).prevAll().length);
};
/**
* @param tab jQuery selector
* @returns panel jQuery object
*/
CRM.tabHeader.getTabPanel = function(tab) {
var selector = $(tab).attr('aria-controls');
return selector ? $('#' + selector) : $();
};
/**
* @param tab jQuery selector
* @returns {string|null}
*/
function getCountClass(tab) {
var $tab = $(tab),
css = $tab.attr('class') || '',
val = css.match(/(crm-count-\d+)/);
return val && val.length ? val[0] : null;
}
/**
* @param tab jQuery selector
* @returns {Number|null}
*/
CRM.tabHeader.getCount = function(tab) {
var cssClass = getCountClass(tab);
return cssClass ? parseInt(cssClass.slice(10), 10) : null;
};
/**
* Update the counter in a tab
* @param tab jQuery selector
* @param count {Number}
*/
CRM.tabHeader.updateCount = function(tab, count) {
var oldClass = getCountClass(tab);
if (oldClass) {
$(tab).removeClass(oldClass);
}
$(tab)
.addClass('crm-count-' + count)
.find('a em').html('' + count);
};
/**
* Refresh tab immediately if it is active (or force=true)
* otherwise ensure it will be refreshed next time the user clicks on it
*
* @param tab
* @param force
*/
CRM.tabHeader.resetTab = function(tab, force) {
var $panel = CRM.tabHeader.getTabPanel(tab);
if ($(tab).hasClass('ui-tabs-active')) {
$panel.crmSnippet('refresh');
}
else if (force) {
if ($panel.data("civiCrmSnippet")) {
$panel.crmSnippet('refresh');
} else {
$("#mainTabContainer").trigger('tabsbeforeload', [{panel: $panel, tab: $(tab)}]);
}
}
else if ($panel.data("civiCrmSnippet")) {
$panel.crmSnippet('destroy');
}
};
})(CRM.$);

View file

@ -0,0 +1,51 @@
{*
+--------------------------------------------------------------------+
| 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 |
+--------------------------------------------------------------------+
*}
{* enclose all tabs and its content in a block *}
<div class="crm-block crm-content-block">
{if $tabHeader and count($tabHeader)}
<div id="mainTabContainer">
<ul>
{foreach from=$tabHeader key=tabName item=tabValue}
<li id="tab_{$tabName}" class="crm-tab-button ui-corner-all{if !$tabValue.valid} disabled{/if}{if isset($tabValue.class)} {$tabValue.class}{/if}" {$tabValue.extra}>
{if $tabValue.active}
<a href="{if !empty($tabValue.template)}#panel_{$tabName}{else}{$tabValue.link}{/if}" title="{$tabValue.title|escape}{if !$tabValue.valid} ({ts}disabled{/ts}){/if}">{$tabValue.title}{if isset($tabValue.count)} <em>{$tabValue.count}</em>{/if}</a>
{else}
<span {if !$tabValue.valid} title="{ts}disabled{/ts}"{/if}>{$tabValue.title}</span>
{/if}
</li>
{/foreach}
</ul>
{foreach from=$tabHeader key=tabName item=tabValue}
{if !empty($tabValue.template)}
<div id="#panel_{$tabName}">
{include file=$tabValue.template}
</div>
{/if}
{/foreach}
</div>
{/if}
<div class="clear"></div>
</div> {* crm-content-block ends here *}

View file

@ -0,0 +1,86 @@
{*
+--------------------------------------------------------------------+
| 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 empty($tagsetType)}
{assign var="tagsetType" value="contact"}
{/if}
{foreach from=$tagsetInfo.$tagsetType item=tagset}
{assign var="elemName" value=$tagset.tagsetElementName}
{if empty($tagsetElementName) or $tagsetElementName eq $elemName}
{assign var="parID" value=$tagset.parentID}
{assign var="skipEntityAction" value=$tagset.skipEntityAction}
{if $tableLayout}
<td class="label">
{$form.$elemName.$parID.label}
</td>
<td class="{$tagsetType}-tagset {$tagsetType}-tagset-{$tagset.parentID}-section">
{$form.$elemName.$parID.html}
</td>
{else}
<div class="crm-section tag-section {$tagsetType}-tagset {$tagsetType}-tagset-{$tagset.parentID}-section">
<div class="crm-clearfix">
{$form.$elemName.$parID.label}
{$form.$elemName.$parID.html}
</div>
</div>
{/if}
{/if}
{/foreach}
{if !$skipEntityAction and empty($form.frozen)}
<script type="text/javascript">
{* Add/remove entity tags via ajax api *}
{literal}
(function($, _) {
var $el = $('.{/literal}{$tagsetType}-tagset{literal} input.crm-form-entityref');
// select2 provides "added" and "removed" properties in the event
$el.on('change', function(e) {
var tags,
data = _.pick($(this).data(), 'entity_id', 'entity_table'),
apiCall = [];
if (e.added) {
tags = $.isArray(e.added) ? e.added : [e.added];
_.each(tags, function(tag) {
if (tag.id && tag.id != '0') {
apiCall.push(['entity_tag', 'create', $.extend({tag_id: tag.id}, data)]);
}
});
}
if (e.removed) {
tags = $.isArray(e.removed) ? e.removed : [e.removed];
_.each(tags, function(tag) {
if (tag.id && tag.id != '0') {
apiCall.push(['entity_tag', 'delete', $.extend({tag_id: tag.id}, data)]);
}
});
}
if (apiCall.length) {
CRM.api3(apiCall, true);
}
});
}(CRM.$, CRM._));
{/literal}
</script>
{/if}

View file

@ -0,0 +1,39 @@
{*
+--------------------------------------------------------------------+
| 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 $trackingFields and ! empty($trackingFields)}
{literal}
<script type="text/javascript">
CRM.$(function($) {
{/literal}
{foreach from=$trackingFields key=trackingFieldName item=dontCare}
$("#{$trackingFieldName}").parent().parent().hide( );
{/foreach}
{literal}
}
);
</script>
{/literal}
{/if}

View file

@ -0,0 +1,87 @@
{*
+--------------------------------------------------------------------+
| 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 count( $wizard.steps ) > 1}
{* wizard.style variable is passed by some Wizards to allow alternate styling for progress "bar". *}
<div id="wizard-steps">
<ul class="wizard-bar{if $wizard.style.barClass}-{$wizard.style.barClass}{/if}">
{section name=step loop=$wizard.steps}
{if count ( $wizard.steps ) > 5 }
{* truncate step titles so header isn't too wide *}
{assign var="title" value=$wizard.steps[step].title|crmFirstWord}
{else}
{assign var="title" value=$wizard.steps[step].title}
{/if}
{* Show each wizard link unless collapsed value is true. Also excluding quest app submit steps. Should create separate WizardHeader for Quest at some point.*}
{if !$wizard.steps[step].collapsed && $wizard.steps[step].name NEQ 'Submit' && $wizard.steps[step].name NEQ 'PartnerSubmit'}
{assign var=i value=$smarty.section.step.iteration}
{if $wizard.currentStepNumber > $wizard.steps[step].stepNumber}
{if $wizard.steps[step].step}
{assign var="stepClass" value="past-step"}
{else} {* This is a sub-step *}
{assign var="stepClass" value="past-sub-step"}
{/if}
{if $wizard.style.hideStepNumbers}
{assign var="stepPrefix" value=$wizard.style.subStepPrefixPast}
{else}
{assign var="stepPrefix" value=$wizard.style.stepPrefixPast|cat:$wizard.steps[step].stepNumber|cat:". "}
{/if}
{elseif $wizard.currentStepNumber == $wizard.steps[step].stepNumber}
{if $wizard.steps[step].step}
{assign var="stepClass" value="current-step"}
{else}
{assign var="stepClass" value="current-sub-step"}
{/if}
{if $wizard.style.hideStepNumbers}
{assign var="stepPrefix" value=$wizard.style.subStepPrefixCurrent}
{else}
{assign var="stepPrefix" value=$wizard.style.stepPrefixCurrent|cat:$wizard.steps[step].stepNumber|cat:". "}
{/if}
{else}
{if $wizard.steps[step].step}
{assign var="stepClass" value="future-step"}
{else}
{assign var="stepClass" value="future-sub-step"}
{/if}
{if $wizard.style.hideStepNumbers}
{assign var="stepPrefix" value=$wizard.style.subStepPrefixFuture}
{else}
{assign var="stepPrefix" value=$wizard.style.stepPrefixFuture|cat:$wizard.steps[step].stepNumber|cat:". "}
{/if}
{/if}
{if !$wizard.steps[step].valid}
{assign var="stepClass" value="$stepClass not-valid"}
{/if}
{* wizard.steps[step].link value is passed for wizards/steps which allow clickable navigation *}
<li class="{$stepClass}">{$stepPrefix}{if $wizard.steps[step].link}<a href="{$wizard.steps[step].link}">{/if}{$title}{if $wizard.steps[step].link}</a>{/if}</li>
{/if}
{/section}
</ul>
</div>
{if $wizard.style.showTitle}
<h2>{$wizard.currentStepTitle} {ts 1=$wizard.currentStepNumber 2=$wizard.stepCount}(step %1 of %2){/ts}</h2>
{/if}
{/if}

View file

@ -0,0 +1,36 @@
{*
+--------------------------------------------------------------------+
| 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="accesskeys-title"}
{ts}Access Keys{/ts}
{/htxt}
{htxt id="accesskeys"}
<p></p>
<ul>
<li>ALT+SHIFT+E - <em>{ts}Edit Contact (View Contact Summary Page){/ts}</em></li>
<li>ALT+SHIFT+S - <em>{ts}Save Button{/ts}</em></li>
<li>ALT+SHIFT+N - <em>{ts}Add a new record in each tab (Activities, Tags,..etc){/ts}</em></li>
</ul>
{/htxt}

View file

@ -0,0 +1,30 @@
{*
+--------------------------------------------------------------------+
| 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 not $urlIsPublic}
<div class="footer" id="access">
{ts}Access Keys:{/ts}{help id='accesskeys' file='CRM/common/accesskeys'}
</div>
{/if}

View file

@ -0,0 +1,200 @@
{*
+--------------------------------------------------------------------+
| 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 |
+--------------------------------------------------------------------+
*}
{literal}
<script type="text/javascript" >
CRM.$(function($) {
{/literal}
{if $generateAjaxRequest}
{foreach from=$ajaxRequestBlocks key="blockName" item="instances"}
{foreach from=$instances key="instance" item="active"}
buildAdditionalBlocks( '{$blockName}', '{$className}' );
{/foreach}
{/foreach}
{/if}
{if $loadShowHideAddressFields}
{foreach from=$showHideAddressFields key="blockId" item="fieldName"}
processAddressFields( '{$fieldName}', '{$blockId}', 0 );
{/foreach}
{/if}
{literal}
});
function buildAdditionalBlocks( blockName, className ) {
var element = blockName + '_Block_';
//get blockcount of last element of relevant blockName
var previousInstance = cj( '[id^="'+ element +'"]:last' ).attr('id').slice( element.length );
var currentInstance = parseInt( previousInstance ) + 1;
//show primary option if block count = 2
if ( currentInstance == 2) {
cj("#" + blockName + '-Primary').show( );
cj("#" + blockName + '-Primary-html').show( );
}
var dataUrl = {/literal}"{crmURL h=0 q='snippet=4'}"{literal} + '&block=' + blockName + '&count=' + currentInstance;;
if ( className == 'CRM_Event_Form_ManageEvent_Location' ) {
dataUrl = ( currentInstance <= 2 ) ? dataUrl + '&subPage=Location' : '';
}
{/literal}
{if $qfKey}
dataUrl += "&qfKey={$qfKey}";
{/if}
{literal}
if ( !dataUrl ) {
return;
}
var fname = '#' + blockName + '_Block_'+ previousInstance;
cj('#addMore' + blockName + previousInstance ).hide( );
cj.ajax({
url : dataUrl,
async : false,
success : function(html){
cj(fname).after(html);
cj(fname).nextAll().trigger('crmLoad');
}
});
if ( blockName == 'Address' ) {
checkLocation('address_' + currentInstance + '_location_type_id', true );
/* FIX: for IE, To get the focus after adding new address block on first element */
cj('#address_' + currentInstance + '_location_type_id').focus();
}
}
//select single for is_bulk & is_primary
function singleSelect( object ) {
var element = object.split( '_', 3 );
var block = (element['0'] == 'Address') ? 'Primary' : element['2'].slice('2');
var execBlock = '#' + element['0'] + '-' + block + '-html Input[id*="' + element['2'] + '"]';
//element to check for checkbox
var elementChecked = cj( '#' + object ).prop('checked');
if ( elementChecked ) {
cj( execBlock ).each( function() {
if ( cj(this).attr('id') != object ) {
cj(this).prop('checked', false );
}
});
} else {
cj( '#' + object ).prop('checked', false );
}
//check if non of elements is set Primary / Allowed to Login.
if( cj.inArray( element['2'].slice('2'), [ 'Primary', 'Login' ] ) != -1 ) {
primary = false;
cj( execBlock ).each( function( ) {
if ( cj(this).prop('checked' ) ) {
primary = true;
}
});
if( ! primary ) {
cj('#' + object).prop('checked', true );
}
}
}
function removeBlock( blockName, blockId ) {
var element = cj("#addressBlock > div").size();
if ( ( blockName == 'Address' ) && element == 1 ) {
return clearFirstBlock(blockName , blockId);
}
if ( cj( "#"+ blockName + "_" + blockId + "_IsPrimary").prop('checked') ) {
var primaryBlockId = 1;
// consider next block as a primary,
// when user delete first block
if ( blockId >= 1 ) {
var blockIds = getAddressBlock('next');
for ( var i = 0; i <= blockIds.length; i++) {
var curBlockId = blockIds[i];
if ( curBlockId != blockId ) {
primaryBlockId = curBlockId;
break;
}
}
}
// finally sets the primary address
cj( '#'+ blockName + '_' + primaryBlockId + '_IsPrimary').prop('checked', true);
}
//remove the spacer for address block only.
if ( blockName == 'Address' && cj( "#"+ blockName + "_Block_" + blockId ).prev().attr('class') == 'spacer' ){
cj( "#"+ blockName + "_Block_" + blockId ).prev().remove();
}
//unset block from html
cj( "#"+ blockName + "_Block_" + blockId ).empty().remove();
//show the link 'add address' to last element of Address Block
if ( blockName == 'Address' ) {
var lastAddressBlock = cj('div[id^=Address_Block_]').last().attr('id');
var lastBlockId = lastAddressBlock.split( '_' );
if ( lastBlockId[2] ) {
cj( '#addMoreAddress' + lastBlockId[2] ).show();
}
}
}
function clearFirstBlock( blockName , blockId ) {
var element = blockName + '_Block_' + blockId;
cj("#" + element +" input, " + "#" + element + " select").each(function () {
cj(this).val('');
});
cj("#addressBlockId:not(.collapsed)").crmAccordionToggle();
cj("#addressBlockId .active").removeClass('active');
}
function getAddressBlock( position ) {
var addressBlockIds = [];
var i = 0;
switch ( position ) {
case 'last':
var lastBlockInfo = cj("#addressBlockId > div").children(':last').attr('id').split( '_', 3);
addressBlockIds[i] = lastBlockInfo['2'];
break;
case 'next':
cj("#addressBlockId > div").children().each( function() {
if ( cj(this).attr('id') ) {
var blockInfo = cj(this).attr('id').split( '_', 3);
addressBlockIds[i] = blockInfo['2'];
i++;
}
});
break;
}
return addressBlockIds;
}
</script>
{/literal}

View file

@ -0,0 +1,78 @@
{*
+--------------------------------------------------------------------+
| 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 $config->debug}
{include file="CRM/common/debug.tpl"}
{/if}
<div id="crm-container" class="crm-container{if $urlIsPublic} crm-public{/if}" lang="{$config->lcMessages|truncate:2:"":true}" xml:lang="{$config->lcMessages|truncate:2:"":true}">
{crmNavigationMenu is_default=1}
{if isset($browserPrint) and $browserPrint}
{* Javascript window.print link. Used for public pages where we can't do printer-friendly view. *}
<div id="printer-friendly">
<a href="#" onclick="window.print(); return false;" title="{ts}Print this page.{/ts}">
<i class="crm-i fa-print"></i>
</a>
</div>
{else}
{* Printer friendly link/icon. *}
<div id="printer-friendly">
<a href="{$printerFriendly}" target='_blank' title="{ts}Printer-friendly view of this page.{/ts}">
<i class="crm-i fa-print"></i>
</a>
</div>
{/if}
{crmRegion name='page-header'}
{/crmRegion}
<div class="clear"></div>
{if isset($localTasks) and $localTasks}
{include file="CRM/common/localNav.tpl"}
{/if}
<div id="crm-main-content-wrapper">
{include file="CRM/common/status.tpl"}
{crmRegion name='page-body'}
{if isset($isForm) and $isForm and isset($formTpl)}
{include file="CRM/Form/$formTpl.tpl"}
{else}
{include file=$tplFile}
{/if}
{/crmRegion}
</div>
{crmRegion name='page-footer'}
{if $urlIsPublic}
{include file="CRM/common/publicFooter.tpl"}
{else}
{include file="CRM/common/footer.tpl"}
{/if}
{/crmRegion}
</div> {* end crm-container div *}

View file

@ -0,0 +1,143 @@
{*
+--------------------------------------------------------------------+
| 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 |
+--------------------------------------------------------------------+
*}
{literal}
<script type="text/javascript">
CRM.$(function($) {
/**
* This function use to copy fields
*
* @param fname string field name
* @return void
*/
function copyFieldValues( fname ) {
// this is the most common pattern for elements, so first check if it exits
// this check field starting with "field[" and contains [fname] and is not
// hidden ( for checkbox hidden element is created )
var elementId = $('.crm-copy-fields [name^="field["][name*="[' + fname +']"][type!=hidden]');
// get the first element and it's value
var firstElement = elementId.eq(0);
var firstElementValue = firstElement.val();
//check if it is date element
var isDateElement = elementId.attr('format');
//get the element type
var elementType = elementId.attr('type');
// set the value for all the elements, elements needs to be handled are
// select, checkbox, radio, date fields, text, textarea, multi-select
// wysiwyg editor, advanced multi-select ( to do )
if ( elementType == 'radio' ) {
firstElementValue = elementId.filter(':checked').eq(0).val();
elementId.filter("[value=" + firstElementValue + "]").prop("checked",true).change();
}
else if ( elementType == 'checkbox' ) {
// handle checkbox
// get the entity id of first element
var firstEntityId = $('.crm-copy-fields > tbody > tr');
if ( firstEntityId.length == 0 ) {
firstEntityId = firstElement.closest('div.crm-grid-row');
}
firstEntityId = firstEntityId.attr('entity_id');
var firstCheckElement = $('.crm-copy-fields [type=checkbox][name^="field['+ firstEntityId +']['+ fname +']"][type!=hidden]');
if ( firstCheckElement.length > 1 ) {
// lets uncheck all the checkbox except first one
$('.crm-copy-fields [type=checkbox][name^="field["][name*="[' + fname +']"][type=checkbox]:not([name^="field['+ firstEntityId +']['+ fname +']["])').prop('checked', false);
//here for each checkbox for first row, check if it is checked and set remaining checkboxes
firstCheckElement.each(function() {
if ($(this).prop('checked') ) {
var elementName = $(this).attr('name');
var correctIndex = elementName.split('field['+ firstEntityId +']['+ fname +'][');
correctIndexValue = correctIndex[1].replace(']', '');
$('.crm-copy-fields [type=checkbox][name^="field["][name*="['+ fname +']['+ correctIndexValue+']"][type!=hidden]').prop('checked',true).change();
}
});
}
else {
if ( firstCheckElement.prop('checked') ) {
$('.crm-copy-fields [type=checkbox][name^="field["][name*="['+ fname +']"][type!=hidden]').prop('checked',true).change();
}
else {
$('.crm-copy-fields [type=checkbox][name^="field["][name*="['+ fname +']"][type!=hidden]').prop('checked', false).change();
}
}
}
else if (elementId.is('textarea')) {
var text = CRM.wysiwyg.getVal(firstElement);
elementId.each(function() {
CRM.wysiwyg.setVal(this, text);
});
}
else {
if (elementId.is('select') === true && firstElement.parent().find(':input').select().index() >= 1 && firstElement.parent().find('select').select().index < 1) {
// its a multiselect case
firstElement.parent().find(':input').select().each( function(count) {
var firstElementValue = $(this).val();
var elementId = $('.crm-copy-fields [name^="field["][name*="[' + fname +'][' + count + '"][type!=hidden]');
elementId.val(firstElementValue).not(":first").change();
});
}
else {
elementId.val(firstElementValue).change();
}
}
// since we use different display field for date we also need to set it.
// also check for date time field and set the value correctly
if ( isDateElement ) {
copyValuesDate( fname );
}
}
/**
* Special function to handle setting values for date fields
*
* @param fname string field name
* @return void
*/
function copyValuesDate(fname) {
var displayElement = $('.crm-copy-fields [name^="field_"][name*="_' + fname +'_display"]:visible');
var timeElement = $('.crm-copy-fields [name^="field["][name*="[' + fname +'_time]"][type!=hidden]');
displayElement.val( displayElement.eq(0).val() );
timeElement.val( timeElement.eq(0).val() );
}
//bind the click event for action icon
$('.action-icon').click(function( ) {
copyFieldValues($(this).attr('fname'));
});
});
</script>
{/literal}

View file

@ -0,0 +1,14 @@
{literal}
<script type="text/javascript">
function buildLinks( element, profileId ) {
if ( profileId >= 1 ) {
var ufFieldUrl = {/literal}"{crmURL p='civicrm/admin/uf/group/field' q='reset=1&action=browse&gid=' h=0}"{literal};
ufFieldUrl = ufFieldUrl + profileId;
var editTitle = {/literal}"{ts escape='js'}edit profile{/ts}"{literal};
element.parent().find('span.profile-links').html('<a href="' + ufFieldUrl +'" target="_blank" title="'+ editTitle+'">'+ editTitle+'</a>');
} else {
element.parent().find('span.profile-links').html('');
}
}
</script>
{/literal}

View file

@ -0,0 +1,94 @@
{*
+--------------------------------------------------------------------+
| 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 |
+--------------------------------------------------------------------+
*}
{* This included tpl checks if a given username is taken or available. *}
{crmSigner var=checkUserSig for=civicrm/ajax/cmsuser}
{literal}
var lastName = null;
cj("#checkavailability").click(function() {
var cmsUserName = cj.trim(cj("#cms_name").val());
if ( lastName == cmsUserName) {
/*if user checking the same user name more than one times. avoid the ajax call*/
return;
}
/*don't allow special character and for joomla minimum username length is two*/
var spchar = "\<|\>|\"|\'|\%|\;|\(|\)|\&|\\\\|\/";
{/literal}{if $config->userSystem->is_drupal == "1"}{literal}
spchar = spchar + "|\~|\`|\:|\!|\=|\#|\$|\^|\*|\{|\}|\\[|\\]|\+|\?|\,";
{/literal}{/if}{literal}
var r = new RegExp( "["+spchar+"]", "i");
/*regular expression \\ matches a single backslash. this becomes r = /\\/ or r = new RegExp("\\\\").*/
if ( r.exec(cmsUserName) ) {
alert('{/literal}{ts escape="js"}Your username contains invalid characters{/ts}{literal}');
return;
}
{/literal}{if $config->userFramework == "Joomla"}{literal}
else if ( cmsUserName && cmsUserName.length < 2 ) {
alert('{/literal}{ts escape="js"}Your username is too short{/ts}{literal}');
return;
}
{/literal}{/if}{literal}
if (cmsUserName) {
/*take all messages in javascript variable*/
var check = "{/literal}{ts escape='js'}Checking...{/ts}{literal}";
var available = "{/literal}{ts escape='js'}This username is currently available.{/ts}{literal}";
var notavailable = "{/literal}{ts escape='js'}This username is taken.{/ts}{literal}";
var errorMsg = "{/literal}{ts escape='js'}Error checking username. Please reload the form and try again.{/ts}{literal}";
//remove all the class add the messagebox classes and start fading
cj("#msgbox").removeClass().addClass('cmsmessagebox').css({"color":"#000","backgroundColor":"#FFC","border":"1px solid #c93"}).text(check).fadeIn("slow");
//check the username exists or not from ajax
var contactUrl = {/literal}"{crmURL p='civicrm/ajax/cmsuser' h=0 }"{literal};
var checkUserParams = {
cms_name: cj("#cms_name").val(),
ts: {/literal}"{$checkUserSig.ts}"{literal},
sig: {/literal}"{$checkUserSig.signature}"{literal},
for: 'civicrm/ajax/cmsuser'
};
cj.post(contactUrl, checkUserParams ,function(data) {
if ( data.name == "no") {/*if username not avaiable*/
cj("#msgbox").fadeTo(200,0.1,function() {
cj(this).html(notavailable).addClass('cmsmessagebox').css({"color":"#CC0000","backgroundColor":"#F7CBCA","border":"1px solid #CC0000"}).fadeTo(900,1);
});
} else if ( data.name == "error") {/*if username not avaiable*/
cj("#msgbox").fadeTo(200,0.1,function() {
cj(this).html(errorMsg).addClass('cmsmessagebox').css({"color":"#CC0000","backgroundColor":"#F7CBCA","border":"1px solid #CC0000"}).fadeTo(900,1);
});
} else {
cj("#msgbox").fadeTo(200,0.1,function() {
cj(this).html(available).addClass('cmsmessagebox').css({"color":"#008000","backgroundColor":"#C9FFCA", "border": "1px solid #349534"}).fadeTo(900,1);
});
}
}, "json");
lastName = cmsUserName;
} else {
cj("#msgbox").removeClass().text('').css({"backgroundColor":"#FFFFFF", "border": "0px #FFFFFF"}).fadeIn("fast");
}
});
{/literal}

View file

@ -0,0 +1,12 @@
{if !empty($nocid)}
<div class="crm-other-contact-row messages status">
<span>{ts}You are completing this form on behalf of someone else. Please enter their details.</span>{/ts}
{if !empty($selectable)}
<div class="crm-contact-select-row">
<div class="crm-content">
{$form.select_contact_id.html}
</div>
</div>
{/if}
</div>
{/if}

View file

@ -0,0 +1,479 @@
<?php
/*
+--------------------------------------------------------------------+
| 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 |
+--------------------------------------------------------------------+
*/
/**
* CiviCRM Configuration File.
*/
global $civicrm_root, $civicrm_setting, $civicrm_paths;
/**
* Content Management System (CMS) Host:
*
* CiviCRM can be hosted in either Drupal 6 or 7, Joomla or WordPress.
*
* Settings for Backdrop CMS:
* define( 'CIVICRM_UF' , 'Backdrop');
*
* Settings for Drupal 7.x:
* define( 'CIVICRM_UF' , 'Drupal');
*
* Settings for Drupal 6.x:
* define( 'CIVICRM_UF' , 'Drupal6');
*
* Settings for Joomla 1.7.x - 2.5.x:
* define( 'CIVICRM_UF' , 'Joomla');
*
* Settings for WordPress 3.3.x:
* define( 'CIVICRM_UF' , 'WordPress');
*
* You may have issues with images in CiviCRM. If this is the case, be sure
* to update the CiviCRM Resource URL field to your CiviCRM root directory
* (Administer::System Settings::Resource URLs).
*/
if (!defined('CIVICRM_UF')) {
if (getenv('CIVICRM_UF')) {
define('CIVICRM_UF', getenv('CIVICRM_UF'));
}
else {
define('CIVICRM_UF', '%%cms%%');
}
}
/**
* Content Management System (CMS) Datasource:
*
* Update this setting with your CMS (Drupal, Backdrop CMS, or Joomla) database username, password, server and DB name.
* If any of these contain a single quote or backslash, escape those characters with a backslash: \' and \\, respectively.
*
* Datasource (DSN) format:
* define( 'CIVICRM_UF_DSN', 'mysql://cms_db_username:cms_db_password@db_server/cms_database?new_link=true');
*/
if (!defined('CIVICRM_UF_DSN') && CIVICRM_UF !== 'UnitTests') {
define( 'CIVICRM_UF_DSN' , 'mysql://%%CMSdbUser%%:%%CMSdbPass%%@%%CMSdbHost%%/%%CMSdbName%%?new_link=true');
}
// %%extraSettings%%
/**
* CiviCRM Database Settings
*
* Database URL (CIVICRM_DSN) for CiviCRM Data:
* Database URL format:
* define( 'CIVICRM_DSN', 'mysql://crm_db_username:crm_db_password@db_server/crm_database?new_link=true');
*
* Drupal and CiviCRM can share the same database, or can be installed into separate databases.
* Backdrop CMS and CiviCRM can also share the same database, or can be installed into separate databases.
*
* EXAMPLE: Drupal/Backdrop and CiviCRM running in the same database...
* DB Name = cms, DB User = cms
* define( 'CIVICRM_DSN' , 'mysql://cms:YOUR_PASSWORD@localhost/cms?new_link=true');
*
* EXAMPLE: Drupal/Backdrop and CiviCRM running in separate databases...
* CMS DB Name = cms, DB User = cms
* CiviCRM DB Name = civicrm, CiviCRM DB User = civicrm
* define( 'CIVICRM_DSN' , 'mysql://civicrm:YOUR_PASSWORD@localhost/civicrm?new_link=true');
*
* If your username, password, server or DB name contain a single quote or backslash, escape those characters
* with a backslash: \' and \\, respectively.
*
*/
if (!defined('CIVICRM_DSN')) {
if (CIVICRM_UF === 'UnitTests' && isset($GLOBALS['_CV']['TEST_DB_DSN'])) {
define('CIVICRM_DSN', $GLOBALS['_CV']['TEST_DB_DSN']);
}
else {
define('CIVICRM_DSN', 'mysql://%%dbUser%%:%%dbPass%%@%%dbHost%%/%%dbName%%?new_link=true');
}
}
/**
* CiviCRM DSN Mode
* Used to determine if you want CiviCRM to automatically change the dsn to mysqli if its avaliable.
* Uncomment and edit below as necessary
*/
// define ('DB_DSN_MODE', 'auto');
/**
* CiviCRM Logging Database
*
* Used to point to a different database to use for logging (if desired). If unset defaults to equal CIVICRM_DSN.
* The CIVICRM_DSN user needs to have the rights to modify the below database schema and be able to write to it.
*/
if (!defined('CIVICRM_LOGGING_DSN')) {
define('CIVICRM_LOGGING_DSN', CIVICRM_DSN);
}
/**
* File System Paths:
*
* $civicrm_root is the file system path on your server where the civicrm
* code is installed. Use an ABSOLUTE path (not a RELATIVE path) for this setting.
*
* CIVICRM_TEMPLATE_COMPILEDIR is the file system path where compiled templates are stored.
* These sub-directories and files are temporary caches and will be recreated automatically
* if deleted.
*
* IMPORTANT: The COMPILEDIR directory must exist,
* and your web server must have read/write access to these directories.
*
*
* EXAMPLE - Drupal:
* If the path to the Drupal home directory is /var/www/htdocs/drupal
* the $civicrm_root setting would be:
* $civicrm_root = '/var/www/htdocs/drupal/sites/all/modules/civicrm/';
*
* the CIVICRM_TEMPLATE_COMPILEDIR would be:
* define( 'CIVICRM_TEMPLATE_COMPILEDIR', '/var/www/htdocs/drupal/sites/default/files/civicrm/templates_c/');
*
* EXAMPLE - Backdrop CMS:
* If the path to the Backdrop home directory is /var/www/htdocs/backdrop
* the $civicrm_root setting would be:
* $civicrm_root = '/var/www/htdocs/backdrop/modules/civicrm/';
*
* the CIVICRM_TEMPLATE_COMPILEDIR would be:
* define( 'CIVICRM_TEMPLATE_COMPILEDIR', '/var/www/htdocs/backdrop/files/civicrm/templates_c/');
*
* EXAMPLE - Joomla Installations:
* If the path to the Joomla home directory is /var/www/htdocs/joomla
* the $civicrm_root setting would be:
* $civicrm_root = '/var/www/htdocs/joomla/administrator/components/com_civicrm/civicrm/';
*
* the CIVICRM_TEMPLATE_COMPILEDIR would be:
* define( 'CIVICRM_TEMPLATE_COMPILEDIR', '/var/www/htdocs/joomla/media/civicrm/templates_c/');
*
* EXAMPLE - WordPress Installations:
* If the path to the WordPress home directory is /var/www/htdocs/wordpress and the path to the plugin directory is /var/www/htdocs/wordpress/wp-content/plugins
* the $civicrm_root setting would be:
* $civicrm_root = '/var/www/htdocs/wordpress/wp-content/plugins/civicrm/civicrm/';
*
* the CIVICRM_TEMPLATE_COMPILEDIR would be:
* define( 'CIVICRM_TEMPLATE_COMPILEDIR', '/var/www/htdocs/wordpress/wp-content/uploads/civicrm/templates_c/');
*
*/
global $civicrm_root;
$civicrm_root = '%%crmRoot%%';
if (!defined('CIVICRM_TEMPLATE_COMPILEDIR')) {
define( 'CIVICRM_TEMPLATE_COMPILEDIR', '%%templateCompileDir%%');
}
/**
* Site URLs:
*
* This section defines absolute and relative URLs to access the host CMS (Backdrop, Drupal, or Joomla) resources.
*
* IMPORTANT: Trailing slashes should be used on all URL settings.
*
*
* EXAMPLE - Drupal Installations:
* If your site's home url is http://www.example.com/drupal/
* these variables would be set as below. Modify as needed for your install.
*
* CIVICRM_UF_BASEURL - home URL for your site:
* define( 'CIVICRM_UF_BASEURL' , 'http://www.example.com/drupal/');
*
* EXAMPLE - Backdrop CMS Installations:
* If your site's home url is http://www.example.com/backdrop/
* these variables would be set as below. Modify as needed for your install.
*
* CIVICRM_UF_BASEURL - home URL for your site:
* define( 'CIVICRM_UF_BASEURL' , 'http://www.example.com/backdrop/');
*
* EXAMPLE - Joomla Installations:
* If your site's home url is http://www.example.com/joomla/
*
* CIVICRM_UF_BASEURL - home URL for your site:
* Administration site:
* define( 'CIVICRM_UF_BASEURL' , 'http://www.example.com/joomla/administrator/');
* Front-end site:
* define( 'CIVICRM_UF_BASEURL' , 'http://www.example.com/joomla/');
*
*/
if (!defined('CIVICRM_UF_BASEURL')) {
define( 'CIVICRM_UF_BASEURL' , '%%baseURL%%');
}
/**
* Define any CiviCRM Settings Overrides per http://wiki.civicrm.org/confluence/display/CRMDOC/Override+CiviCRM+Settings
*
* Uncomment and edit the below as appropriate.
*/
// Override the Temporary Files directory.
// $civicrm_setting['Directory Preferences']['uploadDir'] = '/path/to/upload-dir' ;
// Override the custom files upload directory.
// $civicrm_setting['Directory Preferences']['customFileUploadDir'] = '/path/to/custom-dir';
// Override the images directory.
// $civicrm_setting['Directory Preferences']['imageUploadDir'] = '/path/to/image-upload-dir' ;
// Override the custom templates directory.
// $civicrm_setting['Directory Preferences']['customTemplateDir'] = '/path/to/template-dir';
// Override the Custom php path directory.
// $civicrm_setting['Directory Preferences']['customPHPPathDir'] = '/path/to/custom-php-dir';
// Override the extensions directory.
// $civicrm_setting['Directory Preferences']['extensionsDir'] = '/path/to/extensions-dir';
// Override the resource url
// $civicrm_setting['URL Preferences']['userFrameworkResourceURL'] = 'http://example.com/example-resource-url/';
// Override the Image Upload URL (System Settings > Resource URLs)
// $civicrm_setting['URL Preferences']['imageUploadURL'] = 'http://example.com/example-image-upload-url';
// Override the Custom CiviCRM CSS URL
// $civicrm_setting['URL Preferences']['customCSSURL'] = 'http://example.com/example-css-url' ;
// Override the extensions resource URL
// $civicrm_setting['URL Preferences']['extensionsURL'] = 'http://example.com/pathtoextensiondir'
// Disable display of Community Messages on home dashboard
// $civicrm_setting['CiviCRM Preferences']['communityMessagesUrl'] = false;
// Disable automatic download / installation of extensions
// $civicrm_setting['Extension Preferences']['ext_repo_url'] = false;
// set triggers to be managed offline per CRM-18212
// $civicrm_setting['CiviCRM Preferences']['logging_no_trigger_permission'] = 1;
// Override the CMS root path defined by cmsRootPath.
// define('CIVICRM_CMSDIR', '/path/to/install/root/');
// Opt-out of announcements by the CiviCRM core team for releases, paid services, events, etc. Separate each preferred optout category with a comma:
// "offers": paid service offers
// "asks": requests for donations or membership signup/renewal to CiviCRM
// "releases": major release announcements
// "events": announcements of local/national upcoming events
// $civicrm_setting['CiviCRM Preferences']['communityMessagesUrl'] = 'https://alert.civicrm.org/alert?prot=1&ver={ver}&uf={uf}&sid={sid}&lang={lang}&co={co}&optout=offers,asks';
/**
* If you are using any CiviCRM script in the bin directory that
* requires authentication, then you also need to set this key.
* We recommend using a 16-32 bit alphanumeric/punctuation key.
* More info at http://wiki.civicrm.org/confluence/display/CRMDOC/Command-line+Script+Configuration
*/
if (!defined('CIVICRM_SITE_KEY')) {
define( 'CIVICRM_SITE_KEY', '%%siteKey%%');
}
/**
* Enable this constant, if you want to send your email through the smarty
* templating engine(allows you to do conditional and more complex logic)
*
*/
if (!defined('CIVICRM_MAIL_SMARTY')) {
define( 'CIVICRM_MAIL_SMARTY', 0 );
}
/**
* This setting logs all emails to a file. Useful for debugging any mail (or civimail) issues.
* Enabling this setting will not send any email, ensure this is commented out in production
* The CIVICRM_MAIL_LOG is a debug option which disables MTA (mail transport agent) interaction.
* You must disable CIVICRM_MAIL_LOG before CiviCRM will talk to your MTA.
*/
// if (!defined('CIVICRM_MAIL_LOG')) {
// define( 'CIVICRM_MAIL_LOG', '%%templateCompileDir%%/mail.log');
// }
if (!defined('CIVICRM_DOMAIN_ID')) {
define( 'CIVICRM_DOMAIN_ID', 1);
}
/**
* Setting to define the environment in which this CiviCRM instance is running.
* Note the setting here must be value from the option group 'Environment',
* (see Administration > System Settings > Option Groups, Options beside Environment)
* which by default has three option values: 'Production', 'Staging', 'Development'.
* NB: defining a value for environment here prevents it from being set
* via the browser.
*/
// $civicrm_setting['domain']['environment'] = 'Production';
/**
* Settings to enable external caching using a cache server. This is an
* advanced feature, and you should read and understand the documentation
* before you turn it on. We cannot store these settings in the DB since the
* config could potentially also be cached and we need to avoid an infinite
* recursion scenario.
*
* @see http://civicrm.org/node/126
*/
/**
* If you have a cache server configured and want CiviCRM to make use of it,
* set the following constant. You should only set this once you have your cache
* server up and working, because CiviCRM will not start up if your server is
* unavailable on the host and port that you specify. By default CiviCRM will use
* an in-memory array cache
*
* To use the php extension memcache use a value of 'Memcache'
* To use the php extension memcached use a value of 'Memcached'
* To use the php extension apc use a value of 'APCcache'
* To use the php extension redis use a value of 'Redis'
* To not use any caching (not recommended), use a value of 'NoCache'
*
*/
if (!defined('CIVICRM_DB_CACHE_CLASS')) {
define('CIVICRM_DB_CACHE_CLASS', 'ArrayCache');
}
/**
* Change this to the IP address of your cache server if it is not on the
* same machine (Unix).
*/
if (!defined('CIVICRM_DB_CACHE_HOST')) {
define('CIVICRM_DB_CACHE_HOST', 'localhost');
}
/**
* Change this if you are not using the standard port for your cache server.
*
* The standard port for Memcache & APCCache is 11211. For Redis it is 6379.
*/
if (!defined('CIVICRM_DB_CACHE_PORT')) {
define('CIVICRM_DB_CACHE_PORT', 11211 );
}
/**
* Change this if your cache server requires a password (currently only works
* with Redis)
*/
if (!defined('CIVICRM_DB_CACHE_PASSWORD')) {
define('CIVICRM_DB_CACHE_PASSWORD', '' );
}
/**
* Items in cache will expire after the number of seconds specified here.
* Default value is 3600 (i.e., after an hour)
*/
if (!defined('CIVICRM_DB_CACHE_TIMEOUT')) {
define('CIVICRM_DB_CACHE_TIMEOUT', 3600 );
}
/**
* If you are sharing the same cache instance with more than one CiviCRM
* database, you will need to set a different value for the following argument
* so that each copy of CiviCRM will not interfere with other copies. If you only
* have one copy of CiviCRM, you may leave this set to ''. A good value for
* this if you have two servers might be 'server1_' for the first server, and
* 'server2_' for the second server.
*/
if (!defined('CIVICRM_DB_CACHE_PREFIX')) {
define('CIVICRM_DB_CACHE_PREFIX', '');
}
/**
* If you have multilingual site and you are using the "inherit CMS language"
* configuration option, but wish to, for example, use fr_CA instead of the
* default fr_FR (for French), set one or more of the constants below to an
* appropriate regional value.
*/
// define('CIVICRM_LANGUAGE_MAPPING_FR', 'fr_CA');
// define('CIVICRM_LANGUAGE_MAPPING_EN', 'en_CA');
// define('CIVICRM_LANGUAGE_MAPPING_ES', 'es_MX');
// define('CIVICRM_LANGUAGE_MAPPING_PT', 'pt_BR');
// define('CIVICRM_LANGUAGE_MAPPING_ZH', 'zh_TW');
/**
* Native gettext improves performance of localized CiviCRM installations
* significantly. However, your host must enable the locale (language).
* On most GNU/Linux, Unix or MacOSX systems, you may view them with
* the command line by typing: "locale -a".
*
* On Debian or Ubuntu, you may reconfigure locales with:
* # dpkg-reconfigure locales
*
* For more information:
* http://wiki.civicrm.org/confluence/x/YABFBQ
*/
// if (!defined('CIVICRM_GETTEXT_NATIVE')) {
// define('CIVICRM_GETTEXT_NATIVE', 1);
// }
/**
* Configure MySQL to throw more errors when encountering unusual SQL expressions.
*
* If undefined, the value is determined automatically. For CiviCRM tarballs, it defaults
* to FALSE; for SVN checkouts, it defaults to TRUE.
*/
// if (!defined('CIVICRM_MYSQL_STRICT')) {
// define('CIVICRM_MYSQL_STRICT', TRUE );
// }
if (CIVICRM_UF === 'UnitTests') {
if (!defined('CIVICRM_CONTAINER_CACHE')) define('CIVICRM_CONTAINER_CACHE', 'auto');
if (!defined('CIVICRM_MYSQL_STRICT')) define('CIVICRM_MYSQL_STRICT', true);
}
/**
*
* Do not change anything below this line. Keep as is
*
*/
$include_path = '.' . PATH_SEPARATOR .
$civicrm_root . PATH_SEPARATOR .
$civicrm_root . DIRECTORY_SEPARATOR . 'packages' . PATH_SEPARATOR .
get_include_path( );
if ( set_include_path( $include_path ) === false ) {
echo "Could not set the include path<p>";
exit( );
}
if (!defined('CIVICRM_CLEANURL')) {
if ( function_exists('variable_get') && variable_get('clean_url', '0') != '0') {
define('CIVICRM_CLEANURL', 1 );
}
else {
define('CIVICRM_CLEANURL', 0);
}
}
// force PHP to auto-detect Mac line endings
ini_set('auto_detect_line_endings', '1');
// make sure the memory_limit is at least 64 MB
$memLimitString = trim(ini_get('memory_limit'));
$memLimitUnit = strtolower(substr($memLimitString, -1));
$memLimit = (int) $memLimitString;
switch ($memLimitUnit) {
case 'g': $memLimit *= 1024;
case 'm': $memLimit *= 1024;
case 'k': $memLimit *= 1024;
}
if ($memLimit >= 0 and $memLimit < 134217728) {
ini_set('memory_limit', '128M');
}
require_once 'CRM/Core/ClassLoader.php';
CRM_Core_ClassLoader::singleton()->register();

View file

@ -0,0 +1,41 @@
{*
+--------------------------------------------------------------------+
| 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 |
+--------------------------------------------------------------------+
*}
{* Display contact-related footer. *}
{strip}
<div class="crm-footer" id="crm-record-log">
<span class="col1">
{if !empty($external_identifier)}{ts}External ID{/ts}:&nbsp;{$external_identifier}{/if}
{if $action NEQ 2}&nbsp; &nbsp;{ts}Contact ID{/ts}:&nbsp;{$contactId}{/if}
</span>
{if !empty($lastModified)}
{ts}Last Change by{/ts}: <a href="{crmURL p='civicrm/contact/view' q="action=view&reset=1&cid=`$lastModified.id`"}">{$lastModified.name}</a> ({$lastModified.date|crmDate}) &nbsp;
{if !empty($changeLog)}
<a href="{crmURL p='civicrm/contact/view' q="reset=1&action=browse&selectedChild=log&cid=`$contactId`"}" class="crm-log-view">&raquo; {ts}View Change Log{/ts}</a>
{/if}
{/if}
{if !empty($created_date)}<div class="contact-created-date">{ts}Created{/ts}: {$created_date|crmDate}</div>{/if}
</div>
{/strip}

View file

@ -0,0 +1,9 @@
{* @deprecated *}
<script>
{literal}
CRM.$(function($) {
CRM.console('warn', 'Warning: A CiviCRM extension is attempting to use the deprecated crmeditable.tpl. The extension needs to be updated to remove references to this template.');
});
</script>
{/literal}

View file

@ -0,0 +1,94 @@
{*
+--------------------------------------------------------------------+
| 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 |
+--------------------------------------------------------------------+
*}
{literal}
<script type="text/javascript">
(function($) {
CRM.buildCustomData = function (type, subType, subName, cgCount, groupID, isMultiple, onlySubtype) {
var dataUrl = CRM.url('civicrm/custom', {type: type}),
prevCount = 1,
fname = '#customData',
storage = {};
if (subType) {
dataUrl += '&subType=' + subType;
}
if (onlySubtype) {
dataUrl += '&onlySubtype=' + onlySubtype;
}
if (subName) {
dataUrl += '&subName=' + subName;
$('#customData' + subName).show();
}
else {
$('#customData').show();
}
if (groupID) {
dataUrl += '&groupID=' + groupID;
}
{/literal}
{if $groupID}
dataUrl += '&groupID=' + '{$groupID}';
{/if}
{if $entityID}
dataUrl += '&entityID=' + '{$entityID}';
{/if}
{if $qfKey}
dataUrl += '&qf=' + '{$qfKey}';
{/if}
{literal}
if (!cgCount) {
cgCount = 1;
}
else if (cgCount >= 1) {
prevCount = cgCount;
cgCount++;
}
dataUrl += '&cgcount=' + cgCount;
if (isMultiple) {
fname = '#custom_group_' + groupID + '_' + prevCount;
if ($(".add-more-link-" + groupID + "-" + prevCount).length) {
$(".add-more-link-" + groupID + "-" + prevCount).hide();
}
else {
$("#add-more-link-" + prevCount).hide();
}
}
else if (subName && subName != 'null') {
fname += subName;
}
return CRM.loadPage(dataUrl, {target: fname});
};
})(CRM.$);
</script>
{/literal}

View file

@ -0,0 +1,100 @@
{*
+--------------------------------------------------------------------+
| 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 |
+--------------------------------------------------------------------+
*}
{literal}
<script type="text/javascript">
CRM.$(function($) {
// The set of options we can use to initialize jQuery.dashboard().
var options = {
widgetsByColumn: {/literal}{$contactDashlets|@json_encode}{literal},
// These define the urls and data objects used for all of the ajax requests to the server.
ajaxCallbacks: {
// jQuery.dashboard() POSTs the widget-to-column settings here.
// The 'columns' property of data is reserved for the widget-to-columns settings:
// An array (keyed by zero-indexed column ID), of arrays (keyed by widget ID)
// of ints; 1 if the widget is minimized. 0 if not.
saveColumns: {
url: {/literal}'{crmURL p='civicrm/ajax/dashboard' h=0 }'{literal},
data: {
// columns: array(0 => array(widgetId => isMinimized, ...), ...),
op: 'save_columns', key: {/literal}"{crmKey name='civicrm/ajax/dashboard'}"{literal}
}
},
// jQuery.dashboard() GETs a widget's settings object and POST's a users submitted
// settings back to the server. The return, in both cases, is an associative
// array with the new settings markup and other info:
//
// Required properties:
// * markup: HTML string. The inner HTML of the settings form. jQuery.dashboard()
// provides the Save and Cancel buttons and wrapping <form> element. Can include
// <input>s of any standard type and <select>s, nested in <div>s etc.
//
// Server-side executable script callbacks (See documentation for
// ajaxCallbacks.getWidgets):
// * initScript: Called when widget settings are initialising.
// * script: Called when switching into settings mode. Executed every time
// the widget goes into settings-edit mode.
//
// The 'id' property of data is reserved for the widget ID.
// The 'settings' property of data is reserved for the user-submitted settings.
// An array (keyed by the name="" attributes of <input>s), of <input> values.
widgetSettings: {
url: {/literal}'{crmURL p='civicrm/ajax/dashboard' h=0 }'{literal},
data: {
// id: widgetId,
// settings: array(name => value, ...),
op: 'widget_settings', key: {/literal}"{crmKey name='civicrm/ajax/dashboard'}"{literal}
}
}
}
};
var dashboard = $('#civicrm-dashboard')
.on('mouseover', '.widget-header', function() {
$(this).closest('.widget-wrapper').addClass('db-hover-handle');
})
.on('mouseout', '.widget-header', function() {
$(this).closest('.widget-wrapper').removeClass('db-hover-handle');
})
.dashboard(options);
$('.crm-hover-button.show-refresh').click(function(e) {
e.preventDefault();
$.each(dashboard.widgets, function(id, widget) {
widget.reloadContent();
});
});
});
</script>
{/literal}

View file

@ -0,0 +1,49 @@
{*
+--------------------------------------------------------------------+
| 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 |
+--------------------------------------------------------------------+
*}
<!-- .tpl file invoked: {$tplFile}. Call via form.tpl if we have a form in the page. -->
{if $smarty.get.smartyDebug}
{debug}
{/if}
{if $smarty.get.sessionReset}
{$session->reset($smarty.get.sessionReset)}
{/if}
{if $smarty.get.sessionDebug}
{$session->debug($smarty.get.sessionDebug)}
{/if}
{if $smarty.get.directoryCleanup}
{$config->cleanup($smarty.get.directoryCleanup)}
{/if}
{if $smarty.get.cacheCleanup}
{$config->clearDBCache()}
{/if}
{if $smarty.get.configReset}
{$config->reset()}
{/if}

View file

@ -0,0 +1,83 @@
{* common dupe contacts processing *}
<div id='processDupes' style="display:none;"></div>
{literal}
<script type='text/javascript'>
cj( '#processDupes' ).hide( );
function processDupes(cid, oid, oper, context, reloadURL) {
//currently we are doing in a single way.
//later we might want two way operations.
if ( !cid || !oid || !oper ) return;
var title = {/literal}'{ts escape="js"}Mark as Dedupe Exception{/ts}'{literal};
var msg = {/literal}'{ts escape="js"}Are you sure you want to mark this pair of contacts as NOT duplicates?{/ts}'{literal};
if ( oper == 'nondupe-dupe' ) {
var title = {/literal}'{ts escape="js"}Remove Dedupe Exception{/ts}'{literal};
var msg = {/literal}'{ts escape="js"}Are you sure you want to remove this dedupe exception.{/ts}'{literal};
}
cj("#processDupes").show( );
cj("#processDupes").dialog({
title: title,
modal: true,
open:function() {
cj( '#processDupes' ).show( ).html( msg );
},
buttons: {
"Cancel": function() {
cj(this).dialog("close");
},
"OK": function() {
saveProcessDupes( cid, oid, oper, context );
cj(this).dialog( 'close' );
if ( context == 'merge-contact' && reloadURL ) {
// redirect after a small delay
setTimeout("window.location.href = '" + reloadURL + "'", 500);
}
else {
//CRM-15113 this has the effect of causing the alert to display. Also, as they are already 'actioned' Civi sensibly returns the browser to the
//search screen
setTimeout(function(){
window.location.reload();
}, 500);
}
}
}
});
}
function saveProcessDupes( cid, oid, oper, context ) {
//currently we are doing in a single way.
//later we might want two way operations.
if ( !cid || !oid || !oper ) return;
var statusMsg = {/literal}'{ts escape="js"}Marked as non duplicates.{/ts}'{literal};
if ( oper == 'nondupe-dupe' ) {
var statusMsg = {/literal}'{ts escape="js"}Marked as duplicates.{/ts}'{literal};
}
var url = {/literal}"{crmURL p='civicrm/ajax/rest' q='className=CRM_Contact_Page_AJAX&fnName=processDupes' h=0 }"{literal};
//post the data to process dupes.
cj.post( url,
{cid: cid, oid: oid, op: oper},
function( result ) {
if ( result.status == oper ) {
if ( oper == 'dupe-nondupe' &&
context == 'dupe-listing' ) {
oTable.fnDraw();
} else if ( oper == 'nondupe-dupe' ) {
cj( "#dupeRow_" + cid + '_' + oid ).hide( );
}
}
},
'json' );
}
</script>
{/literal}

View file

@ -0,0 +1,47 @@
{*
+--------------------------------------------------------------------+
| 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 isset($deferredFinancialType)}
<div id='warningDialog' style="display:none;"></div>
{literal}
<script type="text/javascript">
CRM.$(function($) {
var more = $('.crm-button input.validate').click(function(e) {
var message = "{/literal} {if $context eq 'Event'}
{ts}Note: Revenue for this event registration will not be deferred as the financial type does not have a deferred revenue account setup for it. If you want the revenue to be deferred, please select a different Financial Type with a Deferred Revenue account setup for it, or setup a Deferred Revenue account for this Financial Type.{/ts}
{else if $context eq 'MembershipType'}
{ts}Note: Revenue for these types of memberships will not be deferred as the financial type does not have a deferred revenue account setup for it. If you want the revenue to be deferred, please select a different Financial Type with a Deferred Revenue account setup for it, or setup a Deferred Revenue account for this Financial Type.{/ts}
{/if}
{literal}";
var deferredFinancialType = {/literal}{$deferredFinancialType|@json_encode}{literal};
var financialType = parseInt($('#financial_type_id').val());
if ($.inArray(financialType, deferredFinancialType) == -1) {
return confirm(message);
}
});
});
</script>
{/literal}
{/if}

View file

@ -0,0 +1,66 @@
{*
+--------------------------------------------------------------------+
| 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 |
+--------------------------------------------------------------------+
*}
{* Displays search criteria assigned to $qill variable, for all search forms - basic, advanced, search builder, and component searches. *}
{foreach from=$qill name=sets key=setKey item=orClauses}
{if $smarty.foreach.sets.total > 2}
{* We have multiple criteria sets, so display AND'd items in each set on the same line. *}
{if count($orClauses) gt 0}
<ul>
<li>
{foreach from=$orClauses name=criteria item=item}
{$item|escape}
{if !$smarty.foreach.criteria.last}
<span class="font-italic">...{ts}AND{/ts}...</span>
{/if}
{/foreach}
</li>
</ul>
{* If there's a criteria set with key=0, this set is AND'd with other sets (if any). Otherwise, multiple sets are OR'd together. *}
{if !$smarty.foreach.sets.last}
<ul class="menu"><li class="no-display">
{if $setKey == 0}AND<br />
{else}OR<br />
{/if}
</li></ul>
{/if}
{/if}
{else}
{foreach from=$orClauses name=criteria item=item}
<div class="qill">
{$item|escape}
{if !$smarty.foreach.criteria.last}
{if $operator}
<span class="font-italic">...{$operator|escape}...</span>
{else}
<span class="font-italic">...{ts}AND{/ts}...</span>
{/if}
{/if}
</div>
{/foreach}
{/if}
{/foreach}

View file

@ -0,0 +1,78 @@
{*
+--------------------------------------------------------------------+
| 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 $config->debug}
{include file="CRM/common/debug.tpl"}
{/if}
<div id="crm-container" class="crm-container{if $urlIsPublic} crm-public{/if}" lang="{$config->lcMessages|truncate:2:"":true}" xml:lang="{$config->lcMessages|truncate:2:"":true}">
{crmNavigationMenu is_default=1}
{if isset($browserPrint) and $browserPrint}
{* Javascript window.print link. Used for public pages where we can't do printer-friendly view. *}
<div id="printer-friendly">
<a href="#" onclick="window.print(); return false;" title="{ts}Print this page.{/ts}">
<i class="crm-i fa-print"></i>
</a>
</div>
{else}
{* Printer friendly link/icon. *}
<div id="printer-friendly">
<a href="{$printerFriendly}" target='_blank' title="{ts}Printer-friendly view of this page.{/ts}">
<i class="crm-i fa-print"></i>
</a>
</div>
{/if}
{crmRegion name='page-header'}
{/crmRegion}
<div class="clear"></div>
{if isset($localTasks) and $localTasks}
{include file="CRM/common/localNav.tpl"}
{/if}
<div id="crm-main-content-wrapper">
{include file="CRM/common/status.tpl"}
{crmRegion name='page-body'}
{if isset($isForm) and $isForm and isset($formTpl)}
{include file="CRM/Form/$formTpl.tpl"}
{else}
{include file=$tplFile}
{/if}
{/crmRegion}
</div>
{crmRegion name='page-footer'}
{if $urlIsPublic}
{include file="CRM/common/publicFooter.tpl"}
{else}
{include file="CRM/common/footer.tpl"}
{/if}
{/crmRegion}
</div> {* end crm-container div *}

View file

@ -0,0 +1,79 @@
{*
+--------------------------------------------------------------------+
| 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 $config->debug}
{include file="CRM/common/debug.tpl"}
{/if}
<div id="crm-container" class="crm-container{if $urlIsPublic} crm-public{/if}" lang="{$config->lcMessages|truncate:2:"":true}" xml:lang="{$config->lcMessages|truncate:2:"":true}">
{crmNavigationMenu is_default=1}
{if isset($browserPrint) and $browserPrint}
{* Javascript window.print link. Used for public pages where we can't do printer-friendly view. *}
<div id="printer-friendly">
<a href="#" onclick="window.print(); return false;" title="{ts}Print this page.{/ts}">
<i class="crm-i fa-print"></i>
</a>
</div>
{else}
{* Printer friendly link/icon. *}
<div id="printer-friendly">
<a href="{$printerFriendly}" target='_blank' title="{ts}Printer-friendly view of this page.{/ts}">
<i class="crm-i fa-print"></i>
</a>
</div>
{/if}
{*{include file="CRM/common/langSwitch.tpl"}*}
{crmRegion name='page-header'}
{/crmRegion}
<div class="clear"></div>
{if isset($localTasks) and $localTasks}
{include file="CRM/common/localNav.tpl"}
{/if}
<div id="crm-main-content-wrapper">
{include file="CRM/common/status.tpl"}
{crmRegion name='page-body'}
{if isset($isForm) and $isForm and isset($formTpl)}
{include file="CRM/Form/$formTpl.tpl"}
{else}
{include file=$tplFile}
{/if}
{/crmRegion}
</div>
{crmRegion name='page-footer'}
{if $urlIsPublic}
{include file="CRM/common/publicFooter.tpl"}
{else}
{include file="CRM/common/footer.tpl"}
{/if}
{/crmRegion}
</div> {* end crm-container div *}

View file

@ -0,0 +1,78 @@
{*
+--------------------------------------------------------------------+
| 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 $config->debug}
{include file="CRM/common/debug.tpl"}
{/if}
<div id="crm-container" class="crm-container{if $urlIsPublic} crm-public{/if}" lang="{$config->lcMessages|truncate:2:"":true}" xml:lang="{$config->lcMessages|truncate:2:"":true}">
{crmNavigationMenu is_default=1}
{if isset($browserPrint) and $browserPrint}
{* Javascript window.print link. Used for public pages where we can't do printer-friendly view. *}
<div id="printer-friendly">
<a href="#" onclick="window.print(); return false;" title="{ts}Print this page.{/ts}">
<i class="crm-i fa-print"></i>
</a>
</div>
{else}
{* Printer friendly link/icon. *}
<div id="printer-friendly">
<a href="{$printerFriendly}" target='_blank' title="{ts}Printer-friendly view of this page.{/ts}">
<i class="crm-i fa-print"></i>
</a>
</div>
{/if}
{crmRegion name='page-header'}
{/crmRegion}
<div class="clear"></div>
{if isset($localTasks) and $localTasks}
{include file="CRM/common/localNav.tpl"}
{/if}
<div id="crm-main-content-wrapper">
{include file="CRM/common/status.tpl"}
{crmRegion name='page-body'}
{if isset($isForm) and $isForm and isset($formTpl)}
{include file="CRM/Form/$formTpl.tpl"}
{else}
{include file=$tplFile}
{/if}
{/crmRegion}
</div>
{crmRegion name='page-footer'}
{if $urlIsPublic}
{include file="CRM/common/publicFooter.tpl"}
{else}
{include file="CRM/common/footer.tpl"}
{/if}
{/crmRegion}
</div> {* end crm-container div *}

View file

@ -0,0 +1,93 @@
{*
+--------------------------------------------------------------------+
| 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 |
+--------------------------------------------------------------------+
*}
{* handle common enable/disable actions *}
{literal}
<script type="text/javascript">
CRM.$(function($) {
var $a, $row, info, enabled, fieldLabel;
function successMsg() {
{/literal} {* client-side variable substitutions in smarty are AWKWARD! *}
var msg = enabled ? '{ts escape="js" 1="%1"}%1 Disabled{/ts}' : '{ts escape="js" 1="%1"}%1 Enabled{/ts}'{literal};
return ts(msg, {1: fieldLabel});
}
function refresh() {
$a.trigger('crmPopupFormSuccess');
CRM.refreshParent($row);
}
function save() {
$row.closest('table').block();
var params = {id: info.id};
if (info.action == 'setvalue') {
params.field = 'is_active';
params.value = enabled ? 0 : 1;
} else {
params.is_active = enabled ? 0 : 1;
}
CRM.api3(info.entity, info.action, params, {success: successMsg}).done(refresh);
}
function checkResponse(e, response) {
if (response.illegal) {
$(this).dialog('option', 'buttons', [
{text: {/literal}'{ts escape="js"}Close{/ts}'{literal}, click: function() {$(this).dialog('close');}, icons: {primary: 'fa-times'}}
]);
}
}
function enableDisable() {
$row = $a.closest('.crm-entity');
info = $a.crmEditableEntity();
fieldLabel = info.label || info.title || info.display_name || info.name || {/literal}'{ts escape="js"}Record{/ts}'{literal};
enabled = !$row.hasClass('disabled');
if (enabled) {
CRM.confirm({
url: CRM.url('civicrm/ajax/statusmsg', {entity: info.entity, id: info.id}),
title: ts('{/literal}{ts escape="js" 1='%1'}Disable %1{/ts}{literal}', {1: fieldLabel}),
options: {{/literal}yes: '{ts escape="js"}Yes{/ts}', no: '{ts escape="js"}No{/ts}'{literal}},
width: 300,
height: 'auto'
})
.on('crmLoad', checkResponse)
.on('crmConfirm:yes', save);
} else {
save();
}
}
// Because this is an inline script it may get added to the document more than once, so remove handler before adding
$('body')
.off('.crmEnableDisable')
.on('click.crmEnableDisable', '.action-item.crm-enable-disable', function(e) {
e.preventDefault();
$a = $(this);
CRM.loadScript(CRM.config.resourceBase + 'js/jquery/jquery.crmEditable.js').done(enableDisable);
});
});
</script>
{/literal}

View file

@ -0,0 +1,95 @@
{*
+--------------------------------------------------------------------+
| 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 |
+--------------------------------------------------------------------+
*}
{* error.tpl: Display page for fatal errors. Provides complete HTML doc.*}
{if $config->userFramework != 'Joomla' and $config->userFramework != 'WordPress'}
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
<head>
<title>{$pageTitle}</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<base href="{$config->resourceBase}" />
<style type="text/css" media="screen">
@import url({$config->resourceBase}css/civicrm.css);
@import url({$config->resourceBase}css/crm-i.css);
@import url({$config->resourceBase}bower_components/font-awesome/css/font-awesome.min.css);
</style>
</head>
<body>
<div id="crm-container" class="crm-container" lang="{$config->lcMessages|truncate:2:"":true}" xml:lang="{$config->lcMessages|truncate:2:"":true}">
{else}
<div id="crm-container" class="crm-container" lang="{$config->lcMessages|truncate:2:"":true}" xml:lang="{$config->lcMessages|truncate:2:"":true}">
<style type="text/css" media="screen">
@import url({$config->resourceBase}css/civicrm.css);
@import url({$config->resourceBase}css/crm-i.css);
@import url({$config->resourceBase}bower_components/font-awesome/css/font-awesome.min.css);
</style>
{/if}
<div class="messages status no-popup"> <i class="crm-i fa-exclamation-triangle crm-i-red"></i>
<span class="status-fatal">{ts}Sorry, due to an error, we are unable to fulfill your request at the moment. You may want to contact your administrator or service provider with more details about what action you were performing when this occurred.{/ts}</span>
<div class="crm-section crm-error-message">{$message}</div>
{if $error.message && $message != $error.message}
<hr style="solid 1px" />
<div class="crm-section crm-error-message">{$error.message}</div>
{/if}
{if ($code OR $mysql_code OR $errorDetails) AND $config->debug}
<div class="crm-accordion-wrapper collapsed crm-fatal-error-details-block">
<div class="crm-accordion-header" onclick="toggle(this);";>
{ts}Error Details{/ts}
</div><!-- /.crm-accordion-header -->
<div class="crm-accordion-body">
{if $code}
<div class="crm-section">{ts}Error Code:{/ts} {$code}</div>
{/if}
{if $mysql_code}
<div class="crm-section">{ts}Database Error Code:{/ts} {$mysql_code}</div>
{/if}
{if $errorDetails}
<div class="crm-section">{ts}Additional Details:{/ts} {$errorDetails}</div>
{/if}
</div><!-- /.crm-accordion-body -->
</div><!-- /.crm-accordion-wrapper -->
{/if}
<p><a href="{$config->userFrameworkBaseURL}" title="{ts}Main Menu{/ts}">{ts}Return to home page.{/ts}</a></p>
</div>
</div> {* end crm-container div *}
{literal}
<script language="JavaScript">
function toggle( element ) {
var parent = element.parentNode;
var className = parent.className;
if ( className == 'crm-accordion-wrapper collapsed crm-fatal-error-details-block') {
parent.className = 'crm-accordion-wrapper crm-fatal-error-details-block';
} else {
parent.className = 'crm-accordion-wrapper collapsed crm-fatal-error-details-block';
}
}
</script>
{/literal}
{if $config->userFramework != 'Joomla' and $config->userFramework != 'WordPress'}
</body>
</html>
{/if}

View file

@ -0,0 +1,46 @@
{*
+--------------------------------------------------------------------+
| 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 call_user_func(array('CRM_Core_Permission','check'), 'access CiviCRM')}
{include file="CRM/common/accesskeys.tpl"}
{if !empty($contactId)}
{include file="CRM/common/contactFooter.tpl"}
{/if}
<div class="crm-footer" id="civicrm-footer">
{crmVersion assign=version}
{ts}Powered by CiviCRM{/ts} <a href="https://github.com/civicrm/civicrm-core/blob/{$version}/release-notes/{$version}.md">{$version}</a>.
{if !empty($footer_status_severity)}
<span class="status{if $footer_status_severity gt 3} crm-error{elseif $footer_status_severity gt 2} crm-warning{else} crm-ok{/if}">
<a href="{crmURL p='civicrm/a/#/status'}">{$footer_status_message}</a>
</span>
{/if}
{ts 1='http://www.gnu.org/licenses/agpl-3.0.html'}CiviCRM is openly available under the <a href='%1'>GNU AGPL License</a>.{/ts}<br/>
<a href="https://civicrm.org/download">{ts}Download CiviCRM.{/ts}</a> &nbsp; &nbsp;
<a href="http://issues.civicrm.org/jira/browse/CRM?report=com.atlassian.jira.plugin.system.project:roadmap-panel">{ts}View issues and report bugs.{/ts}</a> &nbsp; &nbsp;
{docURL page="" text="Online documentation."}
</div>
{include file="CRM/common/notifications.tpl"}
{/if}

View file

@ -0,0 +1,54 @@
{*
+--------------------------------------------------------------------+
| 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 |
+--------------------------------------------------------------------+
*}
{* Loops through $form.buttons.html array and assigns separate spans with classes to allow theming
by button and name. crmBtnType grabs type keyword from button name (e.g. 'upload', 'next', 'back', 'cancel') so
types of buttons can be styled differently via css. *}
{crmRegion name='form-buttons'}
{foreach from=$form.buttons item=button key=key name=btns}
{if $key|substring:0:4 EQ '_qf_'}
{if $location}
{assign var='html' value=$form.buttons.$key.html|crmReplace:id:"$key-$location"}
{else}
{assign var='html' value=$form.buttons.$key.html}
{/if}
{crmGetAttribute html=$html attr='crm-icon' assign='icon'}
{capture assign=iconPrefix}{$icon|truncate:3:"":true}{/capture}
{if $icon && $iconPrefix eq 'fa-'}
{assign var='buttonClass' value=' crm-i-button'}
{capture assign=iconDisp}<i class="crm-i {$icon}"></i>{/capture}
{elseif $icon}
{assign var='buttonClass' value=' crm-icon-button'}
{capture assign=iconDisp}<span class="crm-button-icon ui-icon-{$icon}"> </span>{/capture}
{/if}
{crmGetAttribute html=$html attr='disabled' assign='disabled'}
<span class="crm-button crm-button-type-{$key|crmBtnType} crm-button{$key}{$buttonClass}{if $disabled} crm-button-disabled{/if}"{if $buttonStyle} style="{$buttonStyle}"{/if}>
{$iconDisp}
{$html}
</span>
{/if}
{/foreach}
{/crmRegion}

View file

@ -0,0 +1,47 @@
{*
+--------------------------------------------------------------------+
| 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 |
+--------------------------------------------------------------------+
*}
{* Highlight the required field during import (included within a <script>)*}
{literal}
CRM.$(function($) {
var highlightedFields = ["{/literal}{'","'|implode:$highlightedFields}{literal}"];
$.each(highlightedFields, function() {
$('select[id^="mapper"][id$="_0"] option[value='+ this + ']').append(' *').css({"color":"#FF0000"});
});
{/literal}{if $relationship}{literal}
var highlightedRelFields = {/literal}{$highlightedRelFields|@json_encode}{literal};
function highlight() {
var select, fields = highlightedRelFields[$(this).val()];
if (fields) {
select = $(this).next();
$.each(fields, function() {
$('option[value='+ this + ']', select).append(' *').css({"color":"#FF0000"});
});
}
}
$('select[id^="mapper"][id$="_0"]').each(highlight).click(highlight);
{/literal}{/if}{literal}
});
{/literal}

View file

@ -0,0 +1,33 @@
{*
+--------------------------------------------------------------------+
| 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 |
+--------------------------------------------------------------------+
*}
{* Handles display of passed $infoMessage. *}
{if $infoMessage}
<div class="messages status {$infoType}"{if $infoOptions} data-options='{$infoOptions}'{/if}>
<div class="icon inform-icon"></div>
<span class="msg-title">{$infoTitle}</span>
<span class="msg-text">{$infoMessage}</span>
</div>
{/if}

View file

@ -0,0 +1,133 @@
{*
+--------------------------------------------------------------------+
| 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 $batchUpdate}
{assign var='elementId' value=$form.field.$elementIndex.$elementName.id}
{assign var="tElement" value=$elementName|cat:"_time"}
{assign var="timeElement" value=field_`$elementIndex`_`$elementName`_time}
{$form.field.$elementIndex.$elementName.html}
{elseif $elementIndex}
{assign var='elementId' value=$form.$elementName.$elementIndex.id}
{assign var="timeElement" value=$elementName|cat:"_time.$elementIndex"}
{$form.$elementName.$elementIndex.html}
{elseif $blockId and $blockSection}
{assign var='elementId' value=$form.$blockSection.$blockId.$elementName.id}
{assign var="tElement" value=`$elementName`_time}
{$form.$blockSection.$blockId.$elementName.html}
{assign var="timeElement" value=`$blockSection`_`$blockId`_`$elementName`_time}
{if $tElement}
&nbsp;&nbsp;{$form.$blockSection.$blockId.$tElement.label}
&nbsp;&nbsp;{$form.$blockSection.$blockId.$tElement.html|crmAddClass:six}
{/if}
{else}
{if !$elementId}
{assign var='elementId' value=$form.$elementName.id}
{/if}
{assign var="timeElement" value=$elementName|cat:'_time'}
{$form.$elementName.html}
{/if}
{* CRM-15804 - CiviEvent Date Picker broken in modal dialog *}
{assign var='displayDate' value=$elementId|cat:"_display"|cat:"_$string"|uniqid}
{if $action neq 1028}
<input type="text" name="{$displayDate}" id="{$displayDate}" class="dateplugin" autocomplete="off"/>
{/if}
{if $batchUpdate AND $timeElement AND $tElement}
&nbsp;&nbsp;{$form.field.$elementIndex.$tElement.label}&nbsp;&nbsp;{$form.field.$elementIndex.$tElement.html|crmAddClass:six}
{elseif $timeElement AND !$tElement}
{if $form.$timeElement.label}
&nbsp;&nbsp;{$form.$timeElement.label}&nbsp;&nbsp;
{/if}
{$form.$timeElement.html|crmAddClass:six}
{/if}
{if $action neq 1028}
<a href="#" class="crm-hover-button crm-clear-link" title="{ts}Clear{/ts}"><i class="crm-i fa-times"></i></a>
{/if}
<script type="text/javascript">
{literal}
CRM.$(function($) {
{/literal}
// Workaround for possible duplicate ids in the dom - select by name instead of id and exclude already initialized widgets
var $dateElement = $('input[name={$displayDate}].dateplugin:not(.hasDatepicker)');
{literal}
if (!$dateElement.length) {
return;
}
{/literal}
{if $timeElement}
var $timeElement = $dateElement.siblings("#{$timeElement}");
var time_format = $timeElement.attr('timeFormat');
{literal}
$timeElement.timeEntry({ show24Hours : time_format, spinnerImage: '' });
{/literal}
{else}
var $timeElement = $();
{/if}
var currentYear = new Date().getFullYear(),
$originalElement = $dateElement.siblings('#{$elementId}').hide(),
date_format = $originalElement.attr('format'),
altDateFormat = 'mm/dd/yy';
{literal}
if ( !( ( date_format == 'M yy' ) || ( date_format == 'yy' ) || ( date_format == 'yy-mm' ) ) ) {
$dateElement.addClass( 'dpDate' );
}
var yearRange = (currentYear - parseInt($originalElement.attr('startOffset'))) +
':' + currentYear + parseInt($originalElement.attr('endOffset')),
startRangeYr = currentYear - parseInt($originalElement.attr('startOffset')),
endRangeYr = currentYear + parseInt($originalElement.attr('endOffset'));
$dateElement.datepicker({
closeAtTop: true,
dateFormat: date_format,
changeMonth: (date_format.indexOf('m') > -1),
changeYear: (date_format.indexOf('y') > -1),
altField: $originalElement,
altFormat: altDateFormat,
yearRange: yearRange,
minDate: new Date(startRangeYr, 1 - 1, 1),
maxDate: new Date(endRangeYr, 12 - 1, 31)
});
// format display date
var displayDateValue = $.datepicker.formatDate(date_format, $.datepicker.parseDate(altDateFormat, $originalElement.val()));
//support unsaved-changes warning: CRM-14353
$dateElement.val(displayDateValue).data('crm-initial-value', displayDateValue);
// Add clear button
$($timeElement).add($originalElement).add($dateElement).on('blur change', function() {
var vis = $dateElement.val() || $timeElement.val() ? '' : 'hidden';
$dateElement.siblings('.crm-clear-link').css('visibility', vis);
});
$originalElement.change();
});
{/literal}
</script>

View file

@ -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 |
+--------------------------------------------------------------------+
*}
{if $config->debug}
{include file="CRM/common/debug.tpl"}
{/if}
<div id="crm-container" class="crm-container{if $urlIsPublic} crm-public{/if}" lang="{$config->lcMessages|truncate:2:"":true}" xml:lang="{$config->lcMessages|truncate:2:"":true}">
{* Joomla-only container to hold the civicrm menu *}
<div id="crm-nav-menu-container"></div>
{crmNavigationMenu is_default=1}
<table border="0" cellpadding="0" cellspacing="0" id="crm-content">
<tr>
{if $sidebarLeft}
<td id="sidebar-left" valign="top">
<div id="civi-sidebar-logo" style="margin: 0 0 .25em .25em"><img src="{$config->resourceBase}i/logo_words_small.png" title="{ts}CiviCRM{/ts}"/></div><div class="spacer"></div>
{$sidebarLeft}
</td>
{/if}
<td id="content-right" valign="top">
{if $breadcrumb}
<div class="breadcrumb">
{foreach from=$breadcrumb item=crumb key=key}
{if $key != 0}
&raquo;
{/if}
<a href="{$crumb.url}">{$crumb.title}</a>
{/foreach}
</div>
{/if}
{if $browserPrint}
{* Javascript window.print link. Used for public pages where we can't do printer-friendly view. *}
<div id="printer-friendly"><a href="#" onclick="window.print(); return false;" title="{ts}Print this page.{/ts}"><i class="crm-i fa-print"></i></a></div>
{else}
{* Printer friendly link/icon. *}
<div id="printer-friendly"><a href="{$printerFriendly}" target='_blank' title="{ts}Printer-friendly view of this page.{/ts}"><i class="crm-i fa-print"></i></a></div>
{/if}
{if $pageTitle}
<div class="crm-title">
<h1 class="title">{if $isDeleted}<del>{/if}{$pageTitle}{if $isDeleted}</del>{/if}</h1>
</div>
{/if}
{crmRegion name='page-header'}
{/crmRegion}
{*{include file="CRM/common/langSwitch.tpl"}*}
<div class="clear"></div>
{if $localTasks}
{include file="CRM/common/localNav.tpl"}
{/if}
<div id="crm-main-content-wrapper">
{include file="CRM/common/status.tpl"}
{crmRegion name='page-body'}
{if isset($isForm) and $isForm and isset($formTpl)}
{include file="CRM/Form/$formTpl.tpl"}
{else}
{include file=$tplFile}
{/if}
{/crmRegion}
</div>
{crmRegion name='page-footer'}
{if $urlIsPublic}
{include file="CRM/common/publicFooter.tpl"}
{else}
{include file="CRM/common/footer.tpl"}
{/if}
{/crmRegion}
</td>
</tr>
</table>
</div> {* end crm-container div *}

View file

@ -0,0 +1,187 @@
{*
+--------------------------------------------------------------------+
| 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 |
+--------------------------------------------------------------------+
*}
{literal}
<script type="text/javascript">
CRM.$(function($) {
function getElementClass(element) {
return $(element).attr('class') || '';
}
// fetch the occurrence of element
function getRowId(row, str) {
var optionId;
$.each(row, function(i, n) {
if (str === $(n).attr('class')) {
optionId = i;
}
});
return optionId;
}
// for date sorting see http://wiki.civicrm.org/confluence/display/CRMDOC/Sorting+Date+Fields+in+dataTables+Widget
var useAjax = {/literal}{if $useAjax}1{else}0{/if}{literal},
sourceUrl = '',
useClass = 'display',
tcount = 1,
tableId = [];
if ( useAjax ) {
{/literal}{if isset($sourceUrl)}sourceUrl = "{$sourceUrl}";{/if}{literal}
useClass = 'pagerDisplay';
tcount = 5;
}
CRM.dataTableCount = CRM.dataTableCount || 1;
// FIXME: Rewriting DOM ids is probably a bad idea, and could be avoided
$('table.' + useClass).not('.dataTable').each(function() {
$(this).attr('id','option' + tcount + CRM.dataTableCount);
tableId.push(CRM.dataTableCount);
CRM.dataTableCount++;
});
$.each(tableId, function(i,n){
var tabId = '#option' + tcount + n;
//get the object of first tr data row.
var tdObject = $(tabId + ' tr:nth(1) td');
var id = -1; var count = 0; var columns=''; var sortColumn = '';
//build columns array for sorting or not sorting
$(tabId + ' th').each( function( ) {
var option = $(this).prop('id').split("_");
option = ( option.length > 1 ) ? option[1] : option[0];
var stype = 'numeric';
switch( option ) {
case 'sortable':
sortColumn += '[' + count + ', "asc" ],';
columns += '{"sClass": "'+ getElementClass( this ) +'"},';
break;
case 'date':
stype = 'date';
case 'order':
if ( $(this).attr('class') == 'sortable' ){
sortColumn += '[' + count + ', "asc" ],';
}
var sortId = getRowId(tdObject, $(this).attr('id') +' hiddenElement' );
columns += '{ "render": function ( data, type, row ) { return "<div style=\'display:none\'>"+ data +"</div>" + row[sortId] ; }, "targets": sortColumn,"bUseRendered": false},';
break;
case 'nosort':
columns += '{ "bSortable": false, "sClass": "'+ getElementClass( this ) +'"},';
break;
case 'currency':
columns += '{ "sType": "currency" },';
break;
case 'link':
columns += '{"sType": "html"},';
break;
default:
if ( $(this).text() ) {
columns += '{"sClass": "'+ getElementClass( this ) +'"},';
} else {
columns += '{ "bSortable": false },';
}
break;
}
count++;
});
// Fixme: this could be done without eval
columns = columns.substring(0, columns.length - 1 );
sortColumn = sortColumn.substring(0, sortColumn.length - 1 );
eval('sortColumn =[' + sortColumn + ']');
eval('columns =[' + columns + ']');
var noRecordFoundMsg = {/literal}'{ts escape="js"}None found.{/ts}'{literal};
var oTable;
if ( useAjax ) {
oTable = $(tabId).dataTable({
"iDisplayLength": 25,
"bFilter": false,
"bAutoWidth": false,
"aaSorting": sortColumn,
"aoColumns": columns,
"bProcessing": true,
"bJQueryUI": true,
"asStripClasses": [ "odd-row", "even-row" ],
"sPaginationType": "full_numbers",
"sDom": '<"crm-datatable-pager-top"lfp>rt<"crm-datatable-pager-bottom"ip>',
"bServerSide": true,
"sAjaxSource": sourceUrl,
"oLanguage":{
"sEmptyTable": noRecordFoundMsg,
"sZeroRecords": noRecordFoundMsg
},
"fnServerData": function ( sSource, aoData, fnCallback ) {
$.ajax( {
"dataType": 'json',
"type": "POST",
"url": sSource,
"data": aoData,
"success": fnCallback
});
}
});
} else {
oTable = $(tabId).dataTable({
"aaSorting": sortColumn,
"bPaginate": false,
"bLengthChange": true,
"bFilter": false,
"bInfo": false,
"asStripClasses": [ "odd-row", "even-row" ],
"bAutoWidth": false,
"aoColumns": columns,
"bSort": true,
"sDom": 'ti',
"oLanguage":{
"sEmptyTable": noRecordFoundMsg,
"sZeroRecords": noRecordFoundMsg
}
});
}
});
});
//plugin to sort on currency
cj.fn.dataTableExt.oSort['currency-asc'] = function(a,b) {
var symbol = "{/literal}{$config->defaultCurrencySymbol()}{literal}";
var x = (a == "-") ? 0 : a.replace( symbol, "" );
var y = (b == "-") ? 0 : b.replace( symbol, "" );
x = parseFloat( x );
y = parseFloat( y );
return ((x < y) ? -1 : ((x > y) ? 1 : 0));
};
cj.fn.dataTableExt.oSort['currency-desc'] = function(a,b) {
var symbol = "{/literal}{$config->defaultCurrencySymbol()}{literal}";
var x = (a == "-") ? 0 : a.replace( symbol, "" );
var y = (b == "-") ? 0 : b.replace( symbol, "" );
x = parseFloat( x );
y = parseFloat( y );
return ((x < y) ? 1 : ((x > y) ? -1 : 0));
};
</script>
{/literal}

View file

@ -0,0 +1,128 @@
{*
+--------------------------------------------------------------------+
| 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 |
+--------------------------------------------------------------------+
*}// http://civicrm.org/licensing
// <script> Generated {$smarty.now|date_format:'%d %b %Y %H:%M:%S'}
{* This file should only contain strings and settings which rarely change *}
(function($) {ldelim}
// Config settings
CRM.config.userFramework = {$config->userFramework|@json_encode};
CRM.config.resourceBase = {$config->userFrameworkResourceURL|@json_encode};
CRM.config.lcMessages = {$config->lcMessages|@json_encode};
$.datepicker._defaults.dateFormat = CRM.config.dateInputFormat = {$config->dateInputFormat|@json_encode};
CRM.config.timeIs24Hr = {if $config->timeInputFormat eq 2}true{else}false{/if};
CRM.config.ajaxPopupsEnabled = {$ajaxPopupsEnabled|@json_encode};
// Merge entityRef settings
CRM.config.entityRef = $.extend({ldelim}{rdelim}, {$entityRef|@json_encode}, CRM.config.entityRef || {ldelim}{rdelim});
// Initialize CRM.url and CRM.formatMoney
CRM.url({ldelim}back: '{crmURL p="*path*" q="*query*" h=0 fb=1}', front: '{crmURL p="*path*" q="*query*" h=0 fe=1}'{rdelim});
CRM.formatMoney('init', false, {$moneyFormat});
// Localize select2
$.fn.select2.defaults.formatNoMatches = "{ts escape='js'}None found.{/ts}";
$.fn.select2.defaults.formatLoadMore = "{ts escape='js'}Loading...{/ts}";
$.fn.select2.defaults.formatSearching = "{ts escape='js'}Searching...{/ts}";
$.fn.select2.defaults.formatInputTooShort = function() {ldelim}
return ($(this).data('api-entity') === 'contact' || $(this).data('api-entity') === 'Contact') ? {$contactSearch} : {$otherSearch};
{rdelim};
// Localize jQuery UI
$.ui.dialog.prototype.options.closeText = "{ts escape='js'}Close{/ts}";
// Localize jQuery DataTables
// Note the first two defaults set here aren't localization related,
// but need to be set globally for all DataTables.
$.extend( $.fn.dataTable.defaults, {ldelim}
"searching": false,
"jQueryUI": true,
"language": {ldelim}
"emptyTable": "{ts escape='js'}None found.{/ts}",
"info": "{ts escape='js' 1=_START_ 2=_END_ 3=_TOTAL_}Showing %1 to %2 of %3 entries{/ts}",
"infoEmpty": "{ts escape='js'}Showing 0 to 0 of 0 entries{/ts}",
"infoFiltered": "{ts escape='js' 1=_MAX_}(filtered from %1 total entries){/ts}",
"infoPostFix": "",
"thousands": {$config->monetaryThousandSeparator|json_encode},
"lengthMenu": "{ts escape='js' 1=_MENU_}Show %1 entries{/ts}",
"loadingRecords": " ",
"processing": " ",
"zeroRecords": "{ts escape='js'}None found.{/ts}",
"paginate": {ldelim}
"first": "{ts escape='js'}First{/ts}",
"last": "{ts escape='js'}Last{/ts}",
"next": "{ts escape='js'}Next{/ts}",
"previous": "{ts escape='js'}Previous{/ts}"
{rdelim}
{rdelim}
{rdelim});
// Localize strings for jQuery.validate
var messages = {ldelim}
required: "{ts escape='js'}This field is required.{/ts}",
remote: "{ts escape='js'}Please fix this field.{/ts}",
email: "{ts escape='js'}Please enter a valid email address.{/ts}",
url: "{ts escape='js'}Please enter a valid URL.{/ts}",
date: "{ts escape='js'}Please enter a valid date.{/ts}",
dateISO: "{ts escape='js'}Please enter a valid date (YYYY-MM-DD).{/ts}",
number: "{ts escape='js'}Please enter a valid number.{/ts}",
digits: "{ts escape='js'}Please enter only digits.{/ts}",
creditcard: "{ts escape='js'}Please enter a valid credit card number.{/ts}",
equalTo: "{ts escape='js'}Please enter the same value again.{/ts}",
accept: "{ts escape='js'}Please enter a value with a valid extension.{/ts}",
maxlength: $.validator.format("{ts escape='js'}Please enter no more than {ldelim}0{rdelim} characters.{/ts}"),
minlength: $.validator.format("{ts escape='js'}Please enter at least {ldelim}0{rdelim} characters.{/ts}"),
rangelength: $.validator.format("{ts escape='js'}Please enter a value between {ldelim}0{rdelim} and {ldelim}1{rdelim} characters long.{/ts}"),
range: $.validator.format("{ts escape='js'}Please enter a value between {ldelim}0{rdelim} and {ldelim}1{rdelim}.{/ts}"),
max: $.validator.format("{ts escape='js'}Please enter a value less than or equal to {ldelim}0{rdelim}.{/ts}"),
min: $.validator.format("{ts escape='js'}Please enter a value greater than or equal to {ldelim}0{rdelim}.{/ts}")
};
$.extend($.validator.messages, messages);
{literal}
var params = {
errorClass: 'crm-inline-error',
messages: {},
// TODO: remove after resolution of https://github.com/jzaefferer/jquery-validation/pull/1261
ignore: ":hidden, [readonly]"
};
// use civicrm notifications when there are errors
params.invalidHandler = function(form, validator) {
if ($('#crm-notification-container').length) {
$.each(validator.errorList, function(k, error) {
$(error.element).crmError(error.message);
});
} else {
alert({/literal}"{ts escape='js'}Please review and correct the highlighted fields before continuing.{/ts}"{literal});
}
};
CRM.validate = {
_defaults: params,
params: {},
functions: []
};
})(jQuery);
{/literal}

View file

@ -0,0 +1,34 @@
{*
+--------------------------------------------------------------------+
| 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 |
+--------------------------------------------------------------------+
*}
{* Displays local tasks (secondary menu) for any pages that have them *}
<div class="tabs">
<ul class="tabs primary">
{foreach from=$localTasks item=task}
<li {if $task.class}class="{$task.class}"{/if}><a href="{$task.url}" {if $task.class}class="{$task.class}"{/if}>{$task.title}</a></li>
{/foreach}
</ul>
</div>
<br class="clear" />

View file

@ -0,0 +1,53 @@
{*
+--------------------------------------------------------------------+
| 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 |
+--------------------------------------------------------------------+
*}
{*
Usage: CRM_Core_Region::instance('...')->add(array(
'template' => 'CRM/common/LogButton.tpl',
'instance_id' => CRM_Report_Utils_Report::getInstanceIDForValue('logging/contact/summary'),
'css_class' => 'hrqual-revision-link',
'table_name' => 'my_table',
'contact_id' => 123,
));
Note: This file is used by CivHR
*}
<a class="css_right {$snippet.css_class}" href="#" title="{ts}View Revisions{/ts}">View Revisions</a>
{literal}
<script type="text/javascript">
(function($, CRM) {
if ($(".{/literal}{$snippet.css_class}{literal}").length) {
$(".{/literal}{$snippet.css_class}{literal}").crmRevisionLink({
contactId: {/literal}{$snippet.contact_id}{literal},
tableName: "{/literal}{$snippet.table_name}{literal}",
reportId: {/literal}{$snippet.instance_id}{literal}
});
}
})(cj, CRM);
</script>
{/literal}

View file

@ -0,0 +1,214 @@
{*
+--------------------------------------------------------------------+
| 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 |
+--------------------------------------------------------------------+
*}// http://civicrm.org/licensing
{capture assign=menuMarkup}{strip}
<ul id="civicrm-menu">
<li id="crm-qsearch" class="menumain">
<form action="{crmURL p='civicrm/contact/search/advanced' h=0 }" name="search_block" id="id_search_block" method="post">
<div id="quickSearch">
<input type="text" class="form-text" id="sort_name_navigation" placeholder="{ts}Contacts{/ts}" name="sort_name" style="width: 6em;" />
<input type="text" id="sort_contact_id" style="display: none" />
<input type="hidden" name="hidden_location" value="1" />
<input type="hidden" name="qfKey" value="" />
<div style="height:1px; overflow:hidden;"><input type="submit" value="{ts}Go{/ts}" name="_qf_Advanced_refresh" class="crm-form-submit default" /></div>
</div>
</form>
<ul>
<li><label class="crm-quickSearchField"><input type="radio" data-tablename="cc" checked="checked" value="" name="quickSearchField"> {if $includeEmail}{ts}Name/Email{/ts}{else}{ts}Name{/ts}{/if}</label></li>
<li><label class="crm-quickSearchField"><input type="radio" data-tablename="cc" value="contact_id" name="quickSearchField"> {ts}Contact ID{/ts}</label></li>
<li><label class="crm-quickSearchField"><input type="radio" data-tablename="cc" value="external_identifier" name="quickSearchField"> {ts}External ID{/ts}</label></li>
<li><label class="crm-quickSearchField"><input type="radio" data-tablename="cc" value="first_name" name="quickSearchField"> {ts}First Name{/ts}</label></li>
<li><label class="crm-quickSearchField"><input type="radio" data-tablename="cc" value="last_name" name="quickSearchField"> {ts}Last Name{/ts}</label></li>
<li><label class="crm-quickSearchField"><input type="radio" data-tablename="eml" value="email" name="quickSearchField"> {ts}Email{/ts}</label></li>
<li><label class="crm-quickSearchField"><input type="radio" data-tablename="phe" value="phone_numeric" name="quickSearchField"> {ts}Phone{/ts}</label></li>
<li><label class="crm-quickSearchField"><input type="radio" data-tablename="sts" value="street_address" name="quickSearchField"> {ts}Street Address{/ts}</label></li>
<li><label class="crm-quickSearchField"><input type="radio" data-tablename="sts" value="city" name="quickSearchField"> {ts}City{/ts}</label></li>
<li><label class="crm-quickSearchField"><input type="radio" data-tablename="sts" value="postal_code" name="quickSearchField"> {ts}Postal Code{/ts}</label></li>
<li><label class="crm-quickSearchField"><input type="radio" data-tablename="cc" value="job_title" name="quickSearchField"> {ts}Job Title{/ts}</label></li>
</ul>
</li>
{$navigation}
</ul>
{/strip}{/capture}// <script> Generated {$smarty.now|date_format:'%d %b %Y %H:%M:%S'}
{literal}
(function($) {
var menuMarkup = {/literal}{$menuMarkup|@json_encode};
{if $config->userFramework neq 'Joomla'}{literal}
$('body').append(menuMarkup);
$('#civicrm-menu').css({position: "fixed", top: "0px"});
//Track Scrolling
$(window).scroll(function () {
$('div.sticky-header').css({top: "23px", position: "fixed"});
});
if ($('#edit-shortcuts').length > 0) {
$('#civicrm-menu').css({'width': '97%'});
}
{/literal}{else}{* Special menu hacks for Joomla *}{literal}
// below div is present in older version of joomla 2.5.x
var elementExists = $('div#toolbar-box div.m').length;
if (elementExists > 0) {
$('div#toolbar-box div.m').html(menuMarkup);
}
else {
$("#crm-nav-menu-container").html(menuMarkup).css({'padding-bottom': '10px'});
}
{/literal}{/if}{literal}
// CRM-15493 get the current qfKey
$("input[name=qfKey]", "#quickSearch").val($('#civicrm-navigation-menu').data('qfkey'));
$('#civicrm-menu').ready(function() {
$('#root-menu-div .outerbox').css({'margin-top': '6px'});
$('#root-menu-div .menu-ul li').css({'padding-bottom': '2px', 'margin-top': '2px'});
$('img.menu-item-arrow').css({top: '4px'});
$("#civicrm-menu >li").each(function(i){
$(this).attr("tabIndex",i+2);
});
$('#sort_name_navigation')
.autocomplete({
source: function(request, response) {
//start spinning the civi logo
$('.crm-logo-sm').addClass('crm-i fa-spin');
var
option = $('input[name=quickSearchField]:checked'),
params = {
name: request.term,
field_name: option.val(),
table_name: option.attr("data-tablename")
};
CRM.api3('contact', 'getquick', params).done(function(result) {
var ret = [];
if (result.values.length > 0) {
$('#sort_name_navigation').autocomplete('widget').menu('option', 'disabled', false);
$.each(result.values, function(k, v) {
ret.push({value: v.id, label: v.data});
});
} else {
$('#sort_name_navigation').autocomplete('widget').menu('option', 'disabled', true);
var label = option.closest('label').text();
var msg = ts('{/literal}{ts escape='js' 1='%1'}%1 not found.{/ts}'{literal}, {1: label});
// Remind user they are not searching by contact name (unless they enter a number)
if (params.field_name && !(/[\d].*/.test(params.name))) {
msg += {/literal}' {ts escape='js'}Did you mean to search by Name/Email instead?{/ts}'{literal};
}
ret.push({value: '0', label: msg});
}
response(ret);
//stop spinning the civi logo
$('.crm-logo-sm').removeClass('crm-i fa-spin');
})
},
focus: function (event, ui) {
return false;
},
select: function (event, ui) {
if (ui.item.value > 0) {
document.location = CRM.url('civicrm/contact/view', {reset: 1, cid: ui.item.value});
}
return false;
},
create: function() {
// Place menu in front
$(this).autocomplete('widget')
.addClass('crm-quickSearch-results')
.css('z-index', $('#civicrm-menu').css('z-index'));
}
})
.keydown(function() {
$.Menu.closeAll();
})
.on('focus', function() {
setQuickSearchValue();
if ($(this).attr('style').indexOf('14em') < 0) {
$(this).animate({width: '14em'});
}
})
.on('blur', function() {
// Shrink if no input and menu is not open
if (!$(this).val().length && $(this).attr('style').indexOf('6em') < 0 && !$('.crm-quickSearchField:visible', '#root-menu-div').length) {
$(this).animate({width: '6em'});
}
});
$('.crm-hidemenu').click(function(e) {
$('#civicrm-menu').slideUp();
if ($('#crm-notification-container').length) {
var alert = CRM.alert({/literal}'<a href="#" id="crm-restore-menu" style="text-align: center; margin-top: -8px;">{ts escape='js'}Restore CiviCRM Menu{/ts}</a>'{literal}, '', 'none', {expires: 10000});
$('#crm-restore-menu')
.button({icons: {primary: 'fa-undo'}})
.click(function(e) {
e.preventDefault();
alert.close();
$('#civicrm-menu').slideDown();
})
.parent().css('text-align', 'center').find('.ui-button-text').css({'padding-top': '4px', 'padding-bottom': '4px'})
;
}
e.preventDefault();
});
function setQuickSearchValue() {
var $selection = $('.crm-quickSearchField input:checked'),
label = $selection.parent().text(),
value = $selection.val();
// These fields are not supported by advanced search
if (!value || value === 'first_name' || value === 'last_name') {
value = 'sort_name';
}
$('#sort_name_navigation').attr({name: value, placeholder: label});
}
$('.crm-quickSearchField').click(function() {
setQuickSearchValue();
$('#sort_name_navigation').focus();
});
// Set & retrieve default value
if (window.localStorage) {
$('.crm-quickSearchField').click(function() {
localStorage.quickSearchField = $('input', this).val();
});
if (localStorage.quickSearchField) {
$('.crm-quickSearchField input[value=' + localStorage.quickSearchField + ']').prop('checked', true);
}
}
// redirect to view page if there is only one contact
$('#id_search_block').on('submit', function() {
var $menu = $('#sort_name_navigation').autocomplete('widget');
if ($('li.ui-menu-item', $menu).length === 1) {
var cid = $('li.ui-menu-item', $menu).data('ui-autocomplete-item').value;
if (cid > 0) {
document.location = CRM.url('civicrm/contact/view', {reset: 1, cid: cid});
return false;
}
}
});
// Close menu after selecting an item
$('#root-menu-div').on('click', 'a', $.Menu.closeAll);
});
$('#civicrm-menu').menuBar({arrowSrc: CRM.config.resourceBase + 'packages/jquery/css/images/arrow.png'});
$(window).on("beforeunload", function() {
$('.crm-logo-sm', '#civicrm-menu').addClass('crm-i fa-spin');
});
})(CRM.$);{/literal}

View file

@ -0,0 +1,8 @@
<div id="crm-notification-container" style="display:none">
<div id="crm-notification-alert" class="#{ldelim}type{rdelim}">
<div class="icon ui-notify-close" title="{ts}close{/ts}"> </div>
<a class="ui-notify-cross ui-notify-close" href="#" title="{ts}close{/ts}">x</a>
<h1>#{ldelim}title{rdelim}</h1>
<div class="notify-content">#{ldelim}text{rdelim}</div>
</div>
</div>

View file

@ -0,0 +1,62 @@
{*
+--------------------------------------------------------------------+
| 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 |
+--------------------------------------------------------------------+
*}
<script type="text/javascript" src="{$config->resourceBase}packages/OpenFlashChart/js/json/openflashchart.packed.js"></script>
<script type="text/javascript" src="{$config->resourceBase}packages/OpenFlashChart/js/swfobject.js"></script>
{literal}
<script type="text/javascript">
function createSWFObject( chartID, divName, xSize, ySize, loadDataFunction ) {
var flashFilePath = {/literal}"{$config->resourceBase}packages/OpenFlashChart/open-flash-chart.swf"{literal};
//create object.
swfobject.embedSWF( flashFilePath, divName,
xSize, ySize, "9.0.0",
"expressInstall.swf",
{"get-data":loadDataFunction, "id":chartID},
null,
{"wmode": 'transparent'}
);
}
OFC = {};
OFC.jquery = {
name: "jQuery",
image: function(src) { return "<img src='data:image/png;base64," + $('#'+src)[0].get_img_binary() + "' />"},
popup: function(src) {
var img_win = window.open('', 'Save Chart as Image');
img_win.document.write('<html><head><title>Save Chart as Image<\/title><\/head><body>' + OFC.jquery.image(src) + ' <\/body><\/html>');
img_win.document.close();
}
}
function save_image( divName ) {
var divId = {/literal}"{$contriChart}"{literal} ? 'open_flash_chart_'+divName : {/literal}"{$divId}"{literal};
if( !divId ) {
divId = 'open_flash_'+divName;
}
OFC.jquery.popup( divId );
}
</script>
{/literal}

View file

@ -0,0 +1,140 @@
{*
+--------------------------------------------------------------------+
| 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 $pager and $pager->_response}
{if $pager->_response.numPages > 1}
<div class="crm-pager">
<span class="element-right">
{if $location eq 'top'}
{$pager->_response.titleTop}
{else}
{$pager->_response.titleBottom}
{/if}
</span>
</span>
<span class="crm-pager-nav">
{$pager->_response.first}&nbsp;
{$pager->_response.back}&nbsp;
{$pager->_response.next}&nbsp;
{$pager->_response.last}&nbsp;
{$pager->_response.status}
</span>
</div>
{/if}
{* Controller for 'Rows Per Page' *}
{if $location eq 'bottom' and $pager->_totalItems > 25}
<div class="form-item float-right">
<label for="{$form.formClass}-rows-per-page-select">{ts}Rows per page:{/ts}</label> &nbsp;
<input class="crm-rows-per-page-select" id="{$form.formClass}-rows-per-page-select" type="text" size="3" value="{$pager->_perPage}"/>
</div>
<div class="clear"></div>
{/if}
{if $location neq 'top'}
<script type="text/javascript">
{literal}
CRM.$(function($) {
{/literal}
var
$form = $({if empty($form.formClass)}'#crm-main-content-wrapper'{else}'form.{$form.formClass}'{/if}),
numPages = {$pager->_response.numPages},
currentPage = {$pager->_response.currentPage},
perPageCount = {$pager->_perPage},
currentLocation = {$pager->_response.currentLocation|json_encode},
spinning = null,
refreshing = false;
{literal}
function refresh(url) {
if (!refreshing) {
refreshing = true;
var options = url ? {url: url} : {};
$form.off('.crm-pager').closest('.crm-ajax-container, #crm-main-content-wrapper').crmSnippet(options).crmSnippet('refresh');
}
}
function page(num) {
num = parseInt(num, 10);
if (isNaN(num) || num < 1 || num > numPages || num === currentPage) {
return;
}
refresh(currentLocation.replace(/crmPID=\d+/, 'crmPID=' + num));
}
function changeCount(num) {
num = parseInt(num, 10);
if (isNaN(num) || num < 1 || num === perPageCount) {
return;
}
refresh(currentLocation.replace(/&crmRowCount=\d+/, '') + '&crmRowCount=' + num);
}
function preventSubmit(e) {
if (e.keyCode == 13) {
e.preventDefault();
$(this).trigger('change');
return false;
}
}
$('input[name^=crmPID]', $form)
.spinner({
min: 1,
max: numPages
})
.on('change', function() {
page($(this).spinner('value'));
})
.on('keyup keydown keypress', preventSubmit);
$('input.crm-rows-per-page-select', $form)
.spinner({
min: 25,
step: 25
})
.on('change', function() {
changeCount($(this).spinner('value'));
})
.on('keyup keydown keypress', preventSubmit);
$form
.on('click.crm-pager', 'a.ui-spinner-button', function(e) {
var $el = $(this);
// Update after a short delay to allow multiple clicks
spinning !== null && window.clearTimeout(spinning);
spinning = window.setTimeout(function() {
if ($el.is('.crm-pager a')) {
page($el.siblings('input[name^=crmPID]').spinner('value'));
} else {
changeCount($el.siblings('input.crm-rows-per-page-select').spinner('value'));
}
}, 200);
})
// Handle sorting, paging and alpha filtering links
.on('click.crm-pager', 'a.crm-pager-link, #alpha-filter a, th a.sorting, th a.sorting_desc, th a.sorting_asc', function(e) {
refresh($(this).attr('href'));
e.preventDefault();
});
});
{/literal}
</script>
{/if}
{/if}

View file

@ -0,0 +1,33 @@
{*
+--------------------------------------------------------------------+
| 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 |
+--------------------------------------------------------------------+
*}
{* Displays alphabetic filter bar for search results. If one more records in resultset starts w/ that letter, item is a link. *}
<div id="alpha-filter">
<ul>
{foreach from=$aToZ item=letter}
<li {if $letter.class}class="{$letter.class}"{/if}>{$letter.item}</li>
{/foreach}
</ul>
</div>

View file

@ -0,0 +1,148 @@
{*
+--------------------------------------------------------------------+
| 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 |
+--------------------------------------------------------------------+
*}
{literal}
<script type="text/javascript">
/**
* Show or hide payment options.
*
* @param bool $isHide
* Should the block be hidden.
*/
function showHidePayment(isHide) {
var payment_options = cj(".payment_options-group");
var payment_processor = cj("div.payment_processor-section");
var payment_information = cj("div#payment_information");
// I've added a hide for billing block. But, actually the issue
// might be that the unselecting of the processor should cause it
// to be hidden (or removed) in which case it can go from this function.
var billing_block = cj("div#billing-payment-block");
if (isHide) {
payment_options.hide();
payment_processor.hide();
payment_information.hide();
billing_block.hide();
// also unset selected payment methods
cj('input[name="payment_processor_id"]').removeProp('checked');
}
else {
payment_options.show();
payment_processor.show();
payment_information.show();
billing_block.show();
// also set selected payment methods
cj('input[name="payment_processor_id"][checked=checked]').prop('checked', true);
}
}
/**
* Hides or shows billing and payment options block depending on whether payment is required.
*
* In general incomplete orders or $0 orders do not require a payment block.
*/
function skipPaymentMethod() {
var isHide = false;
var isMultiple = '{/literal}{$event.is_multiple_registrations}{literal}';
var alwaysShowFlag = (isMultiple && cj("#additional_participants").val());
var alwaysHideFlag = (cj("#bypass_payment").val() == 1);
var total_amount_tmp = cj('#pricevalue').data('raw-total');
// Hide billing questions if this is free
if (!alwaysShowFlag && total_amount_tmp == 0){
isHide = true;
}
else {
isHide = false;
}
if (alwaysHideFlag) {
isHide = true;
}
showHidePayment(isHide);
}
skipPaymentMethod();
CRM.$(function($) {
function buildPaymentBlock(type) {
var $form = $('#billing-payment-block').closest('form');
{/literal}
{if $contributionPageID}
{capture assign='contributionPageID'}id={$contributionPageID}&{/capture}
{else}
{capture assign='pageID'}{/capture}
{/if}
{if $custom_pre_id}
{capture assign='preProfileID'}pre_profile_id={$custom_pre_id}&{/capture}
{else}
{capture assign='preProfileID'}{/capture}
{/if}
{if $urlPathVar}
{capture assign='urlPathVar'}{$urlPathVar}&{/capture}
{else}
{capture assign='urlPathVar'}{/capture}
{/if}
{if $billing_profile_id}
{capture assign='profilePathVar'}billing_profile_id={$billing_profile_id}&{/capture}
{else}
{capture assign='profilePathVar'}{/capture}
{/if}
{capture assign='isBackOfficePathVar'}&is_back_office={$isBackOffice}&{/capture}
var payment_instrument_id = $('#payment_instrument_id').val();
var dataUrl = "{crmURL p='civicrm/payment/form' h=0 q="&currency=`$currency`&`$urlPathVar``$isBackOfficePathVar``$profilePathVar``$contributionPageID``$preProfileID`processor_id="}" + type;
{literal}
if (typeof(CRM.vars) != "undefined") {
if (typeof(CRM.vars.coreForm) != "undefined") {
if (typeof(CRM.vars.coreForm.contact_id) != "undefined") {
dataUrl = dataUrl + "&cid=" + CRM.vars.coreForm.contact_id;
}
if (typeof(CRM.vars.coreForm.checksum) != "undefined" ) {
dataUrl = dataUrl + "&cs=" + CRM.vars.coreForm.checksum;
}
}
}
dataUrl = dataUrl + "&payment_instrument_id=" + payment_instrument_id;
// Processors like pp-express will hide the form submit buttons, so re-show them when switching
$('.crm-submit-buttons', $form).show().find('input').prop('disabled', true);
CRM.loadPage(dataUrl, {target: '#billing-payment-block'});
}
$('[name=payment_processor_id]').on('change.paymentBlock', function() {
buildPaymentBlock($(this).val());
});
$('#payment_instrument_id').on('change.paymentBlock', function() {
buildPaymentBlock(0);
});
$('#billing-payment-block').on('crmLoad', function() {
$('.crm-submit-buttons input').prop('disabled', false);
})
});
</script>
{/literal}

View file

@ -0,0 +1,62 @@
{*
+--------------------------------------------------------------------+
| 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 |
+--------------------------------------------------------------------+
*}
{* Print.tpl: wrapper for Print views. Provides complete HTML doc. Includes print media stylesheet.*}
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="{$config->lcMessages|truncate:2:"":true}" xml:lang="{$config->lcMessages|truncate:2:"":true}">
<head>
<title>{if $pageTitle}{$pageTitle|strip_tags}{else}{ts}Printer-Friendly View{/ts} | {ts}CiviCRM{/ts}{/if}</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
{crmRegion name='html-header' allowCmsOverride=0}{/crmRegion}
<style type="text/css" media="print">@import url({$config->resourceBase}css/print.css);</style>
</head>
<body>
{if $config->debug}
{include file="CRM/common/debug.tpl"}
{/if}
<div id="crm-container" class="crm-container" lang="{$config->lcMessages|truncate:2:"":true}" xml:lang="{$config->lcMessages|truncate:2:"":true}">
{crmRegion name='page-header' allowCmsOverride=0}{/crmRegion}
{* Check for Status message for the page (stored in session->getStatus). Status is cleared on retrieval. *}
{include file="CRM/common/status.tpl"}
{crmRegion name='page-body' allowCmsOverride=0}
{if $isForm and isset($formTpl)}
{include file="CRM/Form/$formTpl.tpl"}
{else}
{include file=$tplFile}
{/if}
{/crmRegion}
{crmRegion name='page-footer' allowCmsOverride=0}
<script type="text/javascript">
window.print();
</script>
{/crmRegion}
</div> {* end crm-container div *}
</body>
</html>

View file

@ -0,0 +1,32 @@
{*
+--------------------------------------------------------------------+
| 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 |
+--------------------------------------------------------------------+
*}
{* printBody.tpl: wrapper for Print views without HTML surrounds. *}
{if $isForm and isset($formTpl)}
{include file="CRM/Form/$formTpl.tpl"}
{else}
{include file=$tplFile}
{/if}

View file

@ -0,0 +1,32 @@
{*
+--------------------------------------------------------------------+
| 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 $config->empoweredBy}
{capture assign=civilogo}<a href="https://civicrm.org/" title="{ts}CiviCRM.org - Growing and Sustaining Relationships{/ts}" target="_blank" class="empowered-by-link"><div class="empowered-by-logo"><span>CiviCRM</span></div></a>{/capture}
<div class="crm-public-footer" id="civicrm-footer">
{ts 1=$civilogo}empowered by %1{/ts}
</div>
{/if}

View file

@ -0,0 +1,34 @@
{*
+--------------------------------------------------------------------+
| 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 |
+--------------------------------------------------------------------+
*}
{* Displays recently viewed objects (contacts and other objects like groups, notes, etc. *}
<div id="recently-viewed">
<ul>
<li>{ts}Recently Viewed:{/ts}</li>
{foreach from=$recentlyViewed item=item}
<li><a href="{$item.url}">{$item.icon}</a><a href="{$item.url}">{$item.title}</a></li>
{/foreach}
</ul>
</div>

View file

@ -0,0 +1,12 @@
<html>
<head>
<script type="text/javascript">
window.location.href = "{$redirectURL}"
</script>
<title>{$title}</title>
</head>
<body>
<h2>{$title}</h2>
<p>{$message}</p>
</body>
</html>

View file

@ -0,0 +1,78 @@
{*
+--------------------------------------------------------------------+
| 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 |
+--------------------------------------------------------------------+
*}
{* Form elements for displaying and running action tasks on search results for all component searches. *}
<div id="search-status">
<table class="form-layout-compressed">
<tr>
<td class="font-size12pt" style="width: 40%;">
{if $savedSearch.name}{$savedSearch.name} ({ts}smart group{/ts}) - {/if}
{ts count=$pager->_totalItems plural='%count Results'}%count Result{/ts}{if $selectorLabel}&nbsp;-&nbsp;{$selectorLabel}{/if}
{if $context == 'Event' && $participantCount && ( $pager->_totalItems ne $participantCount ) }
<br />{ts}Actual participant count{/ts} : {$participantCount} {help id="id-actual_participant_count" file="CRM/Event/Form/Search/Results.hlp"} &nbsp;
{/if}
</td>
<td>
{* Search criteria are passed to tpl in the $qill array *}
{if $qill}
{include file="CRM/common/displaySearchCriteria.tpl"}
{/if}
</td>
</tr>
{if $context == 'Contribution'}
<tr>
<td colspan="2">
{include file="CRM/Contribute/Page/ContributionTotals.tpl"}
</td>
</tr>
{/if}
<tr>
<td class="font-size11pt"> {ts}Select Records{/ts}:</td>
<td class="nowrap">
{$form.radio_ts.ts_all.html} <label for="{$ts_all_id}">{ts count=$pager->_totalItems plural='All %count records'}The found record{/ts}</label> &nbsp; {if $pager->_totalItems > 1} {$form.radio_ts.ts_sel.html} <label for="{$ts_sel_id}">{ts 1="<span></span>"}%1 Selected records only{/ts}</label>{/if}
</td>
</tr>
<tr>
<td colspan="2">
{* Note print buttons were mostly removed except for Campaign search - the following lines can be removed soon CRM-12872 *}
{if !empty($printButtonName)}
{$form.$printButtonName.html} &nbsp; &nbsp;
{elseif !empty($form._qf_Search_next_print)}
{$form._qf_Search_next_print.html} &nbsp; &nbsp;
{/if}
<span id='task-section'>
{$form.task.html}
{if $actionButtonName}
{$form.$actionButtonName.html} &nbsp; &nbsp;
{else}
{$form._qf_Search_next_action.html}
{/if}
</span>
</td>
</tr>
</table>
</div>

View file

@ -0,0 +1,32 @@
{*
+--------------------------------------------------------------------+
| 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 |
+--------------------------------------------------------------------+
*}
{* This included tpl hides and displays the appropriate blocks as directed by the php code which assigns showBlocks and hideBlocks arrays. *}
<script type="text/javascript">
var showBlocks = new Array({$showBlocks});
var hideBlocks = new Array({$hideBlocks});
on_load_init_blocks( showBlocks, hideBlocks{if $elemType EQ 'table-row'}, 'table-row'{/if} );
</script>

View file

@ -0,0 +1,38 @@
{*
+--------------------------------------------------------------------+
| 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 |
+--------------------------------------------------------------------+
*}
{* This included tpl hides and displays the appropriate blocks based on trigger values in specified field(s) *}
<script type="text/javascript">
var trigger_field_id = '{$trigger_field_id}';
var trigger_value = '{$trigger_value}';
var target_element_id = '{$target_element_id}';
var target_element_type = '{$target_element_type}';
var field_type = '{$field_type}';
var invert = {$invert};
showHideByValue(trigger_field_id, trigger_value, target_element_id, target_element_type, field_type, invert);
</script>

View file

@ -0,0 +1,68 @@
{*
+--------------------------------------------------------------------+
| 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 |
+--------------------------------------------------------------------+
*}{strip}
{if $config->debug}
{include file="CRM/common/debug.tpl"}
{/if}
{if $smarty.get.snippet eq 4}
{if $isForm}
{include file="CRM/Form/default.tpl"}
{else}
{include file=$tplFile}
{/if}
{else}
{if $smarty.get.snippet eq 2}
{include file="CRM/common/print.tpl"}
{else}
{crmRegion name='ajax-snippet'}{/crmRegion}
{crmRegion name='page-header' allowCmsOverride=0}{/crmRegion}
{crmRegion name='page-body'}
{* Add status messages and container-snippet div unless we are outputting json. *}
{if $smarty.get.snippet neq 'json'}
{* this div is deprecated but included for older-style snippets for legacy support *}
<div class="crm-container-snippet">
{include file="CRM/common/status.tpl"}
{/if}
{if !empty($isForm)}
{include file="CRM/Form/default.tpl"}
{else}
{include file=$tplFile}
{/if}
{if $smarty.get.snippet neq 'json'}
</div>
{/if}
{/crmRegion}
{crmRegion name='page-footer' allowCmsOverride=0}{/crmRegion}
{/if}
{/if}
{/strip}

View file

@ -0,0 +1,38 @@
{*
+--------------------------------------------------------------------+
| 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 |
+--------------------------------------------------------------------+
*}
{* Check for Status message for the page (stored in session->getStatus). Status is cleared on retrieval. *}
{if $session->getStatus(false)}
{assign var="status" value=$session->getStatus(true)}
{foreach name=statLoop item=statItem from=$status}
{if $urlIsPublic}
{assign var="infoType" value="no-popup"}
{else}
{assign var="infoType" value=$statItem.type}
{/if}
{include file="CRM/common/info.tpl" infoTitle=$statItem.title infoMessage=$statItem.text infoOptions=$statItem.options|@json_encode}
{/foreach}
{/if}

View file

@ -0,0 +1,74 @@
{*
+--------------------------------------------------------------------+
| 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 |
+--------------------------------------------------------------------+
*}
{* Display page for Upgrades. *}
{if $config->userSystem->is_drupal neq '1'}
<h2>{$pageTitle}</h2>
{/if}
{if !$upgraded}
<div class="crm-container" style="margin-top: 2em; padding: 1em; background-color: #FFFFE3; border: 1px #F8FF00 solid; color: black;">
<form method="post">
<p>
<span class="crm-status-icon info"> </span>
{ts 1=$currentVersion 2=$newVersion}The database will be upgraded from %1 to %2.{/ts}
</p>
{if $preUpgradeMessage}
<div style="border: 2px solid #E43D2B; background-color: rgba(228, 61, 43, 0.08); padding: 10px; margin-bottom: 15px;">
<span class="crm-status-icon"></span>
<strong style="vertical-align: middle; font-size: 1.2em;">{ts}Warning:{/ts}</strong>
{$preUpgradeMessage}
</div>
{/if}
<p><strong>{ts}Back up your database before continuing.{/ts}</strong>
{capture assign=docLink}{docURL page="Installation and Upgrades" text="Upgrade Documentation" style="text-decoration: underline;" resource="wiki"}{/capture}
{ts 1=$docLink}This process may change your database structure and values. In case of emergency you may need to revert to a backup. For more detailed information, refer to the %1.{/ts}</p>
<input type="hidden" name="action" value="begin" />
<button type="submit" class="crm-button" name="upgrade" onclick="return confirm('{ts escape="js"}Are you sure you are ready to upgrade now?{/ts}');" >
<i class="crm-i fa-rocket"></i>
{ts}Upgrade Now{/ts}
</button>&nbsp;&nbsp;
<a class="button cancel crm-form-submit" href="{$cancelURL}">
<i class="crm-i fa-times"></i>
{ts}Cancel{/ts}
</a>
</form>
</div>
{else}
<div class="crm-container" style="margin-top: 2em; padding: 1em; background-color: #EEFFEE; border: 1px #070 solid; color: black;">
<div class="bold" style="padding: 1em; background-color: rgba(255, 255, 255, 0.76);">
<p>
<img style="display:block; float:left; width:40px; margin-right:10px;" src="{$config->resourceBase}i/logo_lg.png">
{ts 1="https://civicrm.org/core-team" 2="https://civicrm.org/providers/contributors" 3="https://civicrm.org/become-a-member?src=ug&sid=$sid"}Thank you for upgrading to 4.7, the latest version of CiviCRM. Packed with new features and improvements, this release was made possible by both the <a href="%1">CiviCRM Core Team</a> and an incredible group of <a href="%2">contributors</a>, combined with the financial support of CiviCRM Members and Partners, without whom the project could not exist. We invite you to join their ranks by <a href="%3">becoming a member of CiviCRM today</a>. There is no better way to say thanks than to support those that have made CiviCRM 4.7 possible. <a href="%3">Join today</a>.{/ts}
</p>
</div>
<p><span class="crm-status-icon success"> </span>{$message}</p>
{if $afterUpgradeMessage}
<h3>{ts}Important Notes{/ts}</h3>
<p>{$afterUpgradeMessage}</p>
{/if}
<p><a href="{crmURL p='civicrm/dashboard' q='reset=1'}" title="{ts}CiviCRM home page{/ts}" style="text-decoration: underline;">{ts}Return to CiviCRM home page.{/ts}</a></p>
</div>
{/if}

View file

@ -0,0 +1,4 @@
<span id='task-section'>
{$form.task.html}
{$form.$actionButtonName.html} &nbsp; &nbsp;
</span>

View file

@ -0,0 +1,78 @@
{*
+--------------------------------------------------------------------+
| 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 $config->debug}
{include file="CRM/common/debug.tpl"}
{/if}
<div id="crm-container" class="crm-container{if $urlIsPublic} crm-public{/if}" lang="{$config->lcMessages|truncate:2:"":true}" xml:lang="{$config->lcMessages|truncate:2:"":true}">
{crmNavigationMenu is_default=1}
{if isset($browserPrint) and $browserPrint}
{* Javascript window.print link. Used for public pages where we can't do printer-friendly view. *}
<div id="printer-friendly">
<a href="#" onclick="window.print(); return false;" title="{ts}Print this page.{/ts}">
<i class="crm-i fa-print"></i>
</a>
</div>
{else}
{* Printer friendly link/icon. *}
<div id="printer-friendly">
<a href="{$printerFriendly}" target='_blank' title="{ts}Printer-friendly view of this page.{/ts}">
<i class="crm-i fa-print"></i>
</a>
</div>
{/if}
{crmRegion name='page-header'}
{/crmRegion}
<div class="clear"></div>
{if isset($localTasks) and $localTasks}
{include file="CRM/common/localNav.tpl"}
{/if}
<div id="crm-main-content-wrapper">
{include file="CRM/common/status.tpl"}
{crmRegion name='page-body'}
{if isset($isForm) and $isForm and isset($formTpl)}
{include file="CRM/Form/$formTpl.tpl"}
{else}
{include file=$tplFile}
{/if}
{/crmRegion}
</div>
{crmRegion name='page-footer'}
{if $urlIsPublic}
{include file="CRM/common/publicFooter.tpl"}
{else}
{include file="CRM/common/footer.tpl"}
{/if}
{/crmRegion}
</div> {* end crm-container div *}

View file

@ -0,0 +1,53 @@
{*
+--------------------------------------------------------------------+
| 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 |
+--------------------------------------------------------------------+
*}
{* upgradeCleanup.tpl: Display page for special cleanup scripts related to Upgrade.*}
<div style="margin-top: 3em; padding: 1em; background-color: #0C0; border: 1px #070 solid; color: white; font-weight: bold">
{if $preMessage}
<p>{$preMessage}</p>
{/if}
{if $rows}
<div class="upgrade-success">
<table>
<tr>
{foreach from=$columnHeaders item=header}
<th>{$header}</th>
{/foreach}
</tr>
{foreach from=$rows item=row}
<tr>
{foreach from=$row item=cell}
<td>{$cell}</td>
{/foreach}
</tr>
{/foreach}
</table>
</div>
{/if}
{if $postMessage}
<p>{$postMessage}</p>
{/if}
</div>

View file

@ -0,0 +1 @@
4.7.29

View file

@ -0,0 +1,97 @@
{*
+--------------------------------------------------------------------+
| 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 $config->debug}
{include file="CRM/common/debug.tpl"}
{/if}
<div id="crm-container" class="crm-container{if $urlIsPublic} crm-public{/if}" lang="{$config->lcMessages|truncate:2:"":true}" xml:lang="{$config->lcMessages|truncate:2:"":true}">
{crmNavigationMenu is_default=1}
{if $breadcrumb}
<div class="breadcrumb">
{foreach from=$breadcrumb item=crumb key=key}
{if $key != 0}
&raquo;
{/if}
{$crumb}
{/foreach}
</div>
{/if}
{if isset($browserPrint) and $browserPrint}
{* Javascript window.print link. Used for public pages where we can't do printer-friendly view. *}
<div id="printer-friendly">
<a href="#" onclick="window.print(); return false;" title="{ts}Print this page.{/ts}">
<i class="crm-i fa-print"></i>
</a>
</div>
{else}
{* Printer friendly link/icon. *}
<div id="printer-friendly">
<a href="{$printerFriendly}" target='_blank' title="{ts}Printer-friendly view of this page.{/ts}">
<i class="crm-i fa-print"></i>
</a>
</div>
{/if}
{if $pageTitle}
<div class="crm-title">
<h1 class="title">{if $isDeleted}<del>{/if}{$pageTitle}{if $isDeleted}</del>{/if}</h1>
</div>
{/if}
{crmRegion name='page-header'}
{/crmRegion}
{*{include file="CRM/common/langSwitch.tpl"}*}
<div class="clear"></div>
{if isset($localTasks) and $localTasks}
{include file="CRM/common/localNav.tpl"}
{/if}
<div id="crm-main-content-wrapper">
{include file="CRM/common/status.tpl"}
{crmRegion name='page-body'}
{if isset($isForm) and $isForm and isset($formTpl)}
{include file="CRM/Form/$formTpl.tpl"}
{else}
{include file=$tplFile}
{/if}
{/crmRegion}
</div>
{crmRegion name='page-footer'}
{if $urlIsPublic}
{include file="CRM/common/publicFooter.tpl"}
{else}
{include file="CRM/common/footer.tpl"}
{/if}
{/crmRegion}
</div> {* end crm-container div *}