diff options
author | Étienne Loks <etienne.loks@iggdrasil.net> | 2018-02-14 12:39:03 +0100 |
---|---|---|
committer | Étienne Loks <etienne.loks@iggdrasil.net> | 2018-02-15 17:20:19 +0100 |
commit | 038c7ce8bbb1d40a99c98811f1c267a6218b22c2 (patch) | |
tree | df7cf20de56e13c9660d14219d7ee5d825bb2909 /ishtar_common/wizards.py | |
parent | 365546bcd78bed54c6ab2d7f375b86cde8caa66f (diff) | |
download | Ishtar-038c7ce8bbb1d40a99c98811f1c267a6218b22c2.tar.bz2 Ishtar-038c7ce8bbb1d40a99c98811f1c267a6218b22c2.zip |
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
Diffstat (limited to 'ishtar_common/wizards.py')
-rw-r--r-- | ishtar_common/wizards.py | 10 |
1 files changed, 8 insertions, 2 deletions
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 |