Merge pull request #1744 from davecivicrm/CRM-13442b
authorKurund Jalmi <kurund@civicrm.org>
Mon, 7 Oct 2013 11:20:31 +0000 (04:20 -0700)
committerKurund Jalmi <kurund@civicrm.org>
Mon, 7 Oct 2013 11:20:31 +0000 (04:20 -0700)
CRM-13442 - Adding warning for 4.3 when admin switches from Redirect DB ...

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( );