Skip to content

Commit

Permalink
[2474] Add an action to the group new/edit template contexts
Browse files Browse the repository at this point in the history
  • Loading branch information
aron committed Jun 5, 2012
1 parent 00d552b commit d744dca
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions ckan/controllers/group.py
Expand Up @@ -251,7 +251,7 @@ def new(self, data=None, errors=None, error_summary=None):
data = data or {}
errors = errors or {}
error_summary = error_summary or {}
vars = {'data': data, 'errors': errors, 'error_summary': error_summary}
vars = {'data': data, 'errors': errors, 'error_summary': error_summary, 'action': 'new'}

self._setup_template_variables(context,data)
c.form = render(self._group_form(group_type=group_type), extra_vars=vars)
Expand Down Expand Up @@ -289,7 +289,7 @@ def edit(self, id, data=None, errors=None, error_summary=None):
abort(401, _('User %r not authorized to edit %s') % (c.user, id))

errors = errors or {}
vars = {'data': data, 'errors': errors, 'error_summary': error_summary}
vars = {'data': data, 'errors': errors, 'error_summary': error_summary, 'action': 'edit'}

self._setup_template_variables(context, data, group_type=group_type)
c.form = render(self._group_form(group_type), extra_vars=vars)
Expand Down

0 comments on commit d744dca

Please sign in to comment.