User story (meta) #1469

Popups to create items should be validated when hitting the return key

Added by Jonathan CLARKE about 3 years ago. Updated over 2 years ago.

Status:Released Start date:2011-07-16
Priority:3 Due date:
Assignee:Arthur ANGLADE % Done:

100%

Category:Webapp - Display, home page
Target version:2.4.0~alpha3
Needs translating:No

Description

Popups used to create items ask for a name and a description (sometimes other things too). When you've finished typing, one often hits return to save. However, return currently causes "cancel" to happen instead, which is very counter-intuitive. Hitting return should cause the "save" button to be "clicked".

Exhaustive list:
  • Group screen, "Create a new item" (for groups and categories)
  • Search screen, "Create node group from this query"
  • Configuration rule management screen, "Add a new rule"
  • Policy Management screen, "Create a new policy based on template X"
  • Policy Template library management, "Create a new category"

Associated revisions

Revision 0c2a0e4e
Added by Arthur ANGLADE almost 3 years ago

Fixes #1469 added a javascript event that intercepts the enter key, and clicks on save

History

#2 Updated by François ARMAND about 3 years ago

Or not, as it does not seems to work with ajax form. So perhaps look at a JQuery solution, like:

http://stackoverflow.com/questions/925334/how-is-the-default-submit-button-on-an-html-form-determined/5017423#5017423

#3 Updated by Jonathan CLARKE about 3 years ago

  • Target version changed from 16 to 19

#4 Updated by François ARMAND almost 3 years ago

  • Assignee set to François ARMAND

#5 Updated by Jonathan CLARKE almost 3 years ago

  • Target version changed from 19 to 21

#6 Updated by Jonathan CLARKE almost 3 years ago

  • Target version changed from 21 to 23

#7 Updated by Jonathan CLARKE almost 3 years ago

  • Target version changed from 23 to Ideas (2.4 specific)

#8 Updated by François ARMAND almost 3 years ago

  • Target version changed from Ideas (2.4 specific) to 2.4.0~alpha1

#9 Updated by François ARMAND almost 3 years ago

  • Assignee changed from François ARMAND to Arthur ANGLADE

#10 Updated by Arthur ANGLADE almost 3 years ago

  • Status changed from 2 to Pending technical review
  • % Done changed from 0 to 100

#11 Updated by François ARMAND almost 3 years ago

  • Status changed from Pending technical review to 2
  • Needs translating set to No

That seems to not have been sufficiently tested: when on pop-up with other inputs than name/description, the behaviour is still to close the pop-up without saving.

For example, on the search page, when you "create a group from that search", select "dynamic" and press enter, nothing is saved.

Apart from that, the provided correction seems ok.

#12 Updated by François ARMAND almost 3 years ago

  • Target version changed from 2.4.0~alpha1 to 2.4.0~alpha2

Will have to been corrected for alpha2

#13 Updated by Jonathan CLARKE over 2 years ago

  • Target version changed from 2.4.0~alpha2 to 2.4.0~alpha3

#14 Updated by François ARMAND over 2 years ago

  • Status changed from 2 to Pending technical review

Done in #2078

#15 Updated by Nicolas CHARLES over 2 years ago

  • Status changed from Pending technical review to Pending functional review

This looks valid from a technical point of view, thank you Arthur
However, some comments in the js file to explain what the function does and when to use it would have been great

#16 Updated by Jonathan CLARKE over 2 years ago

  • Status changed from Pending functional review to Released

This is not only correct, it's absolutely awesome!!!!! :)

Also available in: Atom PDF