From 038c7ce8bbb1d40a99c98811f1c267a6218b22c2 Mon Sep 17 00:00:00 2001 From: Étienne Loks Date: Wed, 14 Feb 2018 12:39:03 +0100 Subject: Archaeological site: search view (refs #3913) - add site to profile - allow alternate label in menus for sites - add entry in menu - basic configuration of site model --- ishtar_common/wizards.py | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) (limited to 'ishtar_common/wizards.py') diff --git a/ishtar_common/wizards.py b/ishtar_common/wizards.py index e82b32671..114b47712 100644 --- a/ishtar_common/wizards.py +++ b/ishtar_common/wizards.py @@ -139,6 +139,9 @@ class Wizard(NamedUrlWizardView): saved_args = {} # argument to pass on object save + def get_label(self): + return self.label + ''' # buggy and unecessary... def __init__(self, *args, **kwargs): @@ -232,7 +235,7 @@ class Wizard(NamedUrlWizardView): step = self.steps.first current_step = self.steps.current dct = {'current_step_label': self.form_list[current_step].form_label, - 'wizard_label': self.label, + 'wizard_label': self.get_label(), 'current_object': self.get_current_object(), 'is_search': bool( [k for k in self.main_item_select_keys @@ -1216,13 +1219,16 @@ class SearchWizard(NamedUrlWizardView): templates = ['ishtar/wizard/search.html'] return templates + def get_label(self): + return self.label + 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], 'is_search': True, - 'wizard_label': self.label}) + 'wizard_label': self.get_label()}) return context -- cgit v1.2.3