BooleanField inline help_text on modal doesn't work

Bug #1330766 reported by Cindy Lu
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Dashboard (Horizon)
Fix Released
Low
Cindy Lu

Bug Description

According to http://docs.openstack.org/developer/horizon/sourcecode/horizon/horizon.forms.html, you can specify a help_text for BooleanFields (example of this is, go to Project > Images, Create Image modal... there is a "Public" checkbox).

class horizon.forms.BooleanField(required=True, widget=None, label=None, initial=None, help_text=u'', error_messages=None, show_hidden_initial=False, validators=[], localize=False)

However when I put this in here: https://github.com/openstack/horizon/blob/master/openstack_dashboard/dashboards/project/images/images/forms.py#L92

It did not show anything.

Maybe I'm doing something wrong...

Revision history for this message
Ana Krivokapić (akrivoka) wrote :

Help text for form fields is normally displayed when the field gets focus, but it seems that checkbox fields (boolean fields) are explicitly excluded:
https://github.com/openstack/horizon/blob/master/horizon/static/horizon/js/horizon.forms.js#L214

I don't really see a reason for treating checkboxes differently when it comes to displaying help text. I guess the code excluding checkboxes should simply be removed.

Changed in horizon:
status: New → Triaged
importance: Undecided → Low
tags: added: low-hanging-fruit ux
Revision history for this message
Cindy Lu (clu-m) wrote :

Thanks Ana!

It is slightly weird to have it when focusing on the checkbox. o.O

I prefer to have a small icon beside the field name. However, if we choose to do that, then we would have inconsistent help text behavior. :(

Cindy Lu (clu-m)
Changed in horizon:
assignee: nobody → Cindy Lu (clu-m)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to horizon (master)

Fix proposed to branch: master
Review: https://review.openstack.org/102302

Changed in horizon:
status: Triaged → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to horizon (master)

Reviewed: https://review.openstack.org/102302
Committed: https://git.openstack.org/cgit/openstack/horizon/commit/?id=3cbe046176ba33244633dbe5ac212633b881d76a
Submitter: Jenkins
Branch: master

commit 3cbe046176ba33244633dbe5ac212633b881d76a
Author: Cindy Lu <email address hidden>
Date: Tue Jun 24 10:27:33 2014 -0700

    Fix inconsistent inline help text in forms

    Currently, help text is only shown for some input fields.
    For example, if you go to 'Launch Instance', click on
    the input field 'Instance Count' to see the help tooltip.
    It is not displayed for checkboxes (BooleanFields) or dropdown menu,
    even though help_text is provided in the code.

    This change places a small 'info' icon beside each label (if help_text
    is defined for that django form element) so that when you hover over it,
    it will show you the corresponding help text.

    This patch provides a uniform solution for all field and allows to user to
    immediately see which fields have help.

    Change-Id: Ie2d85503160071ba4062b3368e2ef79e7786343e
    Closes-Bug: #1332738
    Closes-Bug: #1330766

Changed in horizon:
status: In Progress → Fix Committed
Changed in horizon:
milestone: none → juno-2
status: Fix Committed → Fix Released
Thierry Carrez (ttx)
Changed in horizon:
milestone: juno-2 → 2014.2
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.