Fix MailSettings add path
authorlarssandergreen <lars@wildsight.ca>
Mon, 7 Aug 2023 05:49:20 +0000 (23:49 -0600)
committerlarssandergreen <lars@wildsight.ca>
Mon, 7 Aug 2023 05:49:20 +0000 (23:49 -0600)
CRM/Core/BAO/MailSettings.php
ext/oauth-client/CRM/OAuth/MailSetup.php
templates/CRM/Admin/Form/MailSettings.hlp [moved from templates/CRM/Admin/Page/MailSettings.hlp with 100% similarity]
templates/CRM/Admin/Page/MailSettings.tpl

index 7b13eca10882bd79714bb8592cf53a9fc823b88e..1519394d031bde6ca2e11358e16af6476f0e7402 100644 (file)
@@ -36,7 +36,7 @@ class CRM_Core_BAO_MailSettings extends CRM_Core_DAO_MailSettings {
 
   public static function setupStandardAccount($setupAction) {
     return [
-      'url' => CRM_Utils_System::url('civicrm/admin/mailSettings', 'action=add&reset=1', TRUE, NULL, FALSE),
+      'url' => CRM_Utils_System::url('civicrm/admin/mailSettings/edit', 'action=add&reset=1', TRUE, NULL, FALSE),
     ];
   }
 
index 42442c0a5ced5b7852f98e533a82bfe65f696776..d55f15ebd30fe0aff2f0af16229125a596aea654 100644 (file)
@@ -90,7 +90,7 @@ class CRM_OAuth_MailSetup {
       'info'
     );
 
-    $nextUrl = CRM_Utils_System::url('civicrm/admin/mailSettings', [
+    $nextUrl = CRM_Utils_System::url('civicrm/admin/mailSettings/edit', [
       'action' => 'update',
       'id' => $mailSettings['id'],
       'reset' => 1,
index c8a1fdf12b7b4018cd6cf3f8778422b6134a1385..35aa2cd59b2820b81a0095a5a5cc67073b7b75c1 100644 (file)
@@ -7,9 +7,6 @@
  | and copyright information, see https://civicrm.org/licensing       |
  +--------------------------------------------------------------------+
 *}
-{if $action eq 1 or $action eq 2 or $action eq 8}
-   {include file="CRM/Admin/Form/MailSettings.tpl"}
-{else}
 
 <div class="crm-block crm-content-block">
 {if $rows}
         </form>
     {else}
         <div class="action-link">
-            {crmButton q="action=add&reset=1" id="newMailSettings"  icon="plus-circle"}{ts}Add Mail Account{/ts}{/crmButton}
+            {crmButton p="civicrm/admin/mailSettings/edit" q="action=add&reset=1" id="newMailSettings"  icon="plus-circle"}{ts}Add Mail Account{/ts}{/crmButton}
             {crmButton p="civicrm/admin" q="reset=1" class="cancel" icon="times"}{ts}Done{/ts}{/crmButton}
         </div>
     {/if}
-
-{/if}
 </div>
 {literal}
     <script type="text/javascript">