Skip to content

Commit

Permalink
Merge pull request #824 from M0rgan01/new_restore_checklist
Browse files Browse the repository at this point in the history
New restore checklist
  • Loading branch information
M0rgan01 authored Aug 2, 2024
2 parents 4c33fd4 + bc4b92e commit 5b780c9
Show file tree
Hide file tree
Showing 3 changed files with 44 additions and 5 deletions.
10 changes: 5 additions & 5 deletions js/upgrade.js
Original file line number Diff line number Diff line change
Expand Up @@ -363,12 +363,8 @@ function afterRollback(res) {
}

function afterRollbackComplete(res) {
var params = res.nextParams;
$("#pleaseWait").hide();
$("#upgradeResultCheck")
.html("<p>" + input.translation.restoreComplete + "</p>")
.show("slow");
updateInfoStep("<p class=\"alert alert-success\">" + input.translation.restoreComplete + "</p>");
$("#postRestoreChecklist").show();
$(window).unbind();
}

Expand Down Expand Up @@ -511,6 +507,10 @@ function doAjaxRequest(action, nextParams) {
* @return void
*/
function prepareNextButton(button_selector, nextParams) {
if (button_selector === "#rollback") {
$("#postUpdateChecklist").hide();
}

$(button_selector)
.unbind()
.click(function(e) {
Expand Down
38 changes: 38 additions & 0 deletions views/templates/block/postRestoreChecklistBlock.html.twig
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
<div id="postRestoreChecklist" style="display: none; margin-top: 10px;">
<div class="alert alert-success">
<div style="display: flex;">
<div>
<div style="font-weight: bold;">
{{ 'Your restoration is complete'|trans({}) }}
</div>
{{ 'Before continuing with your tasks, please review the following checklist to ensure smooth operation after recent recovery.'|trans({}) }}
</div>
<div style="margin-left: auto">
<a class="btn btn-primary" target="_blank" href="https://devdocs.prestashop-project.org/8/basics/keeping-up-to-date/upgrade-module/post-restore-checklist/">
<i class="material-icons" style="font-size: 18px; margin-right: 4px;">
launch
</i>
{{ 'Open developer documentation'|trans({}) }}
</a>
</div>
</div>
</div>

<div class="panel">
<div class="panel-heading">
{{ 'Next steps'|trans({}) }}
</div>
<ul>
<li>{{ 'Disable the maintenance mode in General settings > Maintenance.'|trans({}) }}</li>
</ul>
</div>

<div class="panel">
<div class="panel-heading">
{{ 'Troubleshooting'|trans({}) }}
</div>
<ul>
<li>{{ 'If you can\'t access your back office, try emptying the cache.'|trans({}) }}</li>
</ul>
</div>
</div>
1 change: 1 addition & 0 deletions views/templates/main.html.twig
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@

{% include '@ModuleAutoUpgrade/block/versionComparison.html.twig' %}
{% include '@ModuleAutoUpgrade/block/postUpdateChecklistBlock.html.twig' %}
{% include '@ModuleAutoUpgrade/block/postRestoreChecklistBlock.html.twig' %}
{% include '@ModuleAutoUpgrade/block/activityLog.html.twig' %}

{% include '@ModuleAutoUpgrade/block/rollbackForm.html.twig' %}
Expand Down

0 comments on commit 5b780c9

Please sign in to comment.