summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorÉtienne Loks <etienne.loks@peacefrogs.net>2013-04-17 01:20:35 +0200
committerÉtienne Loks <etienne.loks@peacefrogs.net>2013-04-17 01:20:35 +0200
commit2b9c755e4e57ba4e0b44820301bf1acb8be7616e (patch)
tree244d8f3a583d5f0a95b94f269641c6ad38e3c031
parent277e0e33cabaa323bc3621ad9ae418d7ead1dc56 (diff)
downloadIshtar-2b9c755e4e57ba4e0b44820301bf1acb8be7616e.tar.bz2
Ishtar-2b9c755e4e57ba4e0b44820301bf1acb8be7616e.zip
Fix current action and context data for search actions
-rw-r--r--ishtar_common/templates/ishtar/wizard/default_wizard.html4
-rw-r--r--ishtar_common/templates/ishtar/wizard/search.html3
-rw-r--r--ishtar_common/wizards.py8
3 files changed, 10 insertions, 5 deletions
diff --git a/ishtar_common/templates/ishtar/wizard/default_wizard.html b/ishtar_common/templates/ishtar/wizard/default_wizard.html
index b56324a78..c14ad281e 100644
--- a/ishtar_common/templates/ishtar/wizard/default_wizard.html
+++ b/ishtar_common/templates/ishtar/wizard/default_wizard.html
@@ -1,7 +1,5 @@
{% extends "base.html" %}
-{% load i18n %}
-{% load range %}
-{% load table_form %}
+{% load i18n range table_form %}
{% block extra_head %}
{{form.media}}
{% endblock %}
diff --git a/ishtar_common/templates/ishtar/wizard/search.html b/ishtar_common/templates/ishtar/wizard/search.html
index 6bb82abdd..53455a7b4 100644
--- a/ishtar_common/templates/ishtar/wizard/search.html
+++ b/ishtar_common/templates/ishtar/wizard/search.html
@@ -1,6 +1,5 @@
{% extends "base.html" %}
-{% load i18n %}
-{% load range %}
+{% load i18n range %}
{% block extra_head %}
{{wizard.form.media}}
{% endblock %}
diff --git a/ishtar_common/wizards.py b/ishtar_common/wizards.py
index 699c3a858..df7eaaac1 100644
--- a/ishtar_common/wizards.py
+++ b/ishtar_common/wizards.py
@@ -688,6 +688,14 @@ class SearchWizard(NamedUrlWizardView):
templates = ['ishtar/wizard/search.html']
return templates
+ def get_context_data(self, form, **kwargs):
+ context = super(SearchWizard, self).get_context_data(form)
+ self.request.session['CURRENT_ACTION'] = self.get_wizard_name()
+ current_step = self.steps.current
+ context.update({'current_step':self.form_list[current_step],
+ 'wizard_label':self.label})
+ return context
+
class DeletionWizard(Wizard):
def get_formated_datas(self, forms):
datas = super(DeletionWizard, self).get_formated_datas(forms)