equal
deleted
inserted
replaced
60 |
60 |
61 patterns = [(r'^%(url_name)s/(?P<access_type>edit)/%(key_fields)s$', |
61 patterns = [(r'^%(url_name)s/(?P<access_type>edit)/%(key_fields)s$', |
62 'soc.views.models.%(module_name)s.edit', |
62 'soc.views.models.%(module_name)s.edit', |
63 "Edit %(name_short)s")] |
63 "Edit %(name_short)s")] |
64 |
64 |
|
65 new_params['create_extra_dynaproperties'] = { |
|
66 'link_id': forms.CharField(widget=forms.HiddenInput) |
|
67 } |
65 new_params['django_patterns_defaults'] = patterns |
68 new_params['django_patterns_defaults'] = patterns |
66 |
69 |
67 new_params['edit_dynaproperties'] = [] |
70 new_params['edit_dynaproperties'] = [] |
68 |
71 |
69 params = dicts.merge(params, new_params) |
72 params = dicts.merge(params, new_params) |
86 """ |
89 """ |
87 params = dicts.merge(params, self._params) |
90 params = dicts.merge(params, self._params) |
88 |
91 |
89 # TODO(pawel.solyga): If program doesn't exist for timeline display |
92 # TODO(pawel.solyga): If program doesn't exist for timeline display |
90 # customized error message without pointing to 'Create Timeline' |
93 # customized error message without pointing to 'Create Timeline' |
91 |
94 |
92 program = program_logic.logic.getFromKeyName(kwargs['scope_path']) |
95 key_fields = program_logic.logic.getKeyFieldsFromFields(kwargs) |
|
96 |
|
97 program = program_logic.logic.getFromKeyFields(key_fields) |
93 if program: |
98 if program: |
94 params['edit_form'] = params["edit_form_%s" % program.workflow] |
99 params['edit_form'] = params["edit_form_%s" % program.workflow] |
95 |
100 |
96 return super(View, self).edit(request, access_type, page_name=page_name, |
101 return super(View, self).edit(request, access_type, page_name=page_name, |
97 params=params, seed=seed, **kwargs) |
102 params=params, seed=seed, **kwargs) |