add message template meta data and option to select email template
authorKurund Jalmi <kurundjalmi@thirdsectordesign.org>
Mon, 21 Aug 2023 14:44:40 +0000 (15:44 +0100)
committerKurund Jalmi <kurundjalmi@thirdsectordesign.org>
Wed, 6 Dec 2023 00:23:33 +0000 (00:23 +0000)
CRM/Core/DAO/MessageTemplate.php
ext/afform/admin/ang/afGuiEditor/config-form.html
xml/schema/Core/MessageTemplate.xml

index fd7f5cafd221c3384c8bfc225962e0c704e6870d..74a8c01112842aa16ac366bea01e838741851702 100644 (file)
@@ -23,6 +23,13 @@ class CRM_Core_DAO_MessageTemplate extends CRM_Core_DAO {
    */
   public static $_tableName = 'civicrm_msg_template';
 
+  /**
+   * Icon associated with this entity.
+   *
+   * @var string
+   */
+  public static $_icon = 'fa-newspaper-o';
+
   /**
    * Field to show when displaying a record.
    *
index 126841257b5dc5ce0b264f0bf5bb4affaed60af0..2b5215f184533d3f3ad38f5ff07ad04fb2c80b4e 100644 (file)
       {{:: ts('Submissions') }}
     </legend>
 
-<<<<<<< HEAD
     <p class="form-inline">
       <label class="radio">
         <input class="crm-form-radio" type="radio" name="submit_enabled" ng-model="editor.afform.submit_enabled" ng-value="true">
         {{:: ts('Open') }}
-=======
-    <div class="form-group" >
-      <label>
-        <input type="checkbox" ng-model="editor.afform.create_submission" ng-class="{'disabled': !!editor.afform.manual_processing}">
-        {{:: ts('Log Submissions') }}
->>>>>>> c04192a7f4 (add manual processing option)
       </label>
       <label class="radio">
         <input class="crm-form-radio" type="radio" name="submit_enabled" ng-model="editor.afform.submit_enabled" ng-value="false">
           {{:: ts('Allow verification by email') }}
         </label>
         <p class="help-block">{{:: ts('The data will be processed and stored in CiviCRM after email verfication. Email field is required if you enable this setting.') }}</p>
+        <div class="form-inline" ng-if="editor.afform.allow_verification_by_email">
+          <label>{{:: ts('Email template') }}</label>
+          <input class="form-control" crm-autocomplete="'MessageTemplate'" ng-model="editor.afform.email_confirmation_template_id" auto-open="true" placeholder="{{:: ts('- select -') }}">
+        </div>
       </div>
 
       <div class="form-group" ng-class="{'has-error': !!config_form.redirect.$error.pattern}">
index ea6a8842eac0b984adf0165f563ecb3fc058eb77..384f46a8a92419aac4da9e1e96dd4c03d641f021 100644 (file)
@@ -6,6 +6,9 @@
   <name>civicrm_msg_template</name>
   <comment>Users will need a way to save and retrieve templates with tokens for use in recurring email communication tasks</comment>
   <add>1.6</add>
+  <title>Message Template</title>
+  <titlePlural>Message Templates</titlePlural>
+  <icon>fa-newspaper-o</icon>
   <labelField>msg_title</labelField>
   <paths>
     <add>civicrm/admin/messageTemplates/add?action=add&amp;reset=1</add>