{*
+--------------------------------------------------------------------+
- | CiviCRM version 4.5 |
+ | CiviCRM version 4.6 |
+--------------------------------------------------------------------+
- | Copyright CiviCRM LLC (c) 2004-2014 |
+ | Copyright CiviCRM LLC (c) 2004-2015 |
+--------------------------------------------------------------------+
| This file is a part of CiviCRM. |
| |
<td class="view-value">
{$form.target_contact_id.html}
{if $action eq 1 or $single eq false}
- <br/>
- {$form.is_multi_activity.html} {$form.is_multi_activity.label} {help id="id-is_multi_activity"}
+ <div class="crm-is-multi-activity-wrapper">
+ {$form.is_multi_activity.html} {$form.is_multi_activity.label} {help id="id-is_multi_activity"}
+ </div>
{/if}
</td>
</tr>
{/if}
{if $activityAssigneeNotification}
<br />
- <span class="description"><span class="icon email-icon"></span>{ts}A copy of this activity will be emailed to each Assignee.{/ts}</span>
+ <span class="description"><span class="icon ui-icon-mail-closed"></span>{ts}A copy of this activity will be emailed to each Assignee.{/ts}</span>
{/if}
{/if}
</td>
<td class="label">{$form.details.label}</td>
{if $activityTypeName eq "Print PDF Letter"}
<td class="view-value">
- {* If using plain textarea, assign class=huge to make input large enough. *}
- {if $defaultWysiwygEditor eq 0}{$form.details.html|crmAddClass:huge}{else}{$form.details.html}{/if}
+ {$form.details.html}
</td>
{else}
<td class="view-value">
- {* If using plain textarea, assign class=huge to make input large enough. *}
- {if $defaultWysiwygEditor eq 0}{$form.details.html|crmStripAlternatives|crmAddClass:huge}{else}{$form.details.html|crmStripAlternatives}{/if}
+ {$form.details.html|crmStripAlternatives}
</td>
{/if}
</tr>
{if $action eq 2 OR $action eq 1}
<tr class="crm-activity-form-block-recurring_activity">
<td colspan="2">
- {include file="CRM/Core/Form/RecurringEntity.tpl"}
- {literal}
- <script type="text/javascript">
- CRM.$(function($) {
- if ($('#activity_date_time').val() !== "" && $('#activity_date_time_time').val() !== "") {
- $('#repetition_start_date, #repetition_start_date_display').val($('#activity_date_time').val());
- $('#repetition_start_date_time').val($('#activity_date_time_time').val());
- }
-
- $('#activity_date_time_display').change(function() {
- $('#repetition_start_date, #repetition_start_date_display').val($('#activity_date_time').val());
- });
-
- $('#activity_date_time_time').change(function() {
- $('#repetition_start_date_time').val($('#activity_date_time_time').val());
- });
-
- if ($('#start_action_offset').val() == "" && $('#repeat_absolute_date_display').val() == "") {
- $('#recurring-entity-block').addClass('collapsed');
- }
- });
- </script>
- {/literal}
- {if $action eq 1}
- {literal}
- <script type="text/javascript">
- CRM.$(function($) {
- $('#recurring-entity-block div.crm-submit-buttons').css('display', 'none');
- });
- </script>
- {/literal}
- {/if}
+ {include file="CRM/Core/Form/RecurringEntity.tpl" recurringFormIsEmbedded=true}
</td>
</tr>
{/if}
{literal}
<script type="text/javascript">
CRM.$(function($) {
- $('.crm-accordion-body').each( function() {
+ var $form = $('form.{/literal}{$form.formClass}{literal}');
+ $('.crm-accordion-body', $form).each( function() {
//open tab if form rule throws error
if ( $(this).children( ).find('span.crm-error').text( ).length > 0 ) {
$(this).parent('.collapsed').crmAccordionToggle();
}
});
- $('#swap_target_assignee').click(function() {
- var assignees = $('#assignee_contact_id').select2("data");
- var targets = $('#target_contact_id').select2("data");
- $('#assignee_contact_id').select2("data", targets);
- $('#target_contact_id').select2("data", assignees);
- return false;
+ function toggleMultiActivityCheckbox() {
+ $('.crm-is-multi-activity-wrapper').toggle(!!($(this).val() && $(this).val().indexOf(',') > 0));
+ }
+ $('[name=target_contact_id]', $form).each(toggleMultiActivityCheckbox).change(toggleMultiActivityCheckbox);
+ $('#swap_target_assignee').click(function(e) {
+ e.preventDefault();
+ var assignees = $('#assignee_contact_id', $form).select2("data");
+ var targets = $('#target_contact_id', $form).select2("data");
+ $('#assignee_contact_id', $form).select2("data", targets);
+ $('#target_contact_id', $form).select2("data", assignees).change();
});
});
</script>
{if ($context eq 'fulltext' || $context eq 'search') && $searchKey}
{assign var='urlParams' value="reset=1&atype=$atype&action=update&reset=1&id=$entityID&cid=$contactId&context=$context&key=$searchKey"}
{/if}
- <a href="{crmURL p='civicrm/activity/add' q=$urlParams}" class="edit button" title="{ts}Edit{/ts}"><span><div class="icon edit-icon"></div>{ts}Edit{/ts}</span></a>
+ <a href="{crmURL p='civicrm/activity/add' q=$urlParams}" class="edit button" title="{ts}Edit{/ts}"><span><div class="icon ui-icon-pencil"></div>{ts}Edit{/ts}</span></a>
{/if}
{if call_user_func(array('CRM_Core_Permission','check'), 'delete activities')}