Support for 4.4.13, 5.1.0, 5.1.1

This commit is contained in:
Nick Thompson 2024-09-24 20:11:19 -06:00
parent 8d13dfe46c
commit d8ca1a60c3
26 changed files with 76951 additions and 12 deletions

View file

@ -25,7 +25,7 @@ Mautic Whitelabeler makes customizing the core branding elements of [Mautic](htt

## Requirements

* Mautic versions 2.15.0 - 5.0.3 (Use previous [Whitelabeler 1.0](https://github.com/nickian/mautic-whitelabeler/releases) release for older versions of Mautic. Beta versions are not tested.)
* Mautic versions 2.15.0 - 5.1.1 (Use previous [Whitelabeler 1.0](https://github.com/nickian/mautic-whitelabeler/releases) release for older versions of Mautic. Beta versions are not tested.)
* Make sure you have installed Mautic using the correct zip file from the [Mautic releases page](https://github.com/mautic/mautic/releases). DO NOT use the "update" zip file. The whitelabeler will not work correctly with these versions.

* Apache server (will work on some nginx configurations, but not officially supported)
@ -117,12 +117,80 @@ sudo -u www-data php cli.php --restore

If you have any backups in the backups directory, you will be prompted to select a backup to restore from. I recommend doing a manual backup before trying this for the first time your system, just to be safe.

## Docker Version

Extra steps are required when using Mautic with Docker. Go into the container:

```
sudo docker exec -it basic-mautic_web-1 bash
```

#### 1. Temporarily rename the `.htaccess` file:

```
mv /var/www/html/docroot/.htaccess /var/www/html/docroot/htaccess
```

#### Install Git and clone the repo

```
apt update
apt install git
cd /var/www/html/docroot
git clone https://github.com/nickian/mautic-whitelabeler.git
```

#### Do Your Whitelabeling

Make sure your permissons are correct (`chown -R www-data:www-data /var/www/html/docroot`)

After running the whitelabeler, change your `htaccess` file back to `.htaccess`

```
mv /var/www/html/docroot/htaccess /var/www/html/docroot/.htaccess
```

#### Install Composer

Follow the directions here: https://getcomposer.org/download

#### Install Node/NPM

```
apt-get install curl software-properties-common
curl -sL https://deb.nodesource.com/setup_20.x | bash -
apt-get install nodejs
```

#### Run Composer

```
cd /var/www/html
composer install
```

When you visit your Mautic site, it should be updated.

## Common Issues / Support :sos:

#### Composer Install

Make sure you have done a `composer install` on your project before running the whitelabel. If you're having issues seeing the assets update, run `composer install` in the Mautic root directory and try again.
If you're having trouble seeing the colors update, you may need to regenerate the Mautic assets via the commandline.

You can do either of these:

```bash
cd /mautic/root
npm install
sudo -u www-data php bin/console mautic:assets:generate
```

Or this should also work because it triggers a script that generates the assets:

```bash
cd /mautic/root
composer install
```

#### `.htaccess` Issue in 4.2.0+

@ -160,6 +228,6 @@ Mautic Whitelabeler makes use of a couple of other libraries:

This app is not offically supported or affiliated with Mautic.

While this tool is convenient, it is not intended for inexperienced users. You should be comfortable with the command line and at least somewhat familiar with PHP. Everyone's server environment is slightly different. This was designed to run optimally on Ubuntu 18.04 with Apache 2.4 and PHP 7.2.
While this tool is convenient, it is not intended for inexperienced users. You should be comfortable with the command line and at least somewhat familiar with PHP. Everyone's server environment is slightly different. This was designed to run optimally on Ubuntu 18.04 with Apache 2.4 and PHP 8.2.

Whitelabeling Mautic does NOT mean pretending Mautic is your company's own product and attempting to resell it. Do not trick your clients into thinking the Mautic platform is developed and maintained by you. Mautic is an open source, community project, like WordPress. You should Whitelabel the product with your client's brand, not your own! Always disclose that you're running Mautic for your clients, just like you would with WordPress.

View file

@ -143,6 +143,7 @@ if ( count($argv) > 1 ) {
} else {
$cli->error($clear_cache['message']);
}

}

} elseif ( $argv[1] == '--backup' ) {

View file

@ -1,12 +1,28 @@
<?php

// Compare a new release of Mautic to see if the files whitelabeling affects have been modified.
/**
* Compare versions of Mautic to see if the files whitelabeling affects have been modified.
*
* These are the files overwritten by the whitelabeler:
*
* - /app/bundles/CoreBundle/Resources/views/Default/base.html.twig
* - /app/bundles/CoreBundle/Resources/views/Default/head.html.twig
* - /app/bundles/CoreBundle/Resources/views/LeftPanel/index.html.twig
* - /app/bundles/UserBundle/Resources/views/Security/base.html.twig
* - /app/bundles/CoreBundle/Assets/css/app.css
* - /app/bundles/CoreBundle/Assets/css/libraries/libraries.css
* - /app/bundles/CoreBundle/Assets/js/1a.content.js
*
* You can also compare branches on Github: https://github.com/mautic/mautic/compare/5.0.4...5.1.0
*/

require_once('whitelabeler.php');
$whitelabeler = new Whitelabeler;

$v1_path = '';
$v2_path = '';
// Use a trailing slash at the end
$mautic_dir = '/';

$v1_path = $mautic_dir.'5.1.0';
$v2_path = $mautic_dir.'5.1.1';

$compare = $whitelabeler->compareMauticVersions($v1_path, $v2_path);


View file

@ -1179,10 +1179,14 @@ function whiteLabel() {
$('#clearing-success').fadeIn();
$("#console").animate({ scrollTop: $('#console').prop("scrollHeight")}, 500);
// Complete!
$('#complete').fadeIn();
$("#console").animate({ scrollTop: $('#console').prop("scrollHeight")}, 500);
$('.spinner').fadeOut();
$('#clearing span.dots').addClass('blink');
$('#clearing').fadeIn();

// Complete!
$('#complete').fadeIn();
$("#console").animate({ scrollTop: $('#console').prop("scrollHeight")}, 500);
$('.spinner').fadeOut();
});
});
}

File diff suppressed because it is too large Load diff

File diff suppressed because one or more lines are too long

File diff suppressed because it is too large Load diff

View file

@ -0,0 +1,86 @@
<?php

/*
* @copyright 2014 Mautic Contributors. All rights reserved
* @author Mautic
*
* @link http://mautic.org
*
* @license GNU/GPLv3 http://www.gnu.org/licenses/gpl-3.0.html
*/
?>
<!DOCTYPE html>
<html>
<?php echo $view->render('MauticCoreBundle:Default:head.html.php'); ?>
<body class="header-fixed">
<!-- start: app-wrapper -->
<section id="app-wrapper">
<?php $view['assets']->outputScripts('bodyOpen'); ?>

<!-- start: app-sidebar(left) -->
<aside class="app-sidebar sidebar-left">
<?php echo $view->render('MauticCoreBundle:LeftPanel:index.html.php'); ?>
</aside>
<!--/ end: app-sidebar(left) -->

<!-- start: app-sidebar(right) -->
<aside class="app-sidebar sidebar-right">
<?php echo $view->render('MauticCoreBundle:RightPanel:index.html.php'); ?>
</aside>
<!--/ end: app-sidebar(right) -->

<!-- start: app-header -->
<header id="app-header" class="navbar">
<?php echo $view->render('MauticCoreBundle:Default:navbar.html.php'); ?>

<?php echo $view->render('MauticCoreBundle:Notification:flashes.html.php'); ?>
</header>
<!--/ end: app-header -->

<!-- start: app-footer(need to put on top of #app-content)-->
<footer id="app-footer">
<div class="container-fluid">
<div class="row">
<div class="col-xs-6 text-muted"> {{company_name}}{{footer_prefix}} {{footer}}</div>
<div class="col-xs-6 text-muted text-right small">v<?php
/** @var \Mautic\CoreBundle\Templating\Helper\VersionHelper $version */
$version = $view['version'];
echo $version->getVersion(); ?>
</div>
</div>
</div>
</footer>
<!--/ end: app-footer -->

<!-- start: app-content -->
<section id="app-content">
<?php $view['slots']->output('_content'); ?>
</section>
<!--/ end: app-content -->

</section>
<!--/ end: app-wrapper -->

<script>
Mautic.onPageLoad('body');
<?php if ('dev' === $app->getEnvironment()): ?>
mQuery( document ).ajaxComplete(function(event, XMLHttpRequest, ajaxOption){
if(XMLHttpRequest.responseJSON && typeof XMLHttpRequest.responseJSON.ignore_wdt == 'undefined' && XMLHttpRequest.getResponseHeader('x-debug-token')) {
if (mQuery('[class*="sf-tool"]').length) {
mQuery('[class*="sf-tool"]').remove();
}

mQuery.get(mauticBaseUrl + '_wdt/'+XMLHttpRequest.getResponseHeader('x-debug-token'),function(data){
mQuery('body').append('<div class="sf-toolbar-reload">'+data+'</div>');
});
}
});
<?php endif; ?>
</script>
<?php $view['assets']->outputScripts('bodyClose'); ?>
<?php echo $view->render('MauticCoreBundle:Helper:modal.html.php', [
'id' => 'MauticSharedModal',
'footerButtons' => true,
]); ?>
</body>
</html>

View file

@ -0,0 +1,28 @@
<?php

/*
* @copyright 2014 Mautic Contributors. All rights reserved
* @author Mautic
*
* @link http://mautic.org
*
* @license GNU/GPLv3 http://www.gnu.org/licenses/gpl-3.0.html
*/
?>
<head>
<meta charset="UTF-8" />
<title><?php if (!empty($view['slots']->get('headerTitle', ''))): ?>
<?php echo strip_tags(str_replace('<', ' <', $view['slots']->get('headerTitle', ''))); ?> |
<?php endif; ?>
<?php echo $view['slots']->get('pageTitle', '{{company_name}}'); ?>
</title>
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
<link rel="icon" type="image/x-icon" href="<?php echo $view['assets']->getUrl('media/images/favicon.ico'); ?>" />
<link rel="icon" sizes="192x192" href="<?php echo $view['assets']->getUrl('media/images/favicon.ico'); ?>">
<link rel="apple-touch-icon" href="<?php echo $view['assets']->getUrl('media/images/apple-touch-icon.png'); ?>" />

<?php echo $view['assets']->outputSystemStylesheets(); ?>

<?php echo $view->render('MauticCoreBundle:Default:script.html.php'); ?>
<?php $view['assets']->outputHeadDeclarations(); ?>
</head>

View file

@ -0,0 +1,44 @@
<?php

/*
* @copyright 2014 Mautic Contributors. All rights reserved
* @author Mautic
*
* @link http://mautic.org
*
* @license GNU/GPLv3 http://www.gnu.org/licenses/gpl-3.0.html
*/
$extraMenu = $view['menu']->render('extra');
?>
<!-- start: sidebar-header -->
<div class="sidebar-header">
<!-- brand -->
<a class="mautic-brand<?php echo (!empty($extraMenu)) ? ' pull-left pl-0 pr-0' : ''; ?>" href="#">
<img src="<?php echo $view['assets']->getUrl('{{sidebar_image}}') ?>" style="width:100%; max-width:{{sidebar_width}}px; margin:{{margin_top}}px {{margin_right}}px 0 {{margin_left}}px;" />
</a>
<?php if (!empty($extraMenu)): ?>
<div class="dropdown extra-menu">
<a href="#" data-toggle="dropdown" class="dropdown-toggle">
<i class="fa fa-chevron-down fa-lg"></i>
</a>
<?php echo $extraMenu; ?>
</div>
<?php endif; ?>
<!--/ brand -->
</div>
<!--/ end: sidebar-header -->

<div class="sidebar-content">
<div class="scroll-content slimscroll">
<nav class="nav-sidebar">
<?php echo $view['content']->getCustomContent('menu.above', $mauticTemplateVars); ?>
<?php echo $view['menu']->render('main'); ?>

<ul class="nav sidebar-left-dark">
<li class="hidden-xs">
<a href="javascript:void(0)" data-toggle="minimize" class="sidebar-minimizer"><span class="direction icon pull-left fa"></span><span class="nav-item-name pull-left text"><?php echo $view['translator']->trans('mautic.core.menu.left.collapse'); ?></span></a>
</li>
</ul>
</nav>
</div>
</div>

View file

@ -0,0 +1,54 @@
<?php

/*
* @copyright 2014 Mautic Contributors. All rights reserved
* @author Mautic
*
* @link http://mautic.org
*
* @license GNU/GPLv3 http://www.gnu.org/licenses/gpl-3.0.html
*/
?>

<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8" />
<title><?php echo $view['slots']->get('pageTitle', '{{company_name}}'); ?></title>
<meta name="robots" content="noindex, nofollow" />
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
<link rel="icon" type="image/x-icon" href="<?php echo $view['assets']->getUrl('media/images/favicon.ico'); ?>" />
<link rel="apple-touch-icon" href="<?php echo $view['assets']->getUrl('media/images/apple-touch-icon.png'); ?>" />
<?php $view['assets']->outputSystemStylesheets(); ?>
<?php echo $view->render('MauticCoreBundle:Default:script.html.php'); ?>
<?php $view['assets']->outputHeadDeclarations(); ?>
</head>
<body>
<section id="main" role="main">
<div class="container" style="margin-top:100px;">
<div class="row">
<div class="col-lg-4 col-lg-offset-4">
<div class="panel" name="form-login">
<div class="panel-body">
<div class="mautic-logo img-circle mb-md text-center" style="width:{{login_logo_width}}px;">
<img src="<?php echo $view['assets']->getUrl('{{login_logo}}') ?>" style="width:{{login_logo_width}}px; margin:{{login_logo_margin_top}}px 0 {{login_logo_margin_bottom}}px 0;" />
</div>
<div id="main-panel-flash-msgs">
<?php echo $view->render('MauticCoreBundle:Notification:flashes.html.php'); ?>
</div>
<?php $view['slots']->output('_content'); ?>
</div>
</div>
</div>
</div>
<div class="row">
<div class="col-lg-4 col-lg-offset-4 text-center text-muted">
&copy; <?php echo date('Y');?> {{company_name}}{{footer_prefix}}
<p style="margin-top:1em;">{{footer}}</p>
</div>
</div>
</div>
</section>
<?php echo $view['security']->getAuthenticationContent(); ?>
</body>
</html>

File diff suppressed because it is too large Load diff

File diff suppressed because one or more lines are too long

File diff suppressed because it is too large Load diff

View file

@ -0,0 +1,66 @@
<!DOCTYPE html>
<html>
{{ include('@MauticCore/Default/head.html.twig', {
headerTitle: block('headerTitle') is defined ? block('headerTitle') : headerTitle|default(''),
pageTitle: block('pageTitle') is defined ? block('pageTitle') : '{{company_name}}',
})
}}
<body class="header-fixed">
<section id="app-wrapper">
{{ outputScripts('bodyOpen') }}

{{ include('@MauticCore/Notification/flashes.html.twig') }}

<aside class="app-sidebar sidebar-left">
{{ include('@MauticCore/LeftPanel/index.html.twig') }}
</aside>

<aside class="app-sidebar sidebar-right">
{{ include('@MauticCore/RightPanel/index.html.twig') }}
</aside>

<header id="app-header" class="navbar">
{{ include('@MauticCore/Default/navbar.html.twig') }}
</header>

<!-- start: app-footer(need to put on top of #app-content)-->
<footer id="app-footer">
<div class="container-fluid">
<div class="row">
<div class="col-xs-6 text-muted">&copy; {{ "now" | date('Y') }} {{company_name}}{{footer_prefix}} {{footer}}</div>
<div class="col-xs-6 text-muted text-right small">v{{ mauticAppVersion() }}</div>
</div>
</div>
</footer>
<!--/ end: app-footer -->

<section id="app-content">
{% block _content %}
{{ include('@MauticCore/Default/output.html.twig') }}
{% endblock %}
</section>

<script>
Mautic.onPageLoad('body');
{% if app.environment is same as 'dev' %}
mQuery( document ).ajaxComplete(function(event, XMLHttpRequest, ajaxOption){
if(XMLHttpRequest.responseJSON && typeof XMLHttpRequest.responseJSON.ignore_wdt == 'undefined' && XMLHttpRequest.getResponseHeader('x-debug-token')) {
if (mQuery('[class*="sf-tool"]').length) {
mQuery('[class*="sf-tool"]').remove();
}

mQuery.get(mauticBaseUrl + '_wdt/'+XMLHttpRequest.getResponseHeader('x-debug-token'),function(data){
mQuery('body').append('<div class="sf-toolbar-reload">'+data+'</div>');
});
}
});
{% endif %}
</script>
{{ outputScripts('bodyClose') }}
{{ include('@MauticCore/Helper/modal.html.twig', {
id: 'MauticSharedModal',
footerButtons: true
}) }}
</section>
</body>
</html>

View file

@ -0,0 +1,19 @@
<head>
<meta charset="UTF-8" />
<title>
{% if headerTitle is defined and headerTitle is not empty %}
{{ headerTitle|replace({'<': ' <'})|striptags|purify }} |
{% endif %}
{{ pageTitle|default('{{company_name}}') }}
</title>
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
<link rel="icon" type="image/x-icon" href="{{ getOverridableUrl('images/favicon.ico') }}" />
<link rel="icon" sizes="192x192" href="{{ getOverridableUrl('images/favicon.ico') }}">
<link rel="apple-touch-icon" href="{{ getOverridableUrl('images/apple-touch-icon.png') }}" />

{{ outputSystemStylesheets() }}

{% include('@MauticCore/Default/script.html.twig') %}

{{ outputHeadDeclarations() }}
</head>

View file

@ -0,0 +1,41 @@
{% set extraMenu = menuRender('extra') %}
<div class="sidebar-header">
<!-- brand -->
<a class="mautic-brand{{ extraMenu is empty ? '' : ' pull-left pl-0 pr-0' }}" href="#" style="padding:0; text-align:center;">
<img src="{{sidebar_image}}" style="width:100%; max-width:{{sidebar_width}}px; margin:{{margin_top}}px {{margin_right}}px 0 {{margin_left}}px;" />
</a>
{% if extraMenu is not empty %}
<div class="dropdown extra-menu">
<a href="#" data-toggle="dropdown" class="dropdown-toggle">
<i class="fa fa-chevron-down fa-lg"></i>
</a>
{{ extraMenu }}
</div>
{% endif %}
<!--/ brand -->
</div>
<!--/ end: sidebar-header -->

<!-- start: sidebar-content -->
<div class="sidebar-content">
<!-- scroll-content -->
<div class="scroll-content slimscroll">
<!-- start: navigation -->
<nav class="nav-sidebar">
{{ customContent('menu.above', _context) }}
{{ menuRender('main') }}

<!-- start: left nav -->
<ul class="nav sidebar-left-dark">
<li class="hidden-xs">
<a href="javascript:void(0)" data-toggle="minimize" class="sidebar-minimizer" aria-label="{% trans %}mautic.core.menu.left.collapse{% endtrans %}"><span class="direction icon pull-left fa"></span><span class="nav-item-name pull-left text">{% trans %}mautic.core.menu.left.collapse{% endtrans %}</span></a>
</li>
</ul>
<!--/ end: left nav -->

</nav>
<!--/ end: navigation -->
</div>
<!--/ scroll-content -->
</div>
<!--/ end: sidebar-content -->

View file

@ -0,0 +1,43 @@

<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8" />
<title>{% block pageTitle %}{{company_name}}{% endblock %}</title>
<meta name="robots" content="noindex, nofollow" />
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
<link rel="icon" type="image/x-icon" href="{{ getOverridableUrl('images/favicon.ico') }}" />
<link rel="apple-touch-icon" href="{{ getOverridableUrl('images/apple-touch-icon.png') }}" />
{{ outputSystemStylesheets() }}
{{- include('@MauticCore/Default/script.html.twig') -}}
{{ outputHeadDeclarations() }}
</head>
<body>
<section id="main" role="main">
<div class="container" style="margin-top:100px;">
<div class="row">
<div class="col-lg-4 col-lg-offset-4">
<div class="panel" name="form-login">
<div class="panel-body">
<div class="mautic-logo img-circle mb-md text-center" style="width:{{login_logo_width}}px;">
<img src="{{login_logo}}" style="width:{{login_logo_width}}px; margin:{{login_logo_margin_top}}px 0 {{login_logo_margin_bottom}}px 0;" />
</div>
<div id="main-panel-flash-msgs">
{{- include('@MauticCore/Notification/flashes.html.twig') -}}
</div>
{% block content %}{% endblock %}
</div>
</div>
</div>
</div>
<div class="row">
<div class="col-lg-4 col-lg-offset-4 text-center text-muted">
&copy; {{ "now"|date("Y") }} {{company_name}}{{footer_prefix}}
<p style="margin-top:1em;">{{footer}}</p>
</div>
</div>
</div>
</section>
{{ securityGetAuthenticationContext() }}
</body>
</html>

File diff suppressed because it is too large Load diff

File diff suppressed because one or more lines are too long

File diff suppressed because it is too large Load diff

View file

@ -0,0 +1,66 @@
<!DOCTYPE html>
<html>
{{ include('@MauticCore/Default/head.html.twig', {
headerTitle: block('headerTitle') is defined ? block('headerTitle') : headerTitle|default(''),
pageTitle: block('pageTitle') is defined ? block('pageTitle') : '{{company_name}}',
})
}}
<body class="header-fixed">
<section id="app-wrapper">
{{ outputScripts('bodyOpen') }}

{{ include('@MauticCore/Notification/flashes.html.twig') }}

<aside class="app-sidebar sidebar-left">
{{ include('@MauticCore/LeftPanel/index.html.twig') }}
</aside>

<aside class="app-sidebar sidebar-right">
{{ include('@MauticCore/RightPanel/index.html.twig') }}
</aside>

<header id="app-header" class="navbar">
{{ include('@MauticCore/Default/navbar.html.twig') }}
</header>

<!-- start: app-footer(need to put on top of #app-content)-->
<footer id="app-footer">
<div class="container-fluid">
<div class="row">
<div class="col-xs-6 text-muted">&copy; {{ "now" | date('Y') }} {{company_name}}{{footer_prefix}} {{footer}}</div>
<div class="col-xs-6 text-muted text-right small">v{{ mauticAppVersion() }}</div>
</div>
</div>
</footer>
<!--/ end: app-footer -->

<section id="app-content">
{% block _content %}
{{ include('@MauticCore/Default/output.html.twig') }}
{% endblock %}
</section>

<script>
Mautic.onPageLoad('body');
{% if app.environment is same as 'dev' %}
mQuery( document ).ajaxComplete(function(event, XMLHttpRequest, ajaxOption){
if(XMLHttpRequest.responseJSON && typeof XMLHttpRequest.responseJSON.ignore_wdt == 'undefined' && XMLHttpRequest.getResponseHeader('x-debug-token')) {
if (mQuery('[class*="sf-tool"]').length) {
mQuery('[class*="sf-tool"]').remove();
}

mQuery.get(mauticBaseUrl + '_wdt/'+XMLHttpRequest.getResponseHeader('x-debug-token'),function(data){
mQuery('body').append('<div class="sf-toolbar-reload">'+data+'</div>');
});
}
});
{% endif %}
</script>
{{ outputScripts('bodyClose') }}
{{ include('@MauticCore/Helper/modal.html.twig', {
id: 'MauticSharedModal',
footerButtons: true
}) }}
</section>
</body>
</html>

View file

@ -0,0 +1,19 @@
<head>
<meta charset="UTF-8" />
<title>
{% if headerTitle is defined and headerTitle is not empty %}
{{ headerTitle|replace({'<': ' <'})|striptags|purify }} |
{% endif %}
{{ pageTitle|default('{{company_name}}') }}
</title>
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
<link rel="icon" type="image/x-icon" href="{{ getOverridableUrl('images/favicon.ico') }}" />
<link rel="icon" sizes="192x192" href="{{ getOverridableUrl('images/favicon.ico') }}">
<link rel="apple-touch-icon" href="{{ getOverridableUrl('images/apple-touch-icon.png') }}" />

{{ outputSystemStylesheets() }}

{% include('@MauticCore/Default/script.html.twig') %}

{{ outputHeadDeclarations() }}
</head>

View file

@ -0,0 +1,41 @@
{% set extraMenu = menuRender('extra') %}
<div class="sidebar-header">
<!-- brand -->
<a class="mautic-brand{{ extraMenu is empty ? '' : ' pull-left pl-0 pr-0' }}" href="#" style="padding:0; text-align:center;">
<img src="{{sidebar_image}}" style="width:100%; max-width:{{sidebar_width}}px; margin:{{margin_top}}px {{margin_right}}px 0 {{margin_left}}px;" />
</a>
{% if extraMenu is not empty %}
<div class="dropdown extra-menu">
<a href="#" data-toggle="dropdown" class="dropdown-toggle">
<i class="fa fa-chevron-down fa-lg"></i>
</a>
{{ extraMenu }}
</div>
{% endif %}
<!--/ brand -->
</div>
<!--/ end: sidebar-header -->

<!-- start: sidebar-content -->
<div class="sidebar-content">
<!-- scroll-content -->
<div class="scroll-content slimscroll">
<!-- start: navigation -->
<nav class="nav-sidebar">
{{ customContent('menu.above', _context) }}
{{ menuRender('main') }}

<!-- start: left nav -->
<ul class="nav sidebar-left-dark">
<li class="hidden-xs">
<a href="javascript:void(0)" data-toggle="minimize" class="sidebar-minimizer" aria-label="{% trans %}mautic.core.menu.left.collapse{% endtrans %}"><span class="direction icon pull-left fa"></span><span class="nav-item-name pull-left text">{% trans %}mautic.core.menu.left.collapse{% endtrans %}</span></a>
</li>
</ul>
<!--/ end: left nav -->

</nav>
<!--/ end: navigation -->
</div>
<!--/ scroll-content -->
</div>
<!--/ end: sidebar-content -->

View file

@ -0,0 +1,43 @@

<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8" />
<title>{% block pageTitle %}{{company_name}}{% endblock %}</title>
<meta name="robots" content="noindex, nofollow" />
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
<link rel="icon" type="image/x-icon" href="{{ getOverridableUrl('images/favicon.ico') }}" />
<link rel="apple-touch-icon" href="{{ getOverridableUrl('images/apple-touch-icon.png') }}" />
{{ outputSystemStylesheets() }}
{{- include('@MauticCore/Default/script.html.twig') -}}
{{ outputHeadDeclarations() }}
</head>
<body>
<section id="main" role="main">
<div class="container" style="margin-top:100px;">
<div class="row">
<div class="col-lg-4 col-lg-offset-4">
<div class="panel" name="form-login">
<div class="panel-body">
<div class="mautic-logo img-circle mb-md text-center" style="width:{{login_logo_width}}px;">
<img src="{{login_logo}}" style="width:{{login_logo_width}}px; margin:{{login_logo_margin_top}}px 0 {{login_logo_margin_bottom}}px 0;" />
</div>
<div id="main-panel-flash-msgs">
{{- include('@MauticCore/Notification/flashes.html.twig') -}}
</div>
{% block content %}{% endblock %}
</div>
</div>
</div>
</div>
<div class="row">
<div class="col-lg-4 col-lg-offset-4 text-center text-muted">
&copy; {{ "now"|date("Y") }} {{company_name}}{{footer_prefix}}
<p style="margin-top:1em;">{{footer}}</p>
</div>
</div>
</div>
</section>
{{ securityGetAuthenticationContext() }}
</body>
</html>

View file

@ -430,7 +430,7 @@ class Whitelabeler {
fwrite($file, $core_js_new);
fclose($file);
} else {
$errors[] = 'Couldn\'t find core javascript file to update.';
$errors[] = 'Couldn\'t find 1a.content.js javascript file to update.';
}

if (empty($errors)) {
@ -643,6 +643,7 @@ class Whitelabeler {
}
}


/*
|--------------------------------------------------------------------------
| Used to run Mautic Console Commands (taken from upgrade.php)