From c2bb6973067e7050a7a06b15a6871697f8c817f8 Mon Sep 17 00:00:00 2001 From: Roberto Rosario Date: Mon, 17 Sep 2018 17:09:59 -0400 Subject: [PATCH] Add the current step and total steps of a wizard in the template context. Signed-off-by: Roberto Rosario --- HISTORY.rst | 1 + docs/releases/3.1.rst | 1 + mayan/apps/sources/wizards.py | 2 ++ 3 files changed, 4 insertions(+) diff --git a/HISTORY.rst b/HISTORY.rst index 4eca3175a4..175868438a 100644 --- a/HISTORY.rst +++ b/HISTORY.rst @@ -160,6 +160,7 @@ - Add file_size and datetime fields to the DocumentPageCachedImage model. - Make icon classes file template based. +- Add the current step and total steps of a wizard in the template context. 3.0.3 (2018-08-17) ================== diff --git a/docs/releases/3.1.rst b/docs/releases/3.1.rst index c0e9d2aa54..883bada31b 100644 --- a/docs/releases/3.1.rst +++ b/docs/releases/3.1.rst @@ -376,6 +376,7 @@ classes beyond the provide line chart. - Add file_size and datetime fields to the DocumentPageCachedImage model. - Make icon classes file template based. +- Add the current step and total steps of a wizard in the template context. Removals -------- diff --git a/mayan/apps/sources/wizards.py b/mayan/apps/sources/wizards.py index dc8b3897f3..98da80454b 100644 --- a/mayan/apps/sources/wizards.py +++ b/mayan/apps/sources/wizards.py @@ -168,6 +168,8 @@ class DocumentCreateWizard(SessionWizardView): 'submit_label': _('Next step'), 'submit_icon_class': icon_wizard_submit, 'title': _('Document upload wizard'), + 'wizard_step': wizard_step, + 'wizard_steps': WizardStep.get_all(), }) return context