Skip to content

Commit

Permalink
[#1460] Change button to input so that ie7 works. Also needed to chan…
Browse files Browse the repository at this point in the history
…ge way params are got as value needs to be the thing shown on the input
  • Loading branch information
kindly authored and amercader committed Jan 27, 2014
1 parent 3ef8454 commit 5637814
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
6 changes: 5 additions & 1 deletion ckan/controllers/package.py
Expand Up @@ -1326,7 +1326,11 @@ def groups(self, id):
except NotFound:
abort(404, _('Group not found'))

removed_group = request.POST.get('group_removed')
removed_group = None
for param in request.POST:
if param.startswith('group_remove'):
removed_group = param.split('.')[-1]
break
if removed_group:
data_dict = {"id": removed_group,
"object": id,
Expand Down
2 changes: 1 addition & 1 deletion ckan/templates/group/snippets/group_item.html
Expand Up @@ -36,7 +36,7 @@ <h3 class="media-heading">{{ group.display_name }}</h3>
<span>{{ _('View {name}').format(name=group.display_name) }}</span>
</a>
{% if group.user_member %}
<button name="group_removed" value="{{ group.id }}" type="submit" class="btn btn-danger btn-small media-edit" title="{{ _('Remove dataset from this group') }}">{{ _('Remove') }}</button>
<input name="group_remove.{{ group.id }}" value="{{ _('Remove') }}" type="submit" class="btn btn-danger btn-small media-edit" title="{{ _('Remove dataset from this group') }}"/>
{% endif %}
</li>
{% if position is divisibleby 3 %}
Expand Down

0 comments on commit 5637814

Please sign in to comment.