minor changes
authoraditya-nambiar <aditya.nambiar007@gmail.com>
Tue, 15 Jul 2014 12:16:30 +0000 (17:46 +0530)
committeraditya-nambiar <aditya.nambiar007@gmail.com>
Sat, 26 Jul 2014 04:51:00 +0000 (10:21 +0530)
js/angular-crmMailingAB.js
partials/abtesting/attachments.html [new file with mode: 0644]
partials/abtesting/composeonScreen.html [new file with mode: 0644]
partials/abtesting/from_name.html
partials/abtesting/headerandFooter.html [new file with mode: 0644]
partials/abtesting/main.html
partials/abtesting/subject_lines.html
partials/abtesting/trackandRespond.html [new file with mode: 0644]
partials/abtesting/two_emails.html
partials/abtesting/uploadContent.html [new file with mode: 0644]
xml/schema/Mailing/MailingAB.xml

index 8fd19d283f3115e4acd738a1ed1295a29a86a107..89860a2840646b13985ddf8b1a8eba97b9d947cb 100644 (file)
@@ -7,8 +7,8 @@
 
     var partialUrl = function(relPath) {
         //console.log(CRM.resourceUrls['civicrm']);
-        //return CRM.resourceUrls['civicrm'] + '/partials/abtesting/' + relPath;
-        return '/drupal-7.28/sites/all/modules/civicrm/partials/abtesting/' + relPath;
+        return CRM.resourceUrls['civicrm'] + '/partials/abtesting/' + relPath;
+        //return '/drupal-7.28/sites/all/modules/civicrm/partials/abtesting/' + relPath;
 
 
     };
@@ -95,6 +95,8 @@
 
         $scope.send_date ="01/01/2000";
 
+        $scope.dt="";
+
         $scope.mailA={};
 
         $scope.mailB={};
         $scope.init=function(par){
 
             $scope.whatnext=par.toString()
-        }
+        };
+
+        $scope.setdate= function(par){
+            console.log("called")
+            console.log("av "+par)
+            $scope.send_date =par;
+            $scope.dt=par;
+            $scope.apply();
+        };
+
+        $scope.scheddate={};
+        $scope.scheddate.date = "6";
+        $scope.scheddate.time = "";
 
 
     });
            link: function(scope,element, attrs){
                $(element).select2({width:"400px",placeholder: "Select the groups you wish to include"});
                $(element).select2("data",groups)
+               function format(item) {
+                   if(!item.id) {
+                       // return `text` for optgroup
+                       return item.text;
+                   }
+                   // return item template
+                   var a = item.id.split(" ");
+                   if(a[1]=="group" && a[2]=="include")
+                       return "<img src='../../sites/all/modules/civicrm/i/include.jpeg' height=12 width=12/>" + " " + "<img src='../../sites/all/modules/civicrm/i/group.png' height=12 width=12/>" + item.text;
+                   if(a[1]=="group" && a[2]=="exclude")
+                       return "<img src='../../sites/all/modules/civicrm/i/Error.gif' height=12 width=12/>" + " " + "<img src='../../sites/all/modules/civicrm/i/group.png' height=12 width=12/>" + item.text;
+                   if(a[1]=="mail" && a[2]=="include")
+                       return "<img src='../../sites/all/modules/civicrm/i/include.jpeg' height=12 width=12/>" + " " + "<img src='../../sites/all/modules/civicrm/i/EnvelopeIn.gif' height=12 width=12/>" + item.text;
+                   if(a[1]=="mail" && a[2]=="exclude")
+                       return "<img src='../../sites/all/modules/civicrm/i/Error.gif' height=12 width=12/>" + " " + "<img src='../../sites/all/modules/civicrm/i/EnvelopeIn.gif' height=12 width=12/>" + item.text;
+               }
+
+               $(element).select2({
+                   width:"400px",
+                   placeholder: "Select the groups you wish to include",
+                   formatResult: format,
+                   formatSelection: format,
+                   escapeMarkup: function(m) { return m; }
+               });
            }
        };
 
 
     crmMailingAB.directive('datepick',function(){
         return {
-            scope :{
-                foo : '=send_date'
-            },
+
+
           restrict: 'AE',
           link: function(scope,element,attrs){
                 $(element).datepicker({
+                    dateFormat: "yy-mm-dd",
                     onSelect: function(date) {
                         $(".ui-datepicker a").removeAttr("href");
-                        scope.foo =date;
-                        console.log(date);
+
+                        scope.scheddate.date=date.toString();
+                        scope.$apply();
+                        console.log(scope.scheddate.date);
+
                     }
+
+
                 });
             }
         };
         };
     });
 
+    crmMailingAB.directive('cancelbutton',function(){
+        return {
+            restrict: 'AE',
+            replace:'true',
+            template:'<div class="crm-submit-buttons" id="campaignbutton">'+
+                '<div class = "crm-button crm-button-type-upload crm-button_qf_Contact_upload_view"   >' +
+                '<input type="submit" value="Cancel"  id="campaignbutton _qf_Contact_upload_view-top" class="btn btn-primary" >'+
+                '</div></div>'
+
+        };
+    });
+
     crmMailingAB.directive('prevbutton',function(){
         return {
             restrict: 'AE',
diff --git a/partials/abtesting/attachments.html b/partials/abtesting/attachments.html
new file mode 100644 (file)
index 0000000..e9fb793
--- /dev/null
@@ -0,0 +1,34 @@
+<!-- will use Controller: browse -->
+<body>
+<table>
+    <tr>
+        <td class="label">Attach Files</td>
+        <td>
+            <input type="file" data-file="param.file"/>
+        </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>
\ No newline at end of file
diff --git a/partials/abtesting/composeonScreen.html b/partials/abtesting/composeonScreen.html
new file mode 100644 (file)
index 0000000..32f95c0
--- /dev/null
@@ -0,0 +1 @@
+hi
\ No newline at end of file
index 90455b81813285d03ec5d67f5b69c487b928893e..e6484d8d2070a17978a310c2fb374562499e5339 100644 (file)
 
 <div>
 
-    <br><br>
-    <pre>
+<table class="form-layout-compressed">
+    <tbody>
+    <tr>
+        <td class="label">From E-mail Address A</td>
+        <td>
+            <select style="width: 200px" ng-model="currentMailing.from_email" ng-options="frm.email as frm.email for frm in eMailing">
+                <option value="">-none-</option>
+            </select>
+        </td>
+    </tr>
+    <tr>
+        <td class="label">From E-mail Address B</td>
+        <td>
+            <select style="width: 200px" ng-model="currentMailing.from_email" ng-options="frm.email as frm.email for frm in eMailing">
+                <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 eMailing">
+                <option value="">-none-</option>
+            </select>
+        </td>
+    </tr>
+    <tr>
+        <td class="label">Mailing Subject</td>
+        <td>
+            <input placeholder="Enter Subject"  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">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>
+    <tr ng-show= "false">
+        <td class="label">I want to</td>
+        <td class="label">Compose on screen</td>
+        <td><input type="radio" ng-model="composeS" value="1" /></td>
+        <td class="label">Upload Content</td>
+        <td><input type="radio" ng-model="composeS" value="0" /></td>
+    </tr>
+    </tbody>
+</table>
 
-        From Email Address A: <input type="text" ng-model="mailA.fromEmail"><br>
-        From Email Address B: <input type="text" ng-model="mailB.fromEmail"><br>
-        Use Template : <input type="text"><br>
-        Mail Subject: <input type="text" ng-model="mailA.subj" ><br>
+<br>
+<div class="crm-accordion-wrapper collapsed" >
+    <div class="crm-accordion-header">Compose on Screen</div>
+    <div class="crm-accordion-body"  >
 
-        <textarea rows="4" cols="50" ng-model="mailA.body" >
+        <br>
+        <div class="crm-accordion-wrapper collapsed">
+            <div class="crm-accordion-header">HTML Format</div>
+            <div class="crm-accordion-body">
+                <br>
+                &nbsp &nbsp &nbsp &nbsp
+                <textarea ng-model="currentMailing.body_html" style="width: 600px; height: 300px;"></textarea>
+                <br> <br>
+            </div>
+        </div>
 
-        </textarea>
+        <div class="crm-accordion-wrapper collapsed">
+            <div class="crm-accordion-header">Plain Text</div>
+            <div class="crm-accordion-body" >
 
+                <br>
+                &nbsp &nbsp &nbsp &nbsp
+                <textarea ng-model="currentMailing.body_text" style="width: 600px; height: 300px;"></textarea>
+                <br> <br>
+            </div>
+        </div>
 
-        <span ng-init="init('3')" ></span>
+        <table>
+            <tr ng-show= "false">
+                <td>
+                    <input type="checkbox">&nbsp Save Template</input>
+            </tr>
+        </table>
 
-    </pre>
+
+
+
+    </div>
+</div>
+<div class="crm-accordion-wrapper collapsed" ng-show='false'>
+    <div class="crm-accordion-header">Upload Content</div>
+    <div class="crm-accordion-body" >
+
+        <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>
+        </table>
+
+        </body>
+    </div>
+</div>
+<div class="crm-accordion-wrapper collapsed" >
+    <div class="crm-accordion-header">Attachments</div>
+    <div class="crm-accordion-body" >
+
+        <!-- will use Controller: browse -->
+        <body>
+        <table>
+            <tr>
+                <td class="label">Attach Files</td>
+                <td>
+                    <input type="file" data-file="param.file"/>
+                </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>
+    </div>
+</div>
+<div class="crm-accordion-wrapper collapsed">
+    <div class="crm-accordion-header">Header and Footer</div>
+    <div class="crm-accordion-body" >
+
+        <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>
+        </table>
+        </body>
+    </div>
+</div>
+<div class="crm-accordion-wrapper collapsed">
+    <div class="crm-accordion-header">Track and Respond</div>
+    <div class="crm-accordion-body" >
+
+        <table class="form-layout-compressed">
+            <tbody>
+            <tr>
+                <td>
+                    <h3 style ="text-decoration:underline"> Tracking</h3>
+                </td>
+            </tr>
+            <tr>
+                <td>
+                    <input type="checkbox" ng-model="currentMailing.url_tracking" ng-true-value="1" ng-false-value="0">&nbsp 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">&nbsp 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 style ="text-decoration:underline">Responding</h3>
+                </td>
+            </tr>
+            <tr>
+                <td>
+                    <input type="checkbox" ng-model="trackreplies" ng-change= "reply()" ng-true-value="1" ng-false-value="0">&nbsp 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">&nbsp 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">&nbsp Auto-Respond to Replies &nbsp &nbsp</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 style ="text-decoration:underline"> 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>
+        </table>
+    </div>
+</div>
 </div>
\ No newline at end of file
diff --git a/partials/abtesting/headerandFooter.html b/partials/abtesting/headerandFooter.html
new file mode 100644 (file)
index 0000000..00bc81d
--- /dev/null
@@ -0,0 +1,25 @@
+<!--
+Controller: MailCtrl
+Required vars: currentMailing and headerfooter
+-->
+<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>
+</table>
+</body>
\ No newline at end of file
index 69a416129d3d9ebb304d879e92ae2f001ca197f3..0b2cbb2b3171f05a3ea2a75ea9fc775281703265 100644 (file)
@@ -2,7 +2,7 @@
 
 <div>
 
-    {{tab_val}}
+
     <div ui-jq="tabs" id="alltabs" >
         <ul>
 
@@ -21,7 +21,9 @@
                 &nbsp <input type="radio" ng-model="template" ng-value="templates[0]">  Subject Lines <br/><br>
                 &nbsp <input type="radio" ng-model="template" ng-value="templates[1]"> From Names <br/><br>
                 &nbsp <input type="radio" ng-model="template" ng-value="templates[2]"> Two different Emails <br/><br>
-                &nbsp <div style="position:relative; left:250px;" nextbutton></div>
+                &nbsp <div style="position:relative; left:200px; top: 30px;" nextbutton></div> <div style="position:relative; left:300px;" cancelbutton></div>
+
+
             </form>
         </div>
 
             <form>
             <div  ng-include="template.url">
             </div>
-                <div style="position:relative; left:200px; top:30px;" prevbutton></div><div style="position:relative; left:300px;"nextbutton></div>
+                <div style="position:relative; left:200px; top:60px;" prevbutton></div>
+                <div style="position:relative; left:295px; top: 30px;" nextbutton></div>
+                <div style="position:relative; left:375px;"cancelbutton></div>
+
             </form>
         </div>
 
 
             <form name="impform"  novalidate>
                 <h3>Select the groups you would like to add</h3><br>
-                &nbsp<select multiple groupselect required name ="grps" required ng-model="groups_selected">
-                <option ng-repeat="grp in groups" value={{grp.title}} >{{grp.title}}</option>
-            </select><br><br>
+
+
+                &nbsp<br>
+                <select multiple groupselect ng-model="incGroup">
+                    <option id= "1" ng-repeat="grp in groups" value="{{grp.id}} group include" > {{grp.title}} </option>
+                    <option ng-repeat="grp in groups" value="{{grp.id}} group exclude" > {{grp.title}} </option>
+                    <option ng-repeat="ml in mailList| filter:isCompMail" value="{{ml.id}} mail include" > {{ml.name}} </option>
+                    <option ng-repeat="ml in mailList| filter:isCompMail" value="{{ml.id}} mail exclude" > {{ml.name}} </option>
+                </select>
+                <br> <br><br><br>
 
 
                 <h3>Select the size of your test group</h3><br>
 
                 <div sliderbar id="trial" style="margin: 10px;"></div>
 
-                <h3 style="text-decoration: underline;">How will the winner be decided</h3><br>
+                <h3>How will the winner be decided</h3><br>
                 &nbsp <input type="radio" ng-model="winner_criteria" value="Open" name="cri" required> Open <br/><br>
                 &nbsp <input type="radio" ng-model="winner_criteria" value="Total Unique Clicks" name="cri" checked="checked" > Total Unique Clicks <br/><br>
                 &nbsp <input type="radio" ng-model="winner_criteria" value="Total Clicks on a particular link" name="cri" > Total Clicks on a particular link <br/><br>
-
+ <!-- Remove automated
                 <h3>Do you want the A/B test to be automated </h3>
                 &nbsp<input type="radio" ng-model="automated" value="Yes" ng-click="setifyes(1)" name="auto" required>Yes &nbsp
                 &nbsp<input type="radio" ng-model="automated" value="No" ng-click="setifyes(2)" name="auto" checked="checked"> No <br/><br>
@@ -72,7 +84,7 @@
                     <div nextbutton></div>
 
                 </tpmax>
-
+-->
                 <h3>Declare the winner in how much time?</h3><br>
                 &nbsp <input type="text" style="height: 20px; width: 15px;" ng-model="days" numbar=7 name="d"> Days
                 &nbsp <input type="text" style="height: 20px; width: 15px;" ng-model="hours" numbar=23 name="h"> Hours
@@ -82,7 +94,9 @@
                 <br>
 
 
-                <div style="position:relative; left:200px; top:30px;" prevbutton></div><div style="position:relative; left:300px;"nextbutton></div>
+                <div style="position:relative; left:200px; top:30px;" prevbutton></div>
+                <div style="position:relative; left:295px; top: 00px;" nextbutton></div>
+                <div style="position:relative; left:375px; top: -30px;" cancelbutton></div>
 
             </form>
         </div>
                  <td>Winner Criteria</td>
                  <td>{{winner_criteria}}</td>
             </tr>
-            <tr>
-                 <td>Automated</td>
-                 <td>{{automated}}</td>
-            </tr>
+
             <tr ng-show="automated=='Yes'">
                  <td>Minum Confidence Level</td>
                  <td>{{conf}}%</td>
             <input type="radio" name="Start" ng-model="start" value="now"> Now &nbsp
             <input type="radio" name="Start"  ng-model="start" value="later"> Later
 
-            &nbsp &nbsp <input type="text" datepick class = "dateplugin" ng-show="start=='later'" ng-model="send_date" >
+            &nbsp &nbsp <input type="text"  class = "dateplugin" ng-show="start=='later'" ng-model="send_date" datepick>
             </div>
+
+
             <br><br>
             <div>
-            <div style="position:relative; left:200px; top:30px;" prevbutton></div><div class="crm-submit-buttons"  style="position:relative; left:300px;">
-            <div class = "crm-button crm-button-type-upload crm-button_qf_Contact_upload_view"   >
-                <input type="submit" value="Submit & Send"  id="campaignbutton _qf_Contact_upload_view-top" class="btn btn-primary" nexttab={{tab_val}}>
-                </div></div></div>
+4
+                <div style="position:relative; left:200px; top:60px;" prevbutton></div>
+                <div class="crm-submit-buttons" style="position:relative; left:295px; top: 30px;" >
+                  <div class = "crm-button crm-button-type-upload crm-button_qf_Contact_upload_view"   >
+                  <input type="submit" value="Submit & Send"  id="campaignbutton _qf_Contact_upload_view-top" class="btn btn-primary" nexttab={{tab_val}}>
+                  </div>
+                </div>
+                <div style="position:relative; left:430px; top:-1px;" cancelbutton></div>
+
+            </div>
 
         </div>
     </div>
index c44a656783ac0ad9211ec1764c2b22be9b6adcaa..26f9b089dc968a6d83d8851c1bb4c3c962e8b887 100644 (file)
 
 <div>
 
-    <br><br>
-    <pre>
+<table class="form-layout-compressed">
+    <tbody>
+    <tr>
+        <td class="label">From E-mail Address </td>
+        <td>
+            <select style="width: 200px" ng-model="currentMailing.from_email" ng-options="frm.email as frm.email for frm in eMailing">
+                <option value="">-none-</option>
+            </select>
+        </td>
+    </tr>
 
-        From Email Address: <input type="text" ng-model="mailA.fromEmail"><br>
-        Use Template : <input type="text"><br>
-        Mail Subject A: <input type="text" ng-model="mailA.subj"><br>
-        Mail Subject B: <input type="text" ng-model="mailB.subj"><br>
+    <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 eMailing">
+                <option value="">-none-</option>
+            </select>
+        </td>
+    </tr>
+    <tr>
+        <td class="label">Mailing Subject A</td>
+        <td>
+            <input placeholder="Enter Subject"  name="subject" type="text" ng-model="currentMailing.subject"/>
+        </td>
+    </tr>
+    <tr>
+        <td class="label">Mailing Subject B</td>
+        <td>
+            <input placeholder="Enter Subject"  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">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>
+    <tr ng-show= "false">
+        <td class="label">I want to</td>
+        <td class="label">Compose on screen</td>
+        <td><input type="radio" ng-model="composeS" value="1" /></td>
+        <td class="label">Upload Content</td>
+        <td><input type="radio" ng-model="composeS" value="0" /></td>
+    </tr>
+    </tbody>
+</table>
 
-        <textarea rows="4" cols="50" ng-model="mailA.body">
+<br>
+<div class="crm-accordion-wrapper collapsed" >
+    <div class="crm-accordion-header">Compose on Screen</div>
+    <div class="crm-accordion-body"  >
 
-        </textarea>
+        <br>
+        <div class="crm-accordion-wrapper collapsed">
+            <div class="crm-accordion-header">HTML Format</div>
+            <div class="crm-accordion-body">
+                <br>
+                &nbsp &nbsp &nbsp &nbsp
+                <textarea ng-model="currentMailing.body_html" style="width: 600px; height: 300px;"></textarea>
+                <br> <br>
+            </div>
+        </div>
 
-        <span ng-init="init('2')" ></span>
+        <div class="crm-accordion-wrapper collapsed">
+            <div class="crm-accordion-header">Plain Text</div>
+            <div class="crm-accordion-body" >
 
+                <br>
+                &nbsp &nbsp &nbsp &nbsp
+                <textarea ng-model="currentMailing.body_text" style="width: 600px; height: 300px;"></textarea>
+                <br> <br>
+            </div>
+        </div>
 
-    </pre>
+        <table>
+            <tr ng-show= "false">
+                <td>
+                    <input type="checkbox">&nbsp Save Template</input>
+            </tr>
+        </table>
+
+
+
+
+    </div>
+</div>
+<div class="crm-accordion-wrapper collapsed" ng-show = 'false' >
+    <div class="crm-accordion-header">Upload Content</div>
+    <div class="crm-accordion-body" >
+
+        <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>
+        </table>
+
+        </body>
+    </div>
+</div>
+<div class="crm-accordion-wrapper collapsed" >
+    <div class="crm-accordion-header">Attachments</div>
+    <div class="crm-accordion-body" >
+
+        <!-- will use Controller: browse -->
+        <body>
+        <table>
+            <tr>
+                <td class="label">Attach Files</td>
+                <td>
+                    <input type="file" data-file="param.file"/>
+                </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>
+    </div>
+</div>
+<div class="crm-accordion-wrapper collapsed">
+    <div class="crm-accordion-header">Header and Footer</div>
+    <div class="crm-accordion-body" >
+
+        <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>
+        </table>
+        </body>
+    </div>
+</div>
+<div class="crm-accordion-wrapper collapsed">
+    <div class="crm-accordion-header">Track and Respond</div>
+    <div class="crm-accordion-body" >
+
+        <table class="form-layout-compressed">
+            <tbody>
+            <tr>
+                <td>
+                    <h3 style ="text-decoration:underline"> Tracking</h3>
+                </td>
+            </tr>
+            <tr>
+                <td>
+                    <input type="checkbox" ng-model="currentMailing.url_tracking" ng-true-value="1" ng-false-value="0">&nbsp 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">&nbsp 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 style ="text-decoration:underline">Responding</h3>
+                </td>
+            </tr>
+            <tr>
+                <td>
+                    <input type="checkbox" ng-model="trackreplies" ng-change= "reply()" ng-true-value="1" ng-false-value="0">&nbsp 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">&nbsp 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">&nbsp Auto-Respond to Replies &nbsp &nbsp</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 style ="text-decoration:underline"> 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>
+        </table>
+    </div>
+</div>
 </div>
\ No newline at end of file
diff --git a/partials/abtesting/trackandRespond.html b/partials/abtesting/trackandRespond.html
new file mode 100644 (file)
index 0000000..844eb09
--- /dev/null
@@ -0,0 +1,98 @@
+<!--
+Controller: MailCtrl
+Required vars: currentMailing
+-->
+
+<table class="form-layout-compressed">
+    <tbody>
+    <tr>
+        <td>
+            <h3 style ="text-decoration:underline"> Tracking</h3>
+        </td>
+    </tr>
+    <tr>
+        <td>
+            <input type="checkbox" ng-model="currentMailing.url_tracking" ng-true-value="1" ng-false-value="0">&nbsp 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">&nbsp 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 style ="text-decoration:underline">Responding</h3>
+        </td>
+    </tr>
+    <tr>
+        <td>
+            <input type="checkbox" ng-model="trackreplies" ng-change= "reply()" ng-true-value="1" ng-false-value="0">&nbsp 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">&nbsp 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">&nbsp Auto-Respond to Replies &nbsp &nbsp</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 style ="text-decoration:underline"> 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>
+</table>
\ No newline at end of file
index c5252d4322069a2e08f92725bd1121c46907ce4d..b0c20c2f0e5192c87fe12092453c8a5ba727cfcf 100644 (file)
       </ul>
 
       <div id="tabs-21">
-          From Email Address : <input type="text" ng-model="mailA.fromEmail"><br>
-          Use Template : <input type="text" ><br>
-          Mail Subject: <input type="text" ng-model="mailA.subj"><br>
+          <table class="form-layout-compressed">
+              <tbody>
+              <tr>
+                  <td class="label">From E-mail Address</td>
+                  <td>
+                      <select style="width: 200px" ng-model="currentMailing.from_email" ng-options="frm.email as frm.email for frm in eMailing">
+                          <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 eMailing">
+                          <option value="">-none-</option>
+                      </select>
+                  </td>
+              </tr>
+              <tr>
+                  <td class="label">Mailing Subject</td>
+                  <td>
+                      <input placeholder="Enter Subject"  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">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>
+              <tr ng-show= "false">
+                  <td class="label">I want to</td>
+                  <td class="label">Compose on screen</td>
+                  <td><input type="radio" ng-model="composeS" value="1" /></td>
+                  <td class="label">Upload Content</td>
+                  <td><input type="radio" ng-model="composeS" value="0" /></td>
+              </tr>
+              </tbody>
+          </table>
 
-          <textarea rows="4" cols="50" ng-model="mailA.body">
+          <br>
+          <div class="crm-accordion-wrapper collapsed" >
+              <div class="crm-accordion-header">Compose on Screen</div>
+              <div class="crm-accordion-body"  >
 
-          </textarea>
+                  <br>
+                  <div class="crm-accordion-wrapper collapsed">
+                      <div class="crm-accordion-header">HTML Format</div>
+                      <div class="crm-accordion-body">
+                          <br>
+                          &nbsp &nbsp &nbsp &nbsp
+                          <textarea ng-model="currentMailing.body_html" style="width: 600px; height: 300px;"></textarea>
+                          <br> <br>
+                      </div>
+                  </div>
 
+                  <div class="crm-accordion-wrapper collapsed">
+                      <div class="crm-accordion-header">Plain Text</div>
+                      <div class="crm-accordion-body" >
+
+                          <br>
+                          &nbsp &nbsp &nbsp &nbsp
+                          <textarea ng-model="currentMailing.body_text" style="width: 600px; height: 300px;"></textarea>
+                          <br> <br>
+                      </div>
+                  </div>
+
+                  <table>
+                      <tr ng-show= "false">
+                          <td>
+                              <input type="checkbox">&nbsp Save Template</input>
+                      </tr>
+                  </table>
+
+
+
+
+              </div>
+          </div>
+          <div class="crm-accordion-wrapper collapsed" ng-show="false">
+              <div class="crm-accordion-header">Upload Content</div>
+              <div class="crm-accordion-body" >
+
+                  <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>
+                  </table>
+
+                  </body>
+              </div>
+          </div>
+          <div class="crm-accordion-wrapper collapsed" >
+              <div class="crm-accordion-header">Attachments</div>
+              <div class="crm-accordion-body" >
+
+                  <!-- will use Controller: browse -->
+                  <body>
+                  <table>
+                      <tr>
+                          <td class="label">Attach Files</td>
+                          <td>
+                              <input type="file" data-file="param.file"/>
+                          </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>
+              </div>
+          </div>
+          <div class="crm-accordion-wrapper collapsed">
+              <div class="crm-accordion-header">Header and Footer</div>
+              <div class="crm-accordion-body" >
+
+                  <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>
+                  </table>
+                  </body>
+              </div>
+          </div>
+          <div class="crm-accordion-wrapper collapsed">
+              <div class="crm-accordion-header">Track and Respond</div>
+              <div class="crm-accordion-body" >
+
+                  <table class="form-layout-compressed">
+                      <tbody>
+                      <tr>
+                          <td>
+                              <h3 style ="text-decoration:underline"> Tracking</h3>
+                          </td>
+                      </tr>
+                      <tr>
+                          <td>
+                              <input type="checkbox" ng-model="currentMailing.url_tracking" ng-true-value="1" ng-false-value="0">&nbsp 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">&nbsp 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 style ="text-decoration:underline">Responding</h3>
+                          </td>
+                      </tr>
+                      <tr>
+                          <td>
+                              <input type="checkbox" ng-model="trackreplies" ng-change= "reply()" ng-true-value="1" ng-false-value="0">&nbsp 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">&nbsp 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">&nbsp Auto-Respond to Replies &nbsp &nbsp</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 style ="text-decoration:underline"> 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>
+                  </table>
+              </div>
+          </div>
 
       </div>
       <div id="tabs-22">
-          From Email Address : <input type="text" ng-model="mailB.fromEmail"><br>
-          Use Template : <input type="text"><br>
-          Mail Subject: <input type="text" ng-model="mailB.subj"><br>
+      <table class="form-layout-compressed">
+          <tbody>
+          <tr>
+              <td class="label">From E-mail Address</td>
+              <td>
+                  <select style="width: 200px" ng-model="currentMailing.from_email" ng-options="frm.email as frm.email for frm in eMailing">
+                      <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 eMailing">
+                      <option value="">-none-</option>
+                  </select>
+              </td>
+          </tr>
+          <tr>
+              <td class="label">Mailing Subject</td>
+              <td>
+                  <input placeholder="Enter Subject"  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">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>
+          <tr ng-show= "false">
+              <td class="label">I want to</td>
+              <td class="label">Compose on screen</td>
+              <td><input type="radio" ng-model="composeS" value="1" /></td>
+              <td class="label">Upload Content</td>
+              <td><input type="radio" ng-model="composeS" value="0" /></td>
+          </tr>
+          </tbody>
+      </table>
+
+      <br>
+      <div class="crm-accordion-wrapper collapsed" >
+          <div class="crm-accordion-header">Compose on Screen</div>
+          <div class="crm-accordion-body"  >
+
+              <br>
+              <div class="crm-accordion-wrapper collapsed">
+                  <div class="crm-accordion-header">HTML Format</div>
+                  <div class="crm-accordion-body">
+                      <br>
+                      &nbsp &nbsp &nbsp &nbsp
+                      <textarea ng-model="currentMailing.body_html" style="width: 600px; height: 300px;"></textarea>
+                      <br> <br>
+                  </div>
+              </div>
 
-          <textarea rows="4" cols="50" ng-model="mailB.body">
+              <div class="crm-accordion-wrapper collapsed">
+                  <div class="crm-accordion-header">Plain Text</div>
+                  <div class="crm-accordion-body" >
 
-          </textarea>
+                      <br>
+                      &nbsp &nbsp &nbsp &nbsp
+                      <textarea ng-model="currentMailing.body_text" style="width: 600px; height: 300px;"></textarea>
+                      <br> <br>
+                  </div>
+              </div>
 
+              <table>
+                  <tr ng-show= "false">
+                      <td>
+                          <input type="checkbox">&nbsp Save Template</input>
+                  </tr>
+              </table>
 
+
+
+
+          </div>
+      </div>
+      <div class="crm-accordion-wrapper collapsed" >
+          <div class="crm-accordion-header">Upload Content</div>
+          <div class="crm-accordion-body" >
+
+              <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>
+              </table>
+
+              </body>
+          </div>
+      </div>
+      <div class="crm-accordion-wrapper collapsed" >
+          <div class="crm-accordion-header">Attachments</div>
+          <div class="crm-accordion-body" >
+
+              <!-- will use Controller: browse -->
+              <body>
+              <table>
+                  <tr>
+                      <td class="label">Attach Files</td>
+                      <td>
+                          <input type="file" data-file="param.file"/>
+                      </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>
+          </div>
+      </div>
+      <div class="crm-accordion-wrapper collapsed">
+          <div class="crm-accordion-header">Header and Footer</div>
+          <div class="crm-accordion-body" >
+
+              <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>
+              </table>
+              </body>
+          </div>
+      </div>
+      <div class="crm-accordion-wrapper collapsed">
+          <div class="crm-accordion-header">Track and Respond</div>
+          <div class="crm-accordion-body" >
+
+              <table class="form-layout-compressed">
+                  <tbody>
+                  <tr>
+                      <td>
+                          <h3 style ="text-decoration:underline"> Tracking</h3>
+                      </td>
+                  </tr>
+                  <tr>
+                      <td>
+                          <input type="checkbox" ng-model="currentMailing.url_tracking" ng-true-value="1" ng-false-value="0">&nbsp 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">&nbsp 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 style ="text-decoration:underline">Responding</h3>
+                      </td>
+                  </tr>
+                  <tr>
+                      <td>
+                          <input type="checkbox" ng-model="trackreplies" ng-change= "reply()" ng-true-value="1" ng-false-value="0">&nbsp 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">&nbsp 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">&nbsp Auto-Respond to Replies &nbsp &nbsp</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 style ="text-decoration:underline"> 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>
+              </table>
+          </div>
+      </div>
       </div>
 
   </div>
diff --git a/partials/abtesting/uploadContent.html b/partials/abtesting/uploadContent.html
new file mode 100644 (file)
index 0000000..0993f2c
--- /dev/null
@@ -0,0 +1,17 @@
+<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>
+</table>
+
+</body>
\ No newline at end of file
index de42d4ee76a932b0a5df90083eeace5b9df29661..71f4ec31cc0a28772b5b2bf412b153ae20b64304 100644 (file)
@@ -3,7 +3,7 @@
 <table>
     <base>CRM/Mailing</base>
     <class>Mailing</class>
-    <name>civicrm_abtesting</name>
+    <name>civicrm_mailing_abtesting</name>
     <comment>Stores information about abtesting</comment>
     <archive>true</archive>
     <field>