Add group categories default action is page submit, not add

Bug #609167 reported by Andrew Nicols
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Mahara
Fix Released
Low
Jono M

Bug Description

On /admin/groups/groupcategories.php, trying to add a new group category and hitting return (instead of specifically selecting the Add button) submits the form, refreshing the page rather than the expected action of adding the group.

Revision history for this message
Andrew Nicols (dobedobedoh) wrote :

For firefox this can be fixed by changing the save button from a button to a submit, but this doesn't seem to be a suitable fix for google chrome. Chrome seems to default to the first submit button when you return.

Changed in mahara:
importance: Undecided → Low
status: New → Triaged
milestone: none → 1.3.0
Changed in mahara:
milestone: 1.3.0 → none
tags: added: groups
removed: group
Revision history for this message
Robert Lyon (robertl-9) wrote :

The reason for this may be due to the fact that the 'Add categories' form is totally javascript driven. Why it was designed this way 3 years ago I have no idea.

Should it be made in the mold of other forms in the system - probably not as it is a very minor form used only by admins.

Probably worth closing this as "won't fix" - will chat with team first

Revision history for this message
Kristina Hoeppner (kris-hoeppner) wrote :

I see a different behavior: When I create a new category and hit the "Enter" key, the first category goes into edit mode. That is very weird as you would expect that you would actually fulfill the action of adding the category that you editing. It looks similar to the form at /admin/site/menu.php

Revision history for this message
Aaron Wells (u-aaronw) wrote :

I see basically what Kristina described:

1. If you have no group categories yet, and you fill in a name and hit "Enter", then it refreshes the page without creating the new group
2. If you have at least one group category extant, and you fill in a name for a new one and hit "Enter", then it turns one of your existing group categories into edit mode.

It is strange this is an all-Javascript page. Perhaps it was a first step towards JS-ifying more of our list pages, which is a usability suggestion that has been made before. But it was done in a way that doesn't properly handle the "Enter" button.

Jono M (jonom)
Changed in mahara:
assignee: nobody → Jono Mingard (mingard)
Revision history for this message
Mahara Bot (dev-mahara) wrote : A patch has been submitted for review

Patch for "master" branch: https://reviews.mahara.org/3044

Revision history for this message
Jono M (jonom) wrote :

It's quite easy to do, so this might as well be fixed - would be good for accessibility as well.

Changed in mahara:
status: Triaged → In Progress
Revision history for this message
Mahara Bot (dev-mahara) wrote : A change has been merged

Reviewed: https://reviews.mahara.org/3044
Committed: http://gitorious.org/mahara/mahara/commit/bacadf12db0ea062dab8aa7fee193f6591e6b316
Submitter: Robert Lyon (<email address hidden>)
Branch: master

commit bacadf12db0ea062dab8aa7fee193f6591e6b316
Author: Jono Mingard <email address hidden>
Date: Wed Feb 26 12:34:50 2014 +1300

Submit current form when pressing Enter in Group categories (Bug #609167)

Pressing enter in the input used to add/edit a category now causes the
relevant 'Add' or 'Update' button to be activated

Change-Id: Ia0157cdc65d03cb184d8afdb3f597b5ba81e262e
Signed-off-by: Jono Mingard <email address hidden>

Robert Lyon (robertl-9)
Changed in mahara:
status: In Progress → Fix Committed
milestone: none → 1.9.0
Robert Lyon (robertl-9)
Changed in mahara:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.