Added more "Merge Tags" and print button to merge tags reference.
authorChuck Scott <cscott@gaslightmedia.com>
Thu, 21 Jun 2018 17:56:21 +0000 (13:56 -0400)
committerChuck Scott <cscott@gaslightmedia.com>
Thu, 21 Jun 2018 17:56:21 +0000 (13:56 -0400)
classes/regCartSupport.php
setup/databaseScripts/create_database_V1.0.0.sql
views/admin/settings/registrationsMisc.html

index a4f9d65..d6c98b1 100644 (file)
@@ -1406,6 +1406,13 @@ class GlmRegCartSupport
         $account = $this->cart['accounts'][$this->cart['request']['account']];
 
         $viewData = array(
+            'OrgName'                   => $this->config['settings']['reg_org_name'],
+            'OrgAddress'                => $this->config['settings']['reg_org_address'],
+            'OrgCity'                   => $this->config['settings']['reg_org_city'],
+            'OrgState'                  => $this->config['settings']['reg_org_state'],
+            'OrgZip'                    => $this->config['settings']['reg_org_zip'],
+            'OrgPhone'                  => $this->config['settings']['reg_org_phone'],
+            'OrgEmail'                  => $this->config['settings']['reg_org_from_email'],
             'SubmittedByFirstName'      => $account['fname'],
             'SubmittedByLastName'       => $account['lname'],
             'SubmittedByTitle'          => $account['title'],
index 06ae576..54bc4d0 100644 (file)
@@ -798,16 +798,45 @@ INSERT INTO {prefix}misc
     'Text for top of Checkout Page',
     'Text for top of Summary Page',
     'Terms and Conditions',
-    'Subject of notification to site owner of a registration',
-    'Text of notification to site owner of a registration',
-    'Subject of notification to instructor of registration',
-    'Text for notification to instructor of registration',
-    'Subject of notification to person submitting registration',
-    'Text of notification to person submitting registration',
-    'Subject for notification to registrant',
-    'Text for notification to registrant',
-    'Subject of acknowledgement to person submitting registration',
-    'Text of acknowledgement to person submitting registration',
-    'Subject of acknowledgement to registrant',
-    'Text of acknowledgement to registrant'
+    'Registration Request Submitted',
+    'A registration request has just been submitted to your site. 
+
+Sincerely,
+
+{$OrgName}
+{$OrgAddress}
+{$OrgCity}, {$OrgState} {$OrgZip}
+{$OrgPhone}
+{$OrgEmail}
+
+{$Summary}
+
+',
+    'Registration Submitted for {$EventName}',
+    'The following people were just registered for {$EventName}...
+
+{foreach $EventAttendees as $a}{$a.AttendeeFirstName} {$a.AttendeeLastName}
+{/foreach}
+',
+    'Registration Request Submitted',
+    'Thank you for submitting your event registration request.
+
+Below is a summary of your submission. Please contact us if you have any questions regarding this request.
+
+{$summary}',
+    'Your Registration for: {$EventName}',
+    'You have been registered for {$EventName} by {$SubmittedByFirstName} {$SubmittedByLastName}.
+
+Please let us know if you have any questions regarding your registration for this event.
+',
+    'Registration Request Updated',
+    'THIS MESSAGE TYPE IS NOT YET FUNCTIONAL
+
+The status of your registration request submitted on {$DateTimeSubmitted} has been updated to "{$Status}".
+
+Below is a copy of the request at the time it was submitted.
+
+{$Summary}',
+    'Your payment status for the event you are attending has been updated',
+    'TTHIS MESSAGE TYPE IS NOT YET FUNCTIONAL'
     );
index d13fc12..9565fd2 100644 (file)
                             {if $regMisc.fieldFail.summary_page_text}<p>{$regMisc.fieldFail.summary_page_text}</p>{/if}
                         </td>
                     </tr>
-                    <tr><td>&nbsp;</td><td class="glm-reg-message-section" style="padding-bottom: 2rem;"><h1>E-Mail Notifications</h1></td></tr>
+                    <tr><td>&nbsp;</td><td class="glm-reg-message-section" style="padding-bottom: 1em;"><h1>E-Mail Notifications</h1></td></tr>
+                    <tr><td>&nbsp;</td><td>See bottom of page for list of available merge tags.</td></tr>
                     <tr><td>&nbsp;</td><td><h3 class="glm-reg-message-title">Notification to Site Owner</h3></td></tr>
                     <tr>
                         <th {if $regMisc.fieldRequired.notify_subject}class="glm-required glm-right"{/if}>Subject:</th>
     </tr>
 </table>
 
+<script src="{$jsUrl}/PrintArea/jquery.PrintArea.js" type="text/JavaScript" language="javascript"></script>
+<div class="button button-secondary tags-print" data-areaToPrint="mergeTagsPrintArea" style=" margin-top: 5em">Print Merge Tags Quick Reference Sheet</div>
+
+<div id="mergeTagsPrintArea" class="PrintArea" style="padding: 10px;">
 {literal}
-<h2 style="padding: 2em 0 1em 0">Merge Tags useable in E-Mail Notifications</h2>
+<h2 style="margin-bottom: 1em">Merge Tags useable in E-Mail Notifications</h2>
 <p> 
     The tags below may be used in the E-Mail Notifications above to include information from the submission. 
     This is equivelent to doing "Mail Merge" with a word processor. When including these tags include the 
 </style>
 <table>
     <tr><th colspan="3" style="text-align: left; text-decoration: underline;" >Available in All E-Mail Messages</th></tr>
+    <tr><td>&nbsp;</td><th class="merge-tag-title">{$OrgName}</th><td>Name of organization that owns this Website and is providing registrations.</td></tr>
+    <tr><td>&nbsp;</td><th class="merge-tag-title">{$OrgAddress}</th><td>Organization street address</td></tr>
+    <tr><td>&nbsp;</td><th class="merge-tag-title">{$OrgCity}</th><td>Organization city</td></tr>
+    <tr><td>&nbsp;</td><th class="merge-tag-title">{$OrgState}</th><td>Organization state</td></tr>
+    <tr><td>&nbsp;</td><th class="merge-tag-title">{$OrgZip}</th><td>Organization ZIP/p]ostal code</td></tr>
+    <tr><td>&nbsp;</td><th class="merge-tag-title">{$OrgPhone}</th><td>Organization phone numer</td></tr>
+    <tr><td>&nbsp;</td><th class="merge-tag-title">{$OrgEmail}</th><td>Organization E-Mail address</td></tr>
     <tr><td>&nbsp;</td><th class="merge-tag-title">{$SubmittedByFirstName}</th><td>First name of person submitting the request.</td></tr>
     <tr><td>&nbsp;</td><th class="merge-tag-title">{$SubmittedByLastName}</th><td>Last name of person submitting the request.</td></tr>
     <tr><td>&nbsp;</td><th class="merge-tag-title">{$SubmittedByTitle}</th><td>Title of person submitting the request.</td></tr>
     <tr><td colspan="3"><th>&nbsp;</th>
 </table>
 {/literal}
+</div>
+
+<script type="text/javascript">
+    jQuery(document).ready(function($) {
+
+        $("div.tags-print").click(function(){
+            var areaToPrint = $(this).attr('data-areaToPrint');
+            var position = $(this).offset();
+            $('#' + areaToPrint).printArea({
+                mode:       'popup',        //printable window is either iframe or browser popup
+                popHt:      500,            // popup window height
+                popWd:      1000,            // popup window width
+                popX:       200,            // popup window screen X position
+                popY:       200,            //popup window screen Y position
+                popTitle:   'Print Merge Tags Window',   // popup window title element
+                popClose:   true,           // popup window close after printing
+                extraCss:   '',             // Comma separated list of extra css to include
+                extraHead:  '',             // Comma separated list of extra elements to be appended to head tag
+                strict:     false           // strict or looseTransitional html 4.01 document standard or undefined to not include at all only for popup option
+            });
+       });
 
+    });
+</script>
 {include file='admin/settings/footer.html'}
\ No newline at end of file