Skip to content

Commit

Permalink
ACMS-3284: Update tour script to work globaly with any theme.
Browse files Browse the repository at this point in the history
  • Loading branch information
rajeshreeputra committed Dec 20, 2023
1 parent bb58878 commit bd684e1
Show file tree
Hide file tree
Showing 7 changed files with 19 additions and 142 deletions.
5 changes: 0 additions & 5 deletions modules/acquia_cms_tour/acquia_cms_tour.libraries.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,3 @@
acquia_cms_tour:
css:
theme:
css/acquia_cms_tour.css: {}

acquia_cms_tour_dashboard:
css:
theme:
Expand Down
6 changes: 3 additions & 3 deletions modules/acquia_cms_tour/acquia_cms_tour.routing.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,23 +17,23 @@ acquia_cms_tour.starter_kit_welcome_modal_form:
acquia_cms_tour.welcome_modal_form:
path: '/admin/tour/dashboard/welcome-modal-form'
defaults:
_title: 'Modal Form'
_title: 'Welcome to Acquia CMS'
_controller: '\Drupal\acquia_cms_tour\Controller\WelcomeModalController::openWelcomeModalForm'
requirements:
_permission: 'access acquia cms tour dashboard'

acquia_cms_tour.installation_wizard:
path: '/acquia-cms-tour/installation-wizard'
defaults:
_title: 'Acquia CMS Installation wizard'
_title: 'Acquia CMS Configuration Wizard'
_form: 'Drupal\acquia_cms_tour\Form\InstallationWizardForm'
requirements:
_permission: 'access content'

acquia_cms_tour.selection_wizard:
path: '/acquia-cms-tour/starter-kit-selection-wizard'
defaults:
_title: 'Acquia CMS Installation wizard'
_title: 'Acquia CMS Starterkit Wizard'
_form: 'Drupal\acquia_cms_tour\Form\StarterKitSelectionWizardForm'
requirements:
_permission: 'access content'
13 changes: 13 additions & 0 deletions modules/acquia_cms_tour/css/acquia_cms_installation_wizard.css
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,19 @@
font-size: 14px;
font-weight: normal;
}
.acms-starter-kit-wizard .ui-dialog-buttonset,
.acms-installation-wizard .ui-dialog-buttonset {
width: 60%;
float: right;
display: block;
text-align: right;
}
.acms-installation-wizard .ui-dialog-buttonset button:first-child:not(.skip-button) {
float: left;
}
.acms-installation-wizard .ui-dialog-buttonset button.skip-button {
float: none;
}

@media screen and (max-width: 767px) {
.acms-installation-wizard .acquia-cms-tour-installation-wizard {
Expand Down
128 changes: 0 additions & 128 deletions modules/acquia_cms_tour/css/acquia_cms_tour.css

This file was deleted.

1 change: 1 addition & 0 deletions modules/acquia_cms_tour/css/acquia_cms_tour_dashboard.css
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
.ui-dialog-titlebar,
.tour-dashboard {
text-align: center;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ public function openStarterModalForm() {
'width' => 1000,
];
// Add AJAX command to open a modal dialog with the form as the content.
$response->addCommand(new OpenModalDialogCommand('', $modal_form, $modal_options));
$response->addCommand(new OpenModalDialogCommand($this->t('Acquia CMS Starter Kit Setup Wizard'), $modal_form, $modal_options));
}
return $response;

Expand All @@ -88,7 +88,7 @@ public function openWelcomeModalForm() {
'width' => 500,
];
// Add an AJAX command to open a modal dialog with the form as the content.
$response->addCommand(new OpenModalDialogCommand('', $modal_form, $modal_options));
$response->addCommand(new OpenModalDialogCommand($this->t('Welcome to Acquia CMS'), $modal_form, $modal_options));

return $response;
}
Expand Down
4 changes: 0 additions & 4 deletions modules/acquia_cms_tour/src/Form/WelcomeModalForm.php
Original file line number Diff line number Diff line change
Expand Up @@ -92,10 +92,6 @@ public function buildForm(array $form, FormStateInterface $form_state, $options
'#type' => 'markup',
'#markup' => '<img src="' . $logo . '" width="80">',
];
$form['tour-dashboard']['title'] = [
'#type' => 'markup',
'#markup' => '<h3>' . $this->t('Welcome to Acquia CMS') . '</h3>',
];
$form['tour-dashboard']['message'] = [
'#type' => 'markup',
'#markup' => '<p>' . $this->t("We've created an easy step by step installation wizard to guide you through the necessary configurations") . '</p>',
Expand Down

0 comments on commit bd684e1

Please sign in to comment.