* @return void
*/
static function buildQuickForm(&$form) {
+ //Added for CRM-12682: Add activity subject and campaign fields
+ CRM_Campaign_BAO_Campaign::addCampaign($form);
+ $form->add(
+ 'text',
+ 'subject',
+ ts('Activity Subject'),
+ array('size' => 45, 'maxlength' => 255),
+ FALSE
+ );
+
$form->add('static', 'pdf_format_header', NULL, ts('Page Format'));
$form->add(
'select',
}
function createActivities($form, $html_message, $contactIds) {
+ //Added for CRM-12682: Add activity subject and campaign fields
+ $formValues = $form->controller->exportValues($form->getName());
$session = CRM_Core_Session::singleton();
$userID = $session->get('userID');
'name'
);
$activityParams = array(
+ 'subject' => $formValues['subject'],
+ 'campaign_id' => $formValues['campaign_id'],
'source_contact_id' => $userID,
'activity_type_id' => $activityTypeID,
'activity_date_time' => date('YmdHis'),
{if $form.template.html}
<table class="form-layout-compressed">
<tr>
- <td class="label-left">{$form.template.label}</td>
+ <td class="label-left">{$form.template.label}</td>
<td>{$form.template.html}</td>
</tr>
+ <tr>
+ <td class="label-left">{$form.subject.label}</td>
+ <td>{$form.subject.html}</td>
+ </tr>
+ <tr>
+ <td class="label-left">{$form.campaign_id.label}</td>
+ <td>{$form.campaign_id.html}</td>
+ </tr>
</table>
{/if}
document.getElementsByName("updateTemplate")[0].checked = false;
showSaveUpdateChkBox();
if ( !val ) {
+ document.getElementById("subject").value ="";
if ( !isPDF ) {
document.getElementById(text_message).value ="";
- document.getElementById("subject").value ="";
}
if ( editor == "ckeditor" ) {
oEditor = CKEDITOR.instances[html_message];
var dataUrl = {/literal}"{crmURL p='civicrm/ajax/template' h=0 }"{literal};
cj.post( dataUrl, {tid: val}, function( data ) {
+ cj("#subject").val( data.subject );
if ( !isPDF ) {
- cj("#subject").val( data.subject );
-
if ( data.msg_text ) {
cj("#"+text_message).val( data.msg_text );
cj("div.text").show();