diff --git a/composer.json b/composer.json index 5b5b646f01e1a66371db557d8af51da83d0d6186..45e612274df61b3da88f7ccd9928f52b15462505 100644 --- a/composer.json +++ b/composer.json @@ -140,6 +140,7 @@ "drupal/charts": "3.0-alpha7", "drupal/google_analytics_reports": "3.x-dev#2b6bb8efbc7f61ce3c1225638075aa6037b8db44", "drupal/login_destination": "1.x-dev#54be8b89fdc073ca40af6b9b2eeb050e0aeb7908", + "drupal/betterlogin": "1.x-dev#f7cf1c5c9ec5e80c6ac0ef04ed605e25495232cd", "drupal/ckeditor_media_embed": "1.1", "drupal/total_control": "2.0-alpha3", "drupal/anchor_link": "1.6", diff --git a/drupal-org.make b/drupal-org.make index ba860f327086d197f404d8840a60ba7f49f57698..c07b16e356bc29299b005ad8ec0bbe1add0bd93a 100644 --- a/drupal-org.make +++ b/drupal-org.make @@ -310,6 +310,11 @@ projects[login_destination][download][url] = https://git.drupal.org/project/logi projects[login_destination][download][revision] = 54be8b89fdc073ca40af6b9b2eeb050e0aeb7908 projects[login_destination][download][branch] = 8.x-1.x +projects[betterlogin][type] = module +projects[betterlogin][download][url] = https://git.drupal.org/project/betterlogin.git +projects[betterlogin][download][revision] = f7cf1c5c9ec5e80c6ac0ef04ed605e25495232cd +projects[betterlogin][download][branch] = 8.x-1.x + projects[ckeditor_media_embed][type] = module projects[ckeditor_media_embed][version] = 1.1 ;; Issue #2900313: Add ability to embed tweets and other rich content in WYSIWYG diff --git a/modules/varbase_features/varbase_core/varbase_core.module b/modules/varbase_features/varbase_core/varbase_core.module index 8b8fee1b5ca9022b0cbdc74e9dcc445515b2a8a5..203642548087823ca02893a3ba281662daaf39e0 100644 --- a/modules/varbase_features/varbase_core/varbase_core.module +++ b/modules/varbase_features/varbase_core/varbase_core.module @@ -32,3 +32,11 @@ function varbase_core_form_node_form_alter(&$form, $form_state) { $form['ds_switch_view_mode']['#weight'] = 101; } } + +/** + * Implements hook_template_preprocess_default_variables_alter(). + */ +function varbase_core_template_preprocess_default_variables_alter(&$variables) { + $user_settings_config = \Drupal::config('user.settings'); + $variables['user_settings_register_admin_only'] = $user_settings_config->get('register') == 'admin_only' ? 1 : 0; +} diff --git a/tests/features/varbase/step2-apply-tests/02-user-management/02-01-request-new-password.feature b/tests/features/varbase/step2-apply-tests/02-user-management/02-01-request-new-password.feature index c4d8f6a67e9fbfce092334449e0675a8bf1c364a..5d59f6e72078f757dac8c72b3fa0e09c3767c8ab 100644 --- a/tests/features/varbase/step2-apply-tests/02-user-management/02-01-request-new-password.feature +++ b/tests/features/varbase/step2-apply-tests/02-user-management/02-01-request-new-password.feature @@ -10,7 +10,7 @@ So that I can reset my password for the account Scenario: Check that an anonymous user can reset his/her password. When I go to "/user/login" And I wait - Then I should see "Reset your password" + Then I should see "Forgot your password?" @local @development @staging @production Scenario: Verify that the system cannot send an email to non-existing users/emails. diff --git a/themes/vartheme/VARTHEME_SUBTHEME/VARTHEME_SUBTHEME.libraries.yml b/themes/vartheme/VARTHEME_SUBTHEME/VARTHEME_SUBTHEME.libraries.yml index 14d3a5868a8241a3c7f8481c41fbfd292a1becf0..b4f0d4b0723f3c7f3a21f7205a9b2ee8e2bac3bc 100644 --- a/themes/vartheme/VARTHEME_SUBTHEME/VARTHEME_SUBTHEME.libraries.yml +++ b/themes/vartheme/VARTHEME_SUBTHEME/VARTHEME_SUBTHEME.libraries.yml @@ -28,7 +28,13 @@ vbp-colors: css: theme: css/theme/vbp-colors.theme.css: {} - + +# VARTHEME_SUBTHEME better login theme. +#betterlogin: +# css: +# theme: +# css/theme/betterlogin.theme.css: {} + # VARTHEME_SUBTHEME Vartheme styles library. vartheme-styles: css: diff --git a/themes/vartheme/VARTHEME_SUBTHEME/VARTHEME_SUBTHEME.starterkit.yml b/themes/vartheme/VARTHEME_SUBTHEME/VARTHEME_SUBTHEME.starterkit.yml index 94f64e1e0e2f97438d9c187c0fe7e70cd538fa96..aac813583bad7405ab11c1b45fd178dad80cd3fb 100644 --- a/themes/vartheme/VARTHEME_SUBTHEME/VARTHEME_SUBTHEME.starterkit.yml +++ b/themes/vartheme/VARTHEME_SUBTHEME/VARTHEME_SUBTHEME.starterkit.yml @@ -34,6 +34,9 @@ libraries: # VARTHEME_SUBTHEME Varbase Bootstrap Paragraphs colors theme. - VARTHEME_SUBTHEME/vbp-colors + +# VARTHEME_SUBTHEME Better Login theme. +# - VARTHEME_SUBTHEME/betterlogin # OPTIONALLY: You can choose to remove Vartheme base theme stylesheets and/or # Javascript files. @@ -46,7 +49,7 @@ libraries-override: vartheme/bootstrap-scripts: false vartheme/global-styles: false vartheme/global-scripts: false - + # Comment lines to use (RTL) libraries from vartheme. vartheme/bootstrap-styles-rtl: false vartheme/global-styles-rtl: false @@ -57,6 +60,7 @@ libraries-override: # VARTHEME_SUBTHEME Varbase Bootstrap Paragraphs colors theme. varbase_bootstrap_paragraphs/vbp-colors: VARTHEME_SUBTHEME/vbp-colors vartheme/vbp-colors: VARTHEME_SUBTHEME/vbp-colors +# vartheme/betterlogin: VARTHEME_SUBTHEME/betterlogin # Uncomment lines to replace, exclude css and js files from vartheme. # You will need to copy less/css files from Vartheme to use theme for the diff --git a/themes/vartheme/VARTHEME_SUBTHEME/css/theme/betterlogin.theme.css b/themes/vartheme/VARTHEME_SUBTHEME/css/theme/betterlogin.theme.css new file mode 100644 index 0000000000000000000000000000000000000000..bb21e66e42b5a2728aef8b0a29ef06b998162642 --- /dev/null +++ b/themes/vartheme/VARTHEME_SUBTHEME/css/theme/betterlogin.theme.css @@ -0,0 +1,27 @@ +#auth-box { + padding: 50px 0 0; +} +#auth-box h1#the-logo { + text-align: center; + margin: 0; + padding: 0 0 25px; +} +#auth-box h2.title { + margin: 0; + padding: 0 0 15px; + font-size: 2em; +} +#auth-box #middle-part { + border-radius: 3px; + background: #fff; + padding: 15px; + overflow: hidden; + box-shadow: 0 0 3px 1px #ccc; +} +#auth-box .back-link { + padding: 15px 0 0; +} +#auth-box #bottom-part { + font-size: 13px; + padding: 15px 0 0; +} diff --git a/themes/vartheme/VARTHEME_SUBTHEME/less/theme/betterlogin.theme.less b/themes/vartheme/VARTHEME_SUBTHEME/less/theme/betterlogin.theme.less new file mode 100644 index 0000000000000000000000000000000000000000..07d565840d107c26229df6fe750325551150bd8d --- /dev/null +++ b/themes/vartheme/VARTHEME_SUBTHEME/less/theme/betterlogin.theme.less @@ -0,0 +1,40 @@ +// VARTHEME-SUBTHEME Better login styling. +// ----------------------------------------------------------------------------- +@import "../../bootstrap/less/variables.less"; // Bootstrap variables. +@import "../../bootstrap/less/mixins.less"; // Bootstrap mixins. +@import "../variables.less"; // VARTHEME-SUBTHEME variables. +@import "../mixins.less"; // VARTHEME-SUBTHEME mixins. +// ----------------------------------------------------------------------------- + +#auth-box { + padding: @navbar-height 0 0; + + h1#the-logo { + text-align: center; + margin: 0; + padding: 0 0 25px; + } + + h2.title { + margin: 0; + padding: 0 0 15px; + font-size: 2em; + } + + #middle-part { + border-radius: 3px; + background: @body-bg; + padding: 15px; + overflow: hidden; + box-shadow: 0 0 3px 1px @popover-fallback-border-color; + } + + .back-link { + padding: 15px 0 0; + } + + #bottom-part { + font-size: 13px; + padding: 15px 0 0; + } +} diff --git a/themes/vartheme/css/theme/betterlogin.theme.css b/themes/vartheme/css/theme/betterlogin.theme.css new file mode 100644 index 0000000000000000000000000000000000000000..bb21e66e42b5a2728aef8b0a29ef06b998162642 --- /dev/null +++ b/themes/vartheme/css/theme/betterlogin.theme.css @@ -0,0 +1,27 @@ +#auth-box { + padding: 50px 0 0; +} +#auth-box h1#the-logo { + text-align: center; + margin: 0; + padding: 0 0 25px; +} +#auth-box h2.title { + margin: 0; + padding: 0 0 15px; + font-size: 2em; +} +#auth-box #middle-part { + border-radius: 3px; + background: #fff; + padding: 15px; + overflow: hidden; + box-shadow: 0 0 3px 1px #ccc; +} +#auth-box .back-link { + padding: 15px 0 0; +} +#auth-box #bottom-part { + font-size: 13px; + padding: 15px 0 0; +} diff --git a/themes/vartheme/less/theme/betterlogin.theme.less b/themes/vartheme/less/theme/betterlogin.theme.less new file mode 100644 index 0000000000000000000000000000000000000000..50d15b2f0c9a98a7fd30745230e5dc5703d58f9c --- /dev/null +++ b/themes/vartheme/less/theme/betterlogin.theme.less @@ -0,0 +1,40 @@ +// Vartheme Better Login styling. +// ----------------------------------------------------------------------------- +@import "../../bootstrap/less/variables.less"; // Bootstrap variables. +@import "../../bootstrap/less/mixins.less"; // Bootstrap mixins. +@import "../variables.less"; // Vartheme variables. +@import "../mixins.less"; // Vartheme mixins. +// ----------------------------------------------------------------------------- + +#auth-box { + padding: @navbar-height 0 0; + + h1#the-logo { + text-align: center; + margin: 0; + padding: 0 0 25px; + } + + h2.title { + margin: 0; + padding: 0 0 15px; + font-size: 2em; + } + + #middle-part { + border-radius: 3px; + background: @body-bg; + padding: 15px; + overflow: hidden; + box-shadow: 0 0 3px 1px @popover-fallback-border-color; + } + + .back-link { + padding: 15px 0 0; + } + + #bottom-part { + font-size: 13px; + padding: 15px 0 0; + } +} diff --git a/themes/vartheme/templates/betterlogin/page--user--login.html.twig b/themes/vartheme/templates/betterlogin/page--user--login.html.twig new file mode 100644 index 0000000000000000000000000000000000000000..2aa9a020407569f2dcc05eb6c0d79a98f73a4dd0 --- /dev/null +++ b/themes/vartheme/templates/betterlogin/page--user--login.html.twig @@ -0,0 +1,34 @@ +{# Main #} +{% block main %} +<div role="main" class="main-container container"> + <div class="row"> + <div id="auth-box" class="login col-xs-10 col-xs-offset-1 col-sm-4 col-sm-offset-4"> + <div id="top-part"> + <h1 id="the-logo"> + <a href="{{ url('<front>') }}"> + <img src="{{ logo }}" alt="{{ site_name }}" /> + </a> + </h1> + </div> + <div id="middle-part"> + <h2 class="title">{{ title }}</h2> + {{ page.header|without('vartheme_local_tasks', 'vartheme_breadcrumbs', 'vartheme_local_actions', 'vartheme_page_title') }} + {{ page.content }} + </div> + <div id="bottom-part"> + <div class="password-link"> + <a href="{{ path('user.pass') }}"><span class="icon glyphicon glyphicon-log-in" aria-hidden="true"></span> {{ 'Forgot your password?'|t }}</a> + </div> + {% if not logged_in and not user_settings_register_admin_only %} + <div class="register-link"> + <a href="{{ path('user.register') }}"><span class="icon glyphicon glyphicon-user" aria-hidden="true"></span> {{ 'Register a new account'|t }}</a> + </div> + {% endif %} + <div class="back-link"> + <a href="{{ url('<front>') }}"><span class="icon glyphicon glyphicon-home" aria-hidden="true"></span> {{ 'Back to'|t }} {{ site_name }}</a> + </div> + </div> + </div> + </div> +</div> +{% endblock main %} diff --git a/themes/vartheme/templates/betterlogin/page--user--password.html.twig b/themes/vartheme/templates/betterlogin/page--user--password.html.twig new file mode 100644 index 0000000000000000000000000000000000000000..9b6dd6bfd5e7ef92176c1fb94f4f85f6171b2e5f --- /dev/null +++ b/themes/vartheme/templates/betterlogin/page--user--password.html.twig @@ -0,0 +1,36 @@ +{# Main #} +{% block main %} +<div role="main" class="main-container container"> + <div class="row"> + <div id="auth-box" class="login col-xs-10 col-xs-offset-1 col-sm-4 col-sm-offset-4"> + <div id="top-part"> + <h1 id="the-logo"> + <a href="{{ url('<front>') }}"> + <img src="{{ logo }}" alt="{{ site_name }}" /> + </a> + </h1> + </div> + <div id="middle-part"> + <h2 class="title">{{ title }}</h2> + {{ page.header|without('vartheme_local_tasks', 'vartheme_breadcrumbs', 'vartheme_local_actions', 'vartheme_page_title') }} + {{ page.content }} + </div> + <div id="bottom-part"> + {% if not logged_in %} + <div class="login-link"> + <a href="{{ path('user.login') }}"><span class="icon glyphicon glyphicon-log-in" aria-hidden="true"></span> {{ 'Login'|t }}</a> + </div> + {% endif %} + {% if not logged_in and not user_settings_register_admin_only %} + <div class="register-link"> + <a href="{{ path('user.register') }}"><span class="icon glyphicon glyphicon-user" aria-hidden="true"></span> {{ 'Register a new account'|t }}</a> + </div> + {% endif %} + <div class="back-link"> + <a href="{{ url('<front>') }}"><span class="icon glyphicon glyphicon-home" aria-hidden="true"></span> {{ 'Back to'|t }} {{ site_name }}</a> + </div> + </div> + </div> + </div> +</div> +{% endblock main %} diff --git a/themes/vartheme/templates/betterlogin/page--user--register.html.twig b/themes/vartheme/templates/betterlogin/page--user--register.html.twig new file mode 100644 index 0000000000000000000000000000000000000000..9319faba52acd9bff1924f575122e715fa8c5901 --- /dev/null +++ b/themes/vartheme/templates/betterlogin/page--user--register.html.twig @@ -0,0 +1,31 @@ +{# Main #} +{% block main %} +<div role="main" class="main-container container"> + <div class="row"> + <div id="auth-box" class="login col-xs-10 col-xs-offset-1 col-sm-4 col-sm-offset-4"> + <div id="top-part"> + <h1 id="the-logo"> + <a href="{{ url('<front>') }}"> + <img src="{{ logo }}" alt="{{ site_name }}" /> + </a> + </h1> + </div> + <div id="middle-part"> + <h2 class="title">{{ title }}</h2> + {{ page.header|without('vartheme_local_tasks', 'vartheme_breadcrumbs', 'vartheme_local_actions', 'vartheme_page_title') }} + {{ page.content }} + </div> + <div id="bottom-part"> + {% if not logged_in %} + <div class="login-link"> + <a href="{{ path('user.login') }}"><span class="icon glyphicon glyphicon-log-in" aria-hidden="true"></span> {{ 'Login'|t }}</a> + </div> + {% endif %} + <div class="back-link"> + <a href="{{ url('<front>') }}"><span class="icon glyphicon glyphicon-home" aria-hidden="true"></span> {{ 'Back to'|t }} {{ site_name }}</a> + </div> + </div> + </div> + </div> +</div> +{% endblock main %} diff --git a/themes/vartheme/templates/betterlogin/page--user--reset.html.twig b/themes/vartheme/templates/betterlogin/page--user--reset.html.twig new file mode 100644 index 0000000000000000000000000000000000000000..9b6dd6bfd5e7ef92176c1fb94f4f85f6171b2e5f --- /dev/null +++ b/themes/vartheme/templates/betterlogin/page--user--reset.html.twig @@ -0,0 +1,36 @@ +{# Main #} +{% block main %} +<div role="main" class="main-container container"> + <div class="row"> + <div id="auth-box" class="login col-xs-10 col-xs-offset-1 col-sm-4 col-sm-offset-4"> + <div id="top-part"> + <h1 id="the-logo"> + <a href="{{ url('<front>') }}"> + <img src="{{ logo }}" alt="{{ site_name }}" /> + </a> + </h1> + </div> + <div id="middle-part"> + <h2 class="title">{{ title }}</h2> + {{ page.header|without('vartheme_local_tasks', 'vartheme_breadcrumbs', 'vartheme_local_actions', 'vartheme_page_title') }} + {{ page.content }} + </div> + <div id="bottom-part"> + {% if not logged_in %} + <div class="login-link"> + <a href="{{ path('user.login') }}"><span class="icon glyphicon glyphicon-log-in" aria-hidden="true"></span> {{ 'Login'|t }}</a> + </div> + {% endif %} + {% if not logged_in and not user_settings_register_admin_only %} + <div class="register-link"> + <a href="{{ path('user.register') }}"><span class="icon glyphicon glyphicon-user" aria-hidden="true"></span> {{ 'Register a new account'|t }}</a> + </div> + {% endif %} + <div class="back-link"> + <a href="{{ url('<front>') }}"><span class="icon glyphicon glyphicon-home" aria-hidden="true"></span> {{ 'Back to'|t }} {{ site_name }}</a> + </div> + </div> + </div> + </div> +</div> +{% endblock main %} diff --git a/themes/vartheme/vartheme.info.yml b/themes/vartheme/vartheme.info.yml index edf05bbbbe868f8ed43103bc49c676ea81ceb752..583494ad130b8d19805684b60a0e1d91a73912a3 100755 --- a/themes/vartheme/vartheme.info.yml +++ b/themes/vartheme/vartheme.info.yml @@ -24,7 +24,7 @@ libraries: # Bootstrap styles and scripts libraries. - vartheme/bootstrap-styles - vartheme/bootstrap-scripts - + # Boostrap component libraries. - vartheme/ajax - vartheme/alert @@ -49,7 +49,7 @@ libraries: - vartheme/edge2edge - vartheme/bootstrap-print - vartheme/bootstrap-no-spacing - + # Vartheme general global styles and scripts libraries. - vartheme/global-styles - vartheme/global-scripts @@ -57,9 +57,13 @@ libraries: # Vartheme Varbase Bootstrap Paragraphs colors theme. - vartheme/vbp-colors +# Vartheme Better Login theme. + - vartheme/betterlogin + # Vartheme Varbase Bootstrap Paragraphs colors theme. libraries-override: varbase_bootstrap_paragraphs/vbp-colors: vartheme/vbp-colors + betterlogin/betterlogin_css: vartheme/betterlogin # bootstrap_library/bootstrap-cdn: false # bootstrap_library/bootstrap: false # bootstrap_library/bootstrap-dev: false diff --git a/themes/vartheme/vartheme.libraries.yml b/themes/vartheme/vartheme.libraries.yml index ee8f021b49f0d52f1bd8fd4680794d1b25f1232a..58f40461dc0bf8f1fd49775646ba7ce263959409 100644 --- a/themes/vartheme/vartheme.libraries.yml +++ b/themes/vartheme/vartheme.libraries.yml @@ -1,5 +1,5 @@ # Vartheme global styles library. -global-styles: +global-styles: css: base: css/base/vartheme.base.css: {} @@ -22,13 +22,19 @@ global-styles-rtl: global-scripts: js: js/script.js: {} - + # Vartheme Varbase Bootstrap Paragraphs colors theme. vbp-colors: css: theme: css/theme/vbp-colors.theme.css: {} +# Vartheme better login theme. +betterlogin: + css: + theme: + css/theme/betterlogin.theme.css: {} + # Bootstrap global styles library. bootstrap-styles: css: @@ -39,7 +45,7 @@ bootstrap-styles-rtl: css: base: css/rtl/base/bootstrap-rtl.base.css: {} - + # Bootstrap global scripts library. bootstrap-scripts: js: diff --git a/varbase.info.yml b/varbase.info.yml index 82552326a899df1cb84718dfbd914ceb5b88a01a..c17e2c76e72e3519a02e762178d8fb9c8398b7dc 100755 --- a/varbase.info.yml +++ b/varbase.info.yml @@ -113,6 +113,7 @@ dependencies: - autocomplete_deluxe - link_attributes - login_destination + - betterlogin - ckeditor_media_embed themes: diff --git a/varbase.install b/varbase.install index 9d672248305e30a66e507b9d0f4b31b22c639dcb..2131fa3c9687423ad9d8d3de67f5e4651c001ebe 100644 --- a/varbase.install +++ b/varbase.install @@ -542,3 +542,12 @@ function varbase_update_8042() { \Drupal::service('module_installer')->install(['settings_tray'], FALSE); } } + +/** + * Enable Better Login module. + */ +function varbase_update_8043() { + if (!\Drupal::moduleHandler()->moduleExists('betterlogin')) { + \Drupal::service('module_installer')->install(['betterlogin'], FALSE); + } +}