$mg->search_args = $params['search_args'];
$mg->group_type = 'Include';
$mg->save();
- }
+ }
// check and attach and files as needed
CRM_Core_BAO_File::processAttachment($params, 'civicrm_mailing', $mailing->id);
// Populate the recipients.
$mailing->getRecipients($job->id, $mailing->id, NULL, NULL, TRUE, FALSE);
}
- //print_r($params);
- //exit;
+ //print_r($params);
+ //exit;
return $mailing;
}
* @return array API Success Array
*/
function civicrm_api3_mailing_create($params, $ids = array()) {
- return _civicrm_api3_basic_create(_civicrm_api3_get_BAO(__FUNCTION__), $params);
+ return _civicrm_api3_basic_create(_civicrm_api3_get_BAO(__FUNCTION__), $params);
}
function civicrm_api3_mailing_get_token($params) {
- if (!array_key_exists("usage", $params)) {
- throw new API_Exception('Mandatory keys missing from params array: entity');
- }
-
- $tokens = CRM_Core_SelectValues::contactTokens();
- switch ($params['usage']) {
- case 'Mailing' :
- $tokens = array_merge(CRM_Core_SelectValues::mailingTokens(), $tokens);
- break;
- case 'ScheduleEventReminder' :
- $tokens = array_merge(CRM_Core_SelectValues::activityTokens(), $tokens);
- $tokens = array_merge(CRM_Core_SelectValues::eventTokens(), $tokens);
- $tokens = array_merge(CRM_Core_SelectValues::membershipTokens(), $tokens);
- break;
- case 'ManageEventScheduleReminder' :
- $tokens = array_merge(CRM_Core_SelectValues::eventTokens(), $tokens);
- break;
- }
-
- return CRM_Utils_Token::formatTokensForDisplay($tokens);
-
-}
+ if (!array_key_exists("usage", $params)) {
+ throw new API_Exception('Mandatory keys missing from params array: entity');
+ }
+ $tokens = CRM_Core_SelectValues::contactTokens();
+ switch ($params['usage']) {
+ case 'Mailing' :
+ $tokens = array_merge(CRM_Core_SelectValues::mailingTokens(), $tokens);
+ break;
+ case 'ScheduleEventReminder' :
+ $tokens = array_merge(CRM_Core_SelectValues::activityTokens(), $tokens);
+ $tokens = array_merge(CRM_Core_SelectValues::eventTokens(), $tokens);
+ $tokens = array_merge(CRM_Core_SelectValues::membershipTokens(), $tokens);
+ break;
+ case 'ManageEventScheduleReminder' :
+ $tokens = array_merge(CRM_Core_SelectValues::eventTokens(), $tokens);
+ break;
+ }
+ return CRM_Utils_Token::formatTokensForDisplay($tokens);
+}
/**
* Adjust Metadata for Create action
* @return array API Success Array
*/
function civicrm_api3_mailing_delete($params, $ids = array()) {
- return _civicrm_api3_basic_delete(_civicrm_api3_get_BAO(__FUNCTION__), $params);
+ return _civicrm_api3_basic_delete(_civicrm_api3_get_BAO(__FUNCTION__), $params);
}
* @return array
*/
function civicrm_api3_mailing_get($params) {
- return _civicrm_api3_basic_get(_civicrm_api3_get_BAO(__FUNCTION__), $params);
+ return _civicrm_api3_basic_get(_civicrm_api3_get_BAO(__FUNCTION__), $params);
}
/**
* @return array
*/
function civicrm_api3_mailing_event_bounce($params) {
+ $body = $params['body'];
+ unset($params['body']);
- $body = $params['body'];
- unset($params['body']);
-
- $params += CRM_Mailing_BAO_BouncePattern::match($body);
+ $params += CRM_Mailing_BAO_BouncePattern::match($body);
- if (CRM_Mailing_Event_BAO_Bounce::create($params)) {
- return civicrm_api3_create_success($params);
- }
- else {
- throw new API_Exception(ts('Queue event could not be found'),'no_queue_event
+ if (CRM_Mailing_Event_BAO_Bounce::create($params)) {
+ return civicrm_api3_create_success($params);
+ }
+ else {
+ throw new API_Exception(ts('Queue event could not be found'),'no_queue_event
');
- }
+ }
}
/**
* @return array
*/
function civicrm_api3_mailing_event_confirm($params) {
- return civicrm_api('mailing_event_confirm', 'create', $params);
+ return civicrm_api('mailing_event_confirm', 'create', $params);
}
/**
* @return array
*/
function civicrm_api3_mailing_event_reply($params) {
- $job = $params['job_id'];
- $queue = $params['event_queue_id'];
- $hash = $params['hash'];
- $replyto = $params['replyTo'];
- $bodyTxt = CRM_Utils_Array::value('bodyTxt', $params);
- $bodyHTML = CRM_Utils_Array::value('bodyHTML', $params);
- $fullEmail = CRM_Utils_Array::value('fullEmail', $params);
-
- $mailing = CRM_Mailing_Event_BAO_Reply::reply($job, $queue, $hash, $replyto);
-
- if (empty($mailing)) {
- return civicrm_api3_create_error('Queue event could not be found');
- }
+ $job = $params['job_id'];
+ $queue = $params['event_queue_id'];
+ $hash = $params['hash'];
+ $replyto = $params['replyTo'];
+ $bodyTxt = CRM_Utils_Array::value('bodyTxt', $params);
+ $bodyHTML = CRM_Utils_Array::value('bodyHTML', $params);
+ $fullEmail = CRM_Utils_Array::value('fullEmail', $params);
+
+ $mailing = CRM_Mailing_Event_BAO_Reply::reply($job, $queue, $hash, $replyto);
+
+ if (empty($mailing)) {
+ return civicrm_api3_create_error('Queue event could not be found');
+ }
- CRM_Mailing_Event_BAO_Reply::send($queue, $mailing, $bodyTxt, $replyto, $bodyHTML, $fullEmail);
+ CRM_Mailing_Event_BAO_Reply::send($queue, $mailing, $bodyTxt, $replyto, $bodyHTML, $fullEmail);
- return civicrm_api3_create_success($params);
+ return civicrm_api3_create_success($params);
}
/**
* @return array
*/
function civicrm_api3_mailing_event_forward($params) {
- $job = $params['job_id'];
- $queue = $params['event_queue_id'];
- $hash = $params['hash'];
- $email = $params['email'];
- $fromEmail = CRM_Utils_Array::value('fromEmail', $params);
- $params = CRM_Utils_Array::value('params', $params);
+ $job = $params['job_id'];
+ $queue = $params['event_queue_id'];
+ $hash = $params['hash'];
+ $email = $params['email'];
+ $fromEmail = CRM_Utils_Array::value('fromEmail', $params);
+ $params = CRM_Utils_Array::value('params', $params);
- $forward = CRM_Mailing_Event_BAO_Forward::forward($job, $queue, $hash, $email, $fromEmail, $params);
+ $forward = CRM_Mailing_Event_BAO_Forward::forward($job, $queue, $hash, $email, $fromEmail, $params);
- if ($forward) {
- return civicrm_api3_create_success($params);
- }
+ if ($forward) {
+ return civicrm_api3_create_success($params);
+ }
- return civicrm_api3_create_error('Queue event could not be found');
+ return civicrm_api3_create_error('Queue event could not be found');
}
/**
* @return array
*/
function civicrm_api3_mailing_event_click($params) {
+ civicrm_api3_verify_mandatory($params,
+ 'CRM_Mailing_Event_DAO_TrackableURLOpen',
+ array('event_queue_id', 'url_id'),
+ FALSE
+ );
- civicrm_api3_verify_mandatory($params,
- 'CRM_Mailing_Event_DAO_TrackableURLOpen',
- array('event_queue_id', 'url_id'),
- FALSE
- );
-
- $url_id = $params['url_id'];
- $queue = $params['event_queue_id'];
+ $url_id = $params['url_id'];
+ $queue = $params['event_queue_id'];
- $url = CRM_Mailing_Event_BAO_TrackableURLOpen::track($queue, $url_id);
+ $url = CRM_Mailing_Event_BAO_TrackableURLOpen::track($queue, $url_id);
- $values = array();
- $values['url'] = $url;
- $values['is_error'] = 0;
+ $values = array();
+ $values['url'] = $url;
+ $values['is_error'] = 0;
- return civicrm_api3_create_success($values);
+ return civicrm_api3_create_success($values);
}
/**
*/
function civicrm_api3_mailing_event_open($params) {
- civicrm_api3_verify_mandatory($params,
- 'CRM_Mailing_Event_DAO_Opened',
- array('event_queue_id'),
- FALSE
- );
+ civicrm_api3_verify_mandatory($params,
+ 'CRM_Mailing_Event_DAO_Opened',
+ array('event_queue_id'),
+ FALSE
+ );
- $queue = $params['event_queue_id'];
- $success = CRM_Mailing_Event_BAO_Opened::open($queue);
+ $queue = $params['event_queue_id'];
+ $success = CRM_Mailing_Event_BAO_Opened::open($queue);
- if (!$success) {
- return civicrm_api3_create_error('mailing open event failed');
- }
+ if (!$success) {
+ return civicrm_api3_create_error('mailing open event failed');
+ }
- return civicrm_api3_create_success($params);
+ return civicrm_api3_create_success($params);
}
function civicrm_api3_mailing_preview($params) {
* Both the min and max days can be set via the params
*/
function civicrm_api3_mailing_update_email_resetdate($params) {
- CRM_Mailing_Event_BAO_Delivered::updateEmailResetDate(
- CRM_Utils_Array::value('minDays', $params, 3),
- CRM_Utils_Array::value('maxDays', $params, 3)
- );
- return civicrm_api3_create_success();
+ CRM_Mailing_Event_BAO_Delivered::updateEmailResetDate(
+ CRM_Utils_Array::value('minDays', $params, 3),
+ CRM_Utils_Array::value('maxDays', $params, 3)
+ );
+ return civicrm_api3_create_success();
}
* @return array
*/
function civicrm_api3_mailing_group_event_unsubscribe($params) {
- return civicrm_api('mailing_event_unsubscribe', 'create', $params);
+ return civicrm_api('mailing_event_unsubscribe', 'create', $params);
}
/**
* @return array
*/
function civicrm_api3_mailing_group_event_domain_unsubscribe($params) {
- $params['org_unsubscribe'] = 1;
- return civicrm_api('mailing_event_unsubscribe', 'create', $params);
+ $params['org_unsubscribe'] = 1;
+ return civicrm_api('mailing_event_unsubscribe', 'create', $params);
}
/**
* @return array
*/
function civicrm_api3_mailing_group_event_resubscribe($params) {
- return civicrm_api('mailing_event_resubscribe', 'create', $params);
+ return civicrm_api('mailing_event_resubscribe', 'create', $params);
}
/**
* @return array
*/
function civicrm_api3_mailing_group_event_subscribe($params) {
- return civicrm_api('mailing_event_subscribe', 'create', $params);
+ return civicrm_api('mailing_event_subscribe', 'create', $params);
}
/**
return _civicrm_api3_basic_get(_civicrm_api3_get_BAO(__FUNCTION__), $params);
}
-
function civicrm_api3_mailing_group_delete($params, $ids = array()) {
return _civicrm_api3_basic_delete(_civicrm_api3_get_BAO(__FUNCTION__), $params);
}
function civicrm_api3_mailing_group_getfields($params) {
- $dao = _civicrm_api3_get_DAO('Subscribe');
- $d = new $dao();
- $fields = $d->fields();
- $d->free();
+ $dao = _civicrm_api3_get_DAO('Subscribe');
+ $d = new $dao();
+ $fields = $d->fields();
+ $d->free();
- $dao = _civicrm_api3_get_DAO('Unsubscribe');
- $d = new $dao();
- $fields = $fields + $d->fields();
- $d->free();
+ $dao = _civicrm_api3_get_DAO('Unsubscribe');
+ $d = new $dao();
+ $fields = $fields + $d->fields();
+ $d->free();
- // CRM-13830 - prevent the api wrapper from helping out with pseudoconstants
- // Since these fields don't belong to this entity it will fail
- foreach ($fields as &$field) {
- unset($field['pseudoconstant']);
- }
+ // CRM-13830 - prevent the api wrapper from helping out with pseudoconstants
+ // Since these fields don't belong to this entity it will fail
+ foreach ($fields as &$field) {
+ unset($field['pseudoconstant']);
+ }
return civicrm_api3_create_success($fields, $params, 'mailing_group', 'getfields');
}
-
* @access public
*/
function civicrm_api3_mailing_recipients_get($params, $ids = array()) {
- return _civicrm_api3_basic_get(_civicrm_api3_get_BAO(__FUNCTION__), $params);
+ return _civicrm_api3_basic_get(_civicrm_api3_get_BAO(__FUNCTION__), $params);
}
-
-
-
$scope.mailid.push(c);
});
for(var a in chck)
- { var b ={}
+ {
+ var b ={}
b.id = chck[a];
var splt = chck[a].split(" ");
resubscribe_id: $scope.currentMailing.resubscribe_id,
body_html: $scope.currentMailing.body_html,
body_text: $scope.currentMailing.body_text,
- campaign_id: $scope.currentMailing.campaign_id==null ? "" : $scope.currentMailing.campaign_id,
- header_id: $scope.currentMailing.header_id,
- footer_id: $scope.currentMailing.footer_id,
+ campaign_id: $scope.currentMailing.campaign_id==null ? "" : $scope.currentMailing.campaign_id,
+ header_id: $scope.currentMailing.header_id,
+ footer_id: $scope.currentMailing.footer_id,
groups: {include: $scope.incGrp,
exclude: $scope.excGrp
},
resubscribe_id: $scope.currentMailing.resubscribe_id,
body_html: $scope.currentMailing.body_html,
body_text: $scope.currentMailing.body_text,
- campaign_id: $scope.currentMailing.campaign_id==null ? "" : $scope.currentMailing.campaign_id,
- header_id: $scope.currentMailing.header_id,
- footer_id: $scope.currentMailing.footer_id,
+ campaign_id: $scope.currentMailing.campaign_id==null ? "" : $scope.currentMailing.campaign_id,
+ header_id: $scope.currentMailing.header_id,
+ footer_id: $scope.currentMailing.footer_id,
is_completed: $scope.currentMailing.is_completed,
dedupe_email: $scope.currentMailing.dedupe_email
},
body_text: $scope.currentMailing.body_text,
scheduled_date: $scope.currentMailing.scheduled_date==null ? "" : $scope.currentMailing.scheduled_date,
scheduled_id: $scope.currentMailing.scheduled_id==null ? "" : $scope.currentMailing.scheduled_id,
- campaign_id: $scope.currentMailing.campaign_id==null ? "" : $scope.currentMailing.campaign_id,
- header_id: $scope.currentMailing.header_id,
- footer_id: $scope.currentMailing.footer_id,
+ campaign_id: $scope.currentMailing.campaign_id==null ? "" : $scope.currentMailing.campaign_id,
+ header_id: $scope.currentMailing.header_id,
+ footer_id: $scope.currentMailing.footer_id,
is_completed: $scope.currentMailing.is_completed,
approver_id: $scope.currentMailing.approver_id,
approval_status_id: $scope.currentMailing.approval_status_id,
});
-// Directive to go to the next tab
+// Directive to go to the next tab
crmMailing.directive('nexttab', function() {
return {
restrict: 'A',
return {
restrict : 'AE',
link: function(scope, element, attrs){
-
- function format(item){
+
+ function format(item){
return item.label.replace(/&/g, '&')
.replace(/"/g, '"')
.replace(/</g, '<')
.replace(/>/g, '>');
}
-
+
CRM.api3('OptionGroup', 'get', {
"sequential": 1,
"name": "from_email_address"
"sequential": 1,
"option_group_id": result.id
}).done(function(orgEmails) {
-
+
//$sce.trustAsHtml(
-
+
$(element).select2({
class: "abtesting-form-element",
data: orgEmails.values,
formatResult: format,
formatSelection: format,
placeholder:"Select reply to address"});
-
- });
-
- });
-
+ });
+ });
}
};
});
<!-- will use Controller: browse -->
<body>
<table>
- <tr>
- <td class="label">Attach Files</td>
- <td>
- <input type="file" data-file="param.file_1"/>
- </td>
- <td>
- <button ng-click="upload()" >Upload</button>
- </td>
- </tr>
- <tr>
- <td class="label">Attach Files</td>
- <td>
- <input type="file" data-file="param.file_2"/>
- </td>
- <td>
- <button ng-click="upload_2()" >Upload</button>
- </td>
- </tr>
- <tr>
- <td class="label">Attach Files</td>
- <td>
- <input type="file" data-file="param.file_3"/>
- </td>
- <td>
- <button ng-click="upload_3()" >Upload</button>
- </td>
- </tr>
-
+ <tr>
+ <td class="label">Attach Files</td>
+ <td>
+ <input type="file" data-file="param.file_1"/>
+ </td>
+ <td>
+ <button ng-click="upload()" >Upload</button>
+ </td>
+ </tr>
+ <tr>
+ <td class="label">Attach Files</td>
+ <td>
+ <input type="file" data-file="param.file_2"/>
+ </td>
+ <td>
+ <button ng-click="upload_2()" >Upload</button>
+ </td>
+ </tr>
+ <tr>
+ <td class="label">Attach Files</td>
+ <td>
+ <input type="file" data-file="param.file_3"/>
+ </td>
+ <td>
+ <button ng-click="upload_3()" >Upload</button>
+ </td>
+ </tr>
</table>
-
</body>
<br>
<div class="crm-accordion-wrapper collapsed">
- <div class="crm-accordion-header">HTML Format</div>
- <div class="crm-accordion-body" ng-include="partialUrl('ht.html')"></div>
+ <div class="crm-accordion-header">HTML Format</div>
+ <div class="crm-accordion-body" ng-include="partialUrl('ht.html')"></div>
</div>
<div class="crm-accordion-wrapper collapsed">
- <div class="crm-accordion-header">Plain Text</div>
- <div class="crm-accordion-body" ng-include="partialUrl('plainText.html')"></div>
+ <div class="crm-accordion-header">Plain Text</div>
+ <div class="crm-accordion-body" ng-include="partialUrl('plainText.html')"></div>
</div>
<table>
- <tr ng-show= "false">
- <td>
- <input type="checkbox">  Save Template</input>
- </tr>
+ <tr ng-show="false">
+ <td>
+ <input type="checkbox">  Save Template</input>
+ </tr>
</table>
<div class="crm-block crm-form-block crmMailing">
<br>
<table class="form-layout-compressed">
- <tbody>
- <tr>
- <td class="label">From E-mail Address</td>
- <td>
- <select style="width: 200px" ng-model="from.total" ng-options="frm.label as frm.label for frm in fromAddress">
- <option value="">-none-</option>
- </select>
- </td>
- </tr>
- <tr>
- <td class="label">Reply to E-mail Address</td>
- <td>
- <select style="width: 200px" ng-model="currentMailing.replyto_email" ng-options="frm.email as frm.email for frm in replyaddress">
- <option value="">-none-</option>
- </select>
- </td>
- </tr>
- <tr>
- <td class="label">Mailing Subject</td>
- <td>
- <input id= "sub" placeholder="Enter Subject" required name="subject" type="text" ng-model="currentMailing.subject"/>
- </td>
- </tr>
- <tr>
- <td class="label" style= "color:red" ng-show="mailing_form.subject.$invalid">
- Mailing subject required.
- </td>
- </tr>
- <tr>
- <td class="label">Mailing Subject Token</td>
- <td>
- <input type="hidden" groupselect id= "subgroup" ng-model="token" ></input>
- </td>
- </tr>
- <tr>
- <td class="label">Use Template</td>
- <td>
- <select ng-change="tmp(tst)" ng-model="tst" ng-options= "mstemp.id as mstemp.msg_title for mstemp in tmpList">
- <option value="">-none-</option>
- </select>
- </td>
- </tr>
- </tbody>
+ <tbody>
+ <tr>
+ <td class="label">From E-mail Address</td>
+ <td>
+ <select style="width: 200px" ng-model="from.total" ng-options="frm.label as frm.label for frm in fromAddress">
+ <option value="">-none-</option>
+ </select>
+ </td>
+ </tr>
+ <tr>
+ <td class="label">Reply to E-mail Address</td>
+ <td>
+ <select style="width: 200px" ng-model="currentMailing.replyto_email" ng-options="frm.email as frm.email for frm in replyaddress">
+ <option value="">-none-</option>
+ </select>
+ </td>
+ </tr>
+ <tr>
+ <td class="label">Mailing Subject</td>
+ <td>
+ <input id="sub" placeholder="Enter Subject" required name="subject" type="text" ng-model="currentMailing.subject"/>
+ </td>
+ </tr>
+ <tr>
+ <td class="label" style="color:red" ng-show="mailing_form.subject.$invalid">
+ Mailing subject required.
+ </td>
+ </tr>
+ <tr>
+ <td class="label">Mailing Subject Token</td>
+ <td>
+ <input type="hidden" groupselect id="subgroup" ng-model="token" ></input>
+ </td>
+ </tr>
+ <tr>
+ <td class="label">Use Template</td>
+ <td>
+ <select ng-change="tmp(tst)" ng-model="tst" ng-options="mstemp.id as mstemp.msg_title for mstemp in tmpList">
+ <option value="">-none-</option>
+ </select>
+ </td>
+ </tr>
+ </tbody>
</table>
<br>
-<!--<div class="crm-accordion-wrapper collapsed" ng-show= "upldChange(composeS)">
+<!--<div class="crm-accordion-wrapper collapsed" ng-show="upldChange(composeS)">
<div class="crm-accordion-header">Compose on Screen</div>
<div class="crm-accordion-body" ng-include="partialUrl('composeonScreen.html')"></div>
</div>-->
<br>
<div class="crm-accordion-wrapper ">
- <div class="crm-accordion-header">HTML Format</div>
- <div class="crm-accordion-body" ng-include="partialUrl('ht.html')"></div>
+ <div class="crm-accordion-header">HTML Format</div>
+ <div class="crm-accordion-body" ng-include="partialUrl('ht.html')"></div>
</div>
<div class="crm-accordion-wrapper collapsed">
- <div class="crm-accordion-header">Plain Text</div>
- <div class="crm-accordion-body" ng-include="partialUrl('plainText.html')"></div>
+ <div class="crm-accordion-header">Plain Text</div>
+ <div class="crm-accordion-body" ng-include="partialUrl('plainText.html')"></div>
</div>
<div class="crm-accordion-wrapper collapsed">
- <div class="crm-accordion-header">Header and Footer</div>
- <div class="crm-accordion-body" ng-include="partialUrl('headerandFooter.html')"></div>
+ <div class="crm-accordion-header">Header and Footer</div>
+ <div class="crm-accordion-body" ng-include="partialUrl('headerandFooter.html')"></div>
</div>
<div class="crm-accordion-wrapper collapsed">
- <div class="crm-accordion-header">Track and Respond</div>
- <div class="crm-accordion-body" ng-include="partialUrl('trackandRespond.html')"></div>
+ <div class="crm-accordion-header">Track and Respond</div>
+ <div class="crm-accordion-body" ng-include="partialUrl('trackandRespond.html')"></div>
</div>
<br>
<div class="crm-submit-buttons">
<span class="crm-button">
- <input prevtab type="submit" class="crm-button" value = "Previous" />
+ <input prevtab type="submit" class="crm-button" value="Previous" />
</span>
<span class="crm-button">
- <input nexttab type= "submit" ng-click="editMailingFormStep2.$setPristine(); save_next_page2()" value="Next" />
+ <input nexttab type="submit" ng-click="editMailingFormStep2.$setPristine(); save_next_page2()" value="Next" />
</span>
<span class="crm-button">
- <input type= "submit" ng-click="editMailingFormStep2.$setPristine(); save()" value="Save and Continue Later" />
+ <input type="submit" ng-click="editMailingFormStep2.$setPristine(); save()" value="Save and Continue Later" />
</span>
<span class="crm-button">
- <input type= "submit" ng-click="back()" value="Cancel" />
+ <input type="submit" ng-click="back()" value="Cancel" />
</span>
</div>
</div>
<br>
<body>
<table>
- <tr>
- <td class="label">Mailing Header</td>
- <td>
- <select ng-model="currentMailing.header_id" ng-options="hf.id as hf.name for hf in headerfooter| filter:isHeader">
- <option value="">-none-</option>
- </select>
- </td>
- </tr>
- <tr>
- <td class="label">Mailing Footer</td>
- <td>
- <select ng-model="currentMailing.footer_id" ng-options="f.id as f.name for f in headerfooter| filter:isFooter">
- <option value="">-none-</option>
- </select>
- </td>
- </tr>
+ <tr>
+ <td class="label">Mailing Header</td>
+ <td>
+ <select ng-model="currentMailing.header_id" ng-options="hf.id as hf.name for hf in headerfooter| filter:isHeader">
+ <option value="">-none-</option>
+ </select>
+ </td>
+ </tr>
+ <tr>
+ <td class="label">Mailing Footer</td>
+ <td>
+ <select ng-model="currentMailing.footer_id" ng-options="f.id as f.name for f in headerfooter| filter:isFooter">
+ <option value="">-none-</option>
+ </select>
+ </td>
+ </tr>
</table>
</body>
<br>
-<div style = "float:right;">
-<input type="hidden" groupselect id= "htgroup" ng-model="token" />
+<div style="float:right;">
+<input type="hidden" groupselect id="htgroup" ng-model="token" />
</div>
<br>
<br>
<!--
Controller: MailCtrl
-Required vars: groupNamesList
+Required vars: groupNamesList
MailingGroup api needs to be improved to bind the chosen groups
-->
<br>
<select chsgroup multiple ng-model="incGroup">
- <option ng-repeat="grp in groupNamesList| filter: isGrp" value="{{grp.id}} civicrm_group include" > {{grp.title}} </option>
- <option ng-repeat="grp in groupNamesList| filter: isGrp" value="{{grp.id}} civicrm_group exclude" > {{grp.title}} </option>
- <option ng-repeat="ml in mailList| filter:isCompMail" value="{{ml.id}} civicrm_mailing include" > {{ml.name}} </option>
- <option ng-repeat="ml in mailList| filter:isCompMail" value="{{ml.id}} civicrm_mailing exclude" > {{ml.name}} </option>
+ <option ng-repeat="grp in groupNamesList| filter: isGrp" value="{{grp.id}} civicrm_group include" > {{grp.title}} </option>
+ <option ng-repeat="grp in groupNamesList| filter: isGrp" value="{{grp.id}} civicrm_group exclude" > {{grp.title}} </option>
+ <option ng-repeat="ml in mailList| filter:isCompMail" value="{{ml.id}} civicrm_mailing include" > {{ml.name}} </option>
+ <option ng-repeat="ml in mailList| filter:isCompMail" value="{{ml.id}} civicrm_mailing exclude" > {{ml.name}} </option>
</select>
<br> <br>
-->
- <div ui-jq="tabs" id="alltabs" class="crmMailingTabs">
- <ul>
- <li><a href="#tab-0" ng-click= "recclicked()">Recipients</a></li>
- <li><a href="#tab-1" ng-click= "conclicked()">Content</a></li>
- <li><a href="#tab-2" ng-click= "schedclicked()">Schedule and Send</a></li>
- </ul>
+ <div ui-jq="tabs" id="alltabs" class="crmMailingTabs">
+ <ul>
+ <li><a href="#tab-0" ng-click="recclicked()">Recipients</a></li>
+ <li><a href="#tab-1" ng-click="conclicked()">Content</a></li>
+ <li><a href="#tab-2" ng-click="schedclicked()">Schedule and Send</a></li>
+ </ul>
- <div id="tab-0">
- <div ng-include="partialUrl('recipient.html')"></div>
- </div>
+ <div id="tab-0">
+ <div ng-include="partialUrl('recipient.html')"></div>
+ </div>
- <div id="tab-1">
- <div ng-include="partialUrl('content.html')"></div>
- </div>
+ <div id="tab-1">
+ <div ng-include="partialUrl('content.html')"></div>
+ </div>
- <div id="tab-2">
- <div ng-include="partialUrl('send.html')"></div>
- </div>
- </div>
+ <div id="tab-2">
+ <div ng-include="partialUrl('send.html')"></div>
+ </div>
+ </div>
Required vars: currentMailing
-->
<br>
-<div style = "float:right;">
- <input type="hidden" groupselect id= "textgroup" ng-model="token" ></input>
+<div style="float:right;">
+ <input type="hidden" groupselect id="textgroup" ng-model="token" ></input>
</div>
<br>
<br>
<!--
Controller: MailCtrl
-Required vars: currentMailing
+Required vars: currentMailing
The editor has to be added. Currently just a simple text editor
-->
<br>
-<div class="crm-accordion-wrapper collapsed" ng-click = "preview_update()">
- <div class="crm-accordion-header">HTML Preview</div>
- <div class="crm-accordion-body" ng-include="partialUrl('preview_ht.html')"></div>
+<div class="crm-accordion-wrapper collapsed" ng-click="preview_update()">
+ <div class="crm-accordion-header">HTML Preview</div>
+ <div class="crm-accordion-body" ng-include="partialUrl('preview_ht.html')"></div>
</div>
-<div class="crm-accordion-wrapper collapsed" ng-show = "isBody_text()" ng-click = "preview_update()">
- <div class="crm-accordion-header">Plain Text Preview</div>
- <div class="crm-accordion-body" ng-include="partialUrl('preview_plaintext.html')"></div>
+<div class="crm-accordion-wrapper collapsed" ng-show="isBody_text()" ng-click="preview_update()">
+ <div class="crm-accordion-header">Plain Text Preview</div>
+ <div class="crm-accordion-body" ng-include="partialUrl('preview_plaintext.html')"></div>
</div>
<br>
<!--
Controller: MailCtrl
-Required vars: currentMailing
+Required vars: currentMailing
The editor has to be added. Currently just a simple text editor
-->
<br>
-<table style = "font-size:13pt; font-family: Georgia; ">
- <tr>
- <td>Subject:</td>
- <td><div ng-bind-html="deliberatelyTrustDangerousSnippet3()"></div></td>
- </tr>
+<table style="font-size:13pt; font-family: Georgia; ">
+ <tr>
+ <td>Subject:</td>
+ <td><div ng-bind-html="deliberatelyTrustDangerousSnippet3()"></div></td>
+ </tr>
- <tr></tr>
- <tr>
- <td>Html:</td>
- <td><div ng-bind-html="deliberatelyTrustDangerousSnippet()"></div></td>
- </tr>
+ <tr></tr>
+ <tr>
+ <td>Html:</td>
+ <td><div ng-bind-html="deliberatelyTrustDangerousSnippet()"></div></td>
+ </tr>
</table>
<!--/siddhant/drupal-7.27/civicrm/mailing/preview?type=html&qfKey=e1adc21bd61fb7e449c48ffe80c4d15c_991
/siddhant/drupal-7.27/civicrm/mailing/preview?type=html&qfKey=e1adc21bd61fb7e449c48ffe80c4d15c_7748
Required vars: currentMailing
-->
<br>
-<table style = "font-size:13pt; font-family: Georgia; ">
- <tr>
- <td>Subject:</td>
- <td><div ng-bind-html="deliberatelyTrustDangerousSnippet3()"></div></td>
- </tr>
+<table style="font-size:13pt; font-family: Georgia; ">
+ <tr>
+ <td>Subject:</td>
+ <td><div ng-bind-html="deliberatelyTrustDangerousSnippet3()"></div></td>
+ </tr>
- <tr></tr>
- <tr>
- <td>PlainText:</td>
- <td><div ng-bind-html="deliberatelyTrustDangerousSnippet2()"></div></td>
- </tr>
+ <tr></tr>
+ <tr>
+ <td>PlainText:</td>
+ <td><div ng-bind-html="deliberatelyTrustDangerousSnippet2()"></div></td>
+ </tr>
</table>
<!--<script src="../../packages/jquery/plugins/jquery.validate.min.js"><script>-->
<br>
<table class="form-layout-compressed">
- <tbody>
- <tr>
- <td class="label">Send Immediately</td>
- <td>
- <input type="checkbox" ng-model="now" ng-change= "checkNow()" ng-true-value="1" ng-false-value="0"/>
- </td>
- <tr ng-show="now==0">
- <td class="label">OR</td>
- </tr>
- <tr ng-show="now==0">
- <td class="label">Schedule Mailing</td>
- <td>
- <input type="text" class="dateplugin" chsdate ng-model="scheddate.date" >
- </td>
- <td class="label" >Time</td>
- <td>
- <input type="text" placeholder="hh:mm" ng-model="scheddate.time" checktimeentry required>
- </td>
- <!--<td>
- <input type="text" ng-model="scheddate.time">
- </td>-->
- </tr>
+ <tbody>
+ <tr>
+ <td class="label">Send Immediately</td>
+ <td>
+ <input type="checkbox" ng-model="now" ng-change="checkNow()" ng-true-value="1" ng-false-value="0"/>
+ </td>
+ <tr ng-show="now==0">
+ <td class="label">OR</td>
+ </tr>
+ <tr ng-show="now==0">
+ <td class="label">Schedule Mailing</td>
+ <td>
+ <input type="text" class="dateplugin" chsdate ng-model="scheddate.date" >
+ </td>
+ <td class="label" >Time</td>
+ <td>
+ <input type="text" placeholder="hh:mm" ng-model="scheddate.time" checktimeentry required>
+ </td>
+ <!--<td>
+ <input type="text" ng-model="scheddate.time">
+ </td>-->
+ </tr>
- </tbody>
+ </tbody>
</table>
<div id="help" ng-show="now==0">
- Enter the time in the 12:32 format where 12 is the hour, 32 the minutes.
+ Enter the time in the 12:32 format where 12 is the hour, 32 the minutes.
</div>
<br>
<form name="editMailingFormStep3" unsaved-warning-form>
<br>
<div class="crm-block crm-form-block crmMailing">
- <div id="prevmail" ng-show = "pre">
+ <div id="prevmail" ng-show="pre">
<div ui-jq="tabs" id="settings">
<ul>
<li>
</div>
- <!--<div class="crm-accordion-wrapper collapsed" ng-click = "preview_update()" >
+ <!--<div class="crm-accordion-wrapper collapsed" ng-click="preview_update()" >
<div class="crm-accordion-header">Preview</div>
<div class="crm-accordion-body" ng-include="partialUrl('previewMailing.html')"></div>
</div>-->
<br>
<div class="crm-submit-buttons">
<span class="crm-button">
- <input prevtab type="submit" class="crm-button" value = "Previous" />
+ <input prevtab type="submit" class="crm-button" value="Previous" />
</span>
<span class="crm-button">
- <input type="submit" class="crm-button" ng-click="preview_update()" value = "Preview" />
+ <input type="submit" class="crm-button" ng-click="preview_update()" value="Preview" />
</span>
<span class="crm-button">
- <input type= "submit" ng-click="editMailingFormStep3.$setPristine(); submitButton()" value="Submit Mailing" />
+ <input type="submit" ng-click="editMailingFormStep3.$setPristine(); submitButton()" value="Submit Mailing" />
</span>
<span class="crm-button">
- <input type= "submit" ng-click="back()" value="Continue Later" />
+ <input type="submit" ng-click="back()" value="Continue Later" />
</span>
</div>
-->
<table class="form-layout-compressed">
- <tbody>
- <tr>
- <td class="label">Send to address</td>
- <td>
- <input type="text" ng-model="testMailing.name" />
- </td>
- </tr>
- <tr>
- <td class="label">Send to this Group</td>
- <td>
- <select style="width: 200px" ng-model="testMailing.group">
- <option value="">-none-</option>
- <option ng-repeat="grp in groupNamesList| filter: isGrp" value="{{grp.id}}" > {{grp.title}} </option>
- </select>
- </td>
- </tr>
- <tr>
- <td>
- <button class="crm-submit-buttons crm-button" id="testbutton" ng-click="sendTest()">Send a Test Mailing</button>
- </td>
- </tr>
- </tbody>
+ <tbody>
+ <tr>
+ <td class="label">Send to address</td>
+ <td>
+ <input type="text" ng-model="testMailing.name" />
+ </td>
+ </tr>
+ <tr>
+ <td class="label">Send to this Group</td>
+ <td>
+ <select style="width: 200px" ng-model="testMailing.group">
+ <option value="">-none-</option>
+ <option ng-repeat="grp in groupNamesList| filter: isGrp" value="{{grp.id}}" > {{grp.title}} </option>
+ </select>
+ </td>
+ </tr>
+ <tr>
+ <td>
+ <button class="crm-submit-buttons crm-button" id="testbutton" ng-click="sendTest()">Send a Test Mailing</button>
+ </td>
+ </tr>
+ </tbody>
</table>
-->
<table class="form-layout-compressed">
- <tbody>
- <tr>
- <td>
- <h3> Tracking</h3>
- </td>
- </tr>
- <tr>
- <td>
- <input type="checkbox" ng-model="currentMailing.url_tracking" ng-true-value="1" ng-false-value="0">  Track Click Throughs</input>
- </td>
- </tr>
- <tr>
- <td>
- <div id="help">
- Track the number of times recipients click each link in this mailing. NOTE: When this feature is enabled, all links in the message body will be automaticallly re-written to route through your CiviCRM server prior to redirecting to the target page.
- </div>
- </td>
- </tr>
- <tr>
- <td>
- <input type="checkbox" ng-model="currentMailing.open_tracking" ng-true-value="1" ng-false-value="0">  Track Opens</input>
- </td>
- </tr>
- <tr>
- <td>
- <div id="help">
- Track the number of times recipients open this mailing in their email software.
- </div>
- </td>
- </tr>
- <tr>
- <td>
- <h3>Responding</h3>
- </td>
- </tr>
- <tr>
- <td>
- <input type="checkbox" ng-model="trackreplies" ng-change= "reply()" ng-true-value="1" ng-false-value="0">  Track Replies</input>
- </td>
- </tr>
- <tr>
- <td>
- <div id="help">
- Recipients' replies are sent to a CiviMail specific address instead of the sender's address so they can be stored within CiviCRM.
- </div>
- </td>
- </tr>
- <tr ng-show= "trackr(trackreplies)">
- <td>
- <input type="checkbox" ng-model="currentMailing.forward_replies" ng-true-value="1" ng-false-value="0">  Forward Replies</input>
- </td>
- </tr>
- <tr ng-show= "trackr(trackreplies)">
- <td>
- <div id="help">
- If a recipient replies to this mailing, forward the reply to the FROM Email address specified for the mailing.
- </div>
- </td>
- </tr>
- <tr ng-show= "trackr(trackreplies)">
- <td>
- <input type="checkbox" ng-model="currentMailing.auto_responder" ng-true-value="1" ng-false-value="0">  Auto-Respond to Replies    </input>
- <select ng-model="mailAutoResponder" ng-options="au.id as au.name for au in headerfooter| filter:isAuto">
- <option value="">-none-</option>
- </select>
- </td>
- </tr>
- <tr ng-show= "trackr(trackreplies)">
- <td>
- <div id="help">
- If a recipient replies to this mailing, send an automated reply using the selected message.
- </div>
- </td>
- </tr>
- <tr>
- <td>
- <h3> Online Publication</h3>
- </td>
- </tr>
+ <tbody>
+ <tr>
+ <td>
+ <h3> Tracking</h3>
+ </td>
+ </tr>
+ <tr>
+ <td>
+ <input type="checkbox" ng-model="currentMailing.url_tracking" ng-true-value="1" ng-false-value="0">  Track Click Throughs</input>
+ </td>
+ </tr>
+ <tr>
+ <td>
+ <div id="help">
+ Track the number of times recipients click each link in this mailing. NOTE: When this feature is enabled, all links in the message body will be automaticallly re-written to route through your CiviCRM server prior to redirecting to the target page.
+ </div>
+ </td>
+ </tr>
+ <tr>
+ <td>
+ <input type="checkbox" ng-model="currentMailing.open_tracking" ng-true-value="1" ng-false-value="0">  Track Opens</input>
+ </td>
+ </tr>
+ <tr>
+ <td>
+ <div id="help">
+ Track the number of times recipients open this mailing in their email software.
+ </div>
+ </td>
+ </tr>
+ <tr>
+ <td>
+ <h3>Responding</h3>
+ </td>
+ </tr>
+ <tr>
+ <td>
+ <input type="checkbox" ng-model="trackreplies" ng-change="reply()" ng-true-value="1" ng-false-value="0">  Track Replies</input>
+ </td>
+ </tr>
+ <tr>
+ <td>
+ <div id="help">
+ Recipients' replies are sent to a CiviMail specific address instead of the sender's address so they can be stored within CiviCRM.
+ </div>
+ </td>
+ </tr>
+ <tr ng-show="trackr(trackreplies)">
+ <td>
+ <input type="checkbox" ng-model="currentMailing.forward_replies" ng-true-value="1" ng-false-value="0">  Forward Replies</input>
+ </td>
+ </tr>
+ <tr ng-show="trackr(trackreplies)">
+ <td>
+ <div id="help">
+ If a recipient replies to this mailing, forward the reply to the FROM Email address specified for the mailing.
+ </div>
+ </td>
+ </tr>
+ <tr ng-show="trackr(trackreplies)">
+ <td>
+ <input type="checkbox" ng-model="currentMailing.auto_responder" ng-true-value="1" ng-false-value="0">  Auto-Respond to Replies    </input>
+ <select ng-model="mailAutoResponder" ng-options="au.id as au.name for au in headerfooter| filter:isAuto">
+ <option value="">-none-</option>
+ </select>
+ </td>
+ </tr>
+ <tr ng-show="trackr(trackreplies)">
+ <td>
+ <div id="help">
+ If a recipient replies to this mailing, send an automated reply using the selected message.
+ </div>
+ </td>
+ </tr>
+ <tr>
+ <td>
+ <h3> Online Publication</h3>
+ </td>
+ </tr>
</table>
<table class="form-layout-compressed">
- <tr>
- <td class="label">Mailing Visibility</td>
- <td>
- <select ng-model="currentMailing.visibility">
- <option value="Public Pages">Public Pages</option>
- <option value="User and User Admin Only">User and User Admin Only</option>
- </select>
- </td>
- </tbody>
+ <tr>
+ <td class="label">Mailing Visibility</td>
+ <td>
+ <select ng-model="currentMailing.visibility">
+ <option value="Public Pages">Public Pages</option>
+ <option value="User and User Admin Only">User and User Admin Only</option>
+ </select>
+ </td>
+ </tbody>
</table>
<body>
<table>
- <tr>
- <td class="label">Upload TEXT Message</td>
- <td>
- <input type="file"/>
- </td>
- </tr>
- <tr>
- <td class="label">Upload HTML Message</td>
- <td>
- <input type="file"/>
- </td>
- </tr>
+ <tr>
+ <td class="label">Upload TEXT Message</td>
+ <td>
+ <input type="file"/>
+ </td>
+ </tr>
+ <tr>
+ <td class="label">Upload HTML Message</td>
+ <td>
+ <input type="file"/>
+ </td>
+ </tr>
</table>
</body>