CRM-13442 - Adding warning for 4.3 when admin switches from Redirect DB mode to a...
authorDave Greenberg <dave@civicrm.org>
Sun, 6 Oct 2013 21:57:20 +0000 (22:57 +0100)
committerDave Greenberg <dave@civicrm.org>
Sun, 6 Oct 2013 21:57:20 +0000 (22:57 +0100)
----------------------------------------
* CRM-13442: Update Outbound Email help text
  http://issues.civicrm.org/jira/browse/CRM-13442

templates/CRM/Admin/Form/Setting/Smtp.tpl

index 4edb6d7374c428a58e2894f81920866ea4f82432..17c29c20a8983a0b20401bd7b91b5d6c8d772a00 100644 (file)
 {literal}
 <script type="text/javascript">
     cj( function( ) {
+                       var mailSetting = cj("input[name='outBound_option']:checked").val( );
+
+                       var archiveWarning = "{/literal}{ts escape='js'}WARNING: You are switching from a testing mode (Redirect to Database) to a live mode. Check Mailings > Archived Mailings, and delete any test mailings that are not in Completed status prior to running the mailing cron job for the first time. This will ensure that test mailings are not actually sent out.{/ts}{literal}"
+
         showHideMailOptions( cj("input[name='outBound_option']:checked").val( ) ) ;
         
         function showHideMailOptions( value ) {
                 cj("#bySMTP").show( );
                 cj("#bySendmail").hide( );
                 cj("#_qf_Smtp_refresh_test").show( );
+                                                               if (mailSetting == '5') {
+                                                                       alert(archiveWarning);
+                                                               }
               break;
               case "1":
                 cj("#bySMTP").hide( );
                 cj("#bySendmail").show( );
                 cj("#_qf_Smtp_refresh_test").show( );
+                                                               if (mailSetting == '5') {
+                                                                       alert(archiveWarning);
+                                                               }
               break;
               case "3":
                 cj('.mailoption').hide();
                 cj("#_qf_Smtp_refresh_test").show( );
+                                                               if (mailSetting == '5') {
+                                                                       alert(archiveWarning);
+                                                               }
               break;
               default:
                 cj("#bySMTP").hide( );