diff --git a/modules/backend/views/mail/invite.htm b/modules/backend/views/mail/invite.htm index 4beef91d6..31745866e 100644 --- a/modules/backend/views/mail/invite.htm +++ b/modules/backend/views/mail/invite.htm @@ -1,14 +1,14 @@ -subject = "Welcome to October CMS" +subject = "Welcome to {{ appName }}" layout = "system" description = "Invite new admin to the site" == Hi {{ name }} -A user account has been created for you. +A user account has been created for you on **{{ appName }}**. {% component 'panel' %} -- Login: `{{ login }}` -- Password: `{{ password }}` +- Login: `{{ login ?: 'sample' }}` +- Password: `{{ password ?: '********' }}` {% endcomponent %} You can use the following link to sign in: diff --git a/modules/system/ServiceProvider.php b/modules/system/ServiceProvider.php index 53365f662..198d29434 100644 --- a/modules/system/ServiceProvider.php +++ b/modules/system/ServiceProvider.php @@ -2,6 +2,7 @@ use App; use Lang; +use View; use Event; use Config; use Backend; @@ -54,6 +55,7 @@ class ServiceProvider extends ModuleServiceProvider $this->registerMarkupTags(); $this->registerAssetBundles(); $this->registerValidator(); + $this->registerGlobalViewVars(); /* * Register other module providers @@ -518,4 +520,9 @@ class ServiceProvider extends ModuleServiceProvider }); }); } + + protected function registerGlobalViewVars() + { + View::share('appName', Config::get('app.name')); + } } diff --git a/modules/system/classes/MailManager.php b/modules/system/classes/MailManager.php index ce15600eb..634e4463e 100644 --- a/modules/system/classes/MailManager.php +++ b/modules/system/classes/MailManager.php @@ -1,7 +1,6 @@ $swiftMessage->getSubject(), - 'appName' => Config::get('app.name') + 'subject' => $swiftMessage->getSubject() ]; /* diff --git a/modules/system/helpers/View.php b/modules/system/helpers/View.php index ba946bf13..73f0e533b 100644 --- a/modules/system/helpers/View.php +++ b/modules/system/helpers/View.php @@ -2,6 +2,16 @@ use View as ViewFacade; +/** + * This helper class is used to extract basic variables + * (scalar or array) from the global `View` Facade. + * + * You can register these global variables with `View::share`. + * + * View::share('siteName', 'OctoberCMS'); + * + * Then available globally for use in the front-end and mail templates. + */ class View { /** diff --git a/modules/system/models/mailbrandsetting/custom.less b/modules/system/models/mailbrandsetting/custom.less index 05cbe094c..430f50bbc 100644 --- a/modules/system/models/mailbrandsetting/custom.less +++ b/modules/system/models/mailbrandsetting/custom.less @@ -201,6 +201,10 @@ img { padding: 35px; } +.wrapper.layout-system .content-cell { + padding: 35px 0; +} + /* Buttons */ .action { diff --git a/modules/system/views/mail/layout-default.htm b/modules/system/views/mail/layout-default.htm index a6549550d..95401bbc0 100644 --- a/modules/system/views/mail/layout-default.htm +++ b/modules/system/views/mail/layout-default.htm @@ -14,7 +14,7 @@ name = "Default layout" {{ css|raw }} - +
{% component 'header' %} diff --git a/modules/system/views/mail/layout-system.htm b/modules/system/views/mail/layout-system.htm index 6ef0596a6..7b39f7244 100644 --- a/modules/system/views/mail/layout-system.htm +++ b/modules/system/views/mail/layout-system.htm @@ -18,7 +18,7 @@ This is an automatic message. Please do not reply to it. {{ css|raw }} -
+