CRM-15789 - Button cleanup
[civicrm-core.git] / templates / CRM / Admin / Form / Setting / Smtp.tpl
index bf3d06c09b761a5d7f102860e21ec2f814f2e51f..b8754c5cc8abf0b93be56eb99e37402e5974c693 100644 (file)
@@ -1,6 +1,6 @@
 {*
  +--------------------------------------------------------------------+
- | CiviCRM version 4.5                                                |
+ | CiviCRM version 4.6                                                |
  +--------------------------------------------------------------------+
  | Copyright CiviCRM LLC (c) 2004-2014                                |
  +--------------------------------------------------------------------+
 *}
 <div class="crm-block crm-form-block crm-smtp-form-block">
 <div id="help">
-    {ts}<p>CiviCRM offers several options to send emails. The default option should work fine on linux systems. If you are using windows, you probably need to enter settings for your SMTP/Sendmail server. You can send a test email to check your settings by clicking "Save and Send Test Email". If you're unsure of the correct values, check with your system administrator, ISP or hosting provider.</p>
-
-    <p>If you do not want users to send outbound mail from CiviCRM, select "Disable Outbound Email". NOTE: If you disable outbound email, and you are using Online Contribution pages or online Event Registration - you will need to disable automated receipts and registration confirmations.</p>
-
-   <p>If you choose Redirect to Database, all emails will be recorded as archived mailings instead of being sent out. They can be found in the civicrm_mailing_spool table in the CiviCRM database.</p>{/ts}
+  <p>{ts}CiviCRM offers several options to send emails. The default option should work fine on linux systems. If you are using windows, you probably need to enter settings for your SMTP/Sendmail server. You can send a test email to check your settings by clicking "Save and Send Test Email". If you're unsure of the correct values, check with your system administrator, ISP or hosting provider.{/ts}</p>
+  <p>{ts}If you do not want users to send outbound mail from CiviCRM, select "Disable Outbound Email". NOTE: If you disable outbound email, and you are using Online Contribution pages or online Event Registration - you will need to disable automated receipts and registration confirmations.{/ts}</p>
+  <p>{ts}If you choose Redirect to Database, all emails will be recorded as archived mailings instead of being sent out. They can be found in the civicrm_mailing_spool table in the CiviCRM database.{/ts}</p>
 
 </div>
      <table class="form-layout-compressed">
                     <tr class="crm-smtp-form-block-smtpServer">
                        <td class="label">{$form.smtpServer.label}</td>
                        <td>{$form.smtpServer.html}<br  />
-                            <span class="description">{ts}Enter the SMTP server (machine) name. EXAMPLE: smtp.example.com{/ts}</span>
+                            <span class="description">{ts}Enter the SMTP server (machine) name, such as "smtp.example.com".  If the server uses SSL, add "ssl://" to the beginning of the server name, such as "ssl://smtp.example.com".{/ts}</span>
                        </td>
                     </tr>
                     <tr class="crm-smtp-form-block-smtpPort">
                        <td class="label">{$form.smtpPort.label}</td>
                        <td>{$form.smtpPort.html}<br />
-                           <span class="description">{ts}The standard SMTP port is 25. You should only change that value if your SMTP server is running on a non-standard port.{/ts}</span>
+                           <span class="description">{ts}The most common SMTP port possibilities are 25, 465, and 587.  Check with your mail provider for the appropriate one.{/ts}</span>
                        </td>
                     </tr>
                     <tr class="crm-smtp-form-block-smtpAuth">
         <div class="spacer"></div>
         <div class="crm-submit-buttons">
             {include file="CRM/common/formButtons.tpl"}
-            <span class="place-left">&nbsp;</span>
-            <span class="crm-button crm-button-type-next crm-button_qf_Smtp_refresh_test">{$form._qf_Smtp_refresh_test.html}</span>
         </div>
 </div>
 
 {literal}
 <script type="text/javascript">
     CRM.$(function($) {
-      var mailSetting = cj("input[name='outBound_option']:checked").val( );
+      var mailSetting = $("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( ) ) ;
+        showHideMailOptions( $("input[name='outBound_option']:checked").val( ) ) ;
 
         function showHideMailOptions( value ) {
             switch( value ) {
               case "0":
-                cj("#bySMTP").show( );
-                cj("#bySendmail").hide( );
-                cj("#_qf_Smtp_refresh_test").show( );
+                $("#bySMTP").show( );
+                $("#bySendmail").hide( );
+                $("#_qf_Smtp_refresh_test").prop('disabled', false);
                 if (mailSetting == '5') {
                   alert(archiveWarning);
                 }
               break;
               case "1":
-                cj("#bySMTP").hide( );
-                cj("#bySendmail").show( );
-                cj("#_qf_Smtp_refresh_test").show( );
+                $("#bySMTP").hide( );
+                $("#bySendmail").show( );
+                $("#_qf_Smtp_refresh_test").prop('disabled', false);
                 if (mailSetting == '5') {
                   alert(archiveWarning);
                 }
               break;
               case "3":
-                cj('.mailoption').hide();
-                cj("#_qf_Smtp_refresh_test").show( );
+                $('.mailoption').hide();
+                $("#_qf_Smtp_refresh_test").prop('disabled', false);
                 if (mailSetting == '5') {
                   alert(archiveWarning);
                 }
               break;
               default:
-                cj("#bySMTP").hide( );
-                cj("#bySendmail").hide( );
-                cj("#_qf_Smtp_refresh_test").hide( );
+                $("#bySMTP").hide( );
+                $("#bySendmail").hide( );
+                $("#_qf_Smtp_refresh_test").prop('disabled', true);
             }
         }
 
-        cj("input[name='outBound_option']").click( function( ) {
-            showHideMailOptions( cj(this).val( ) );
+        $("input[name='outBound_option']").click( function( ) {
+            showHideMailOptions( $(this).val( ) );
         });
     });