Opened 9 years ago

Closed 3 years ago

#5116 closed New feature (duplicate)

newforms: SelectMultiple widget: disable some entries

Reported by: Thomas Güttler <hv@…> Owned by: Philippe Raoult
Component: Forms Version: master
Severity: Normal Keywords: feature
Cc: hv@…, bmispelon@… Triage Stage: Accepted
Has patch: yes Needs documentation: no
Needs tests: no Patch needs improvement: yes
Easy pickings: no UI/UX: no

Description

Hi,

here is a small patch to disable some items in a
SelectMultiple widget.

Attachments (3)

newforms_widgets_selectm_disable.diff (1.6 KB) - added by Thomas Güttler <hv@…> 9 years ago.
newforms_select_disable.diff (5.3 KB) - added by Thomas Güttler <hv@…> 9 years ago.
newforms_select_disable-2.diff (5.3 KB) - added by Thomas Güttler <hv@…> 9 years ago.

Download all attachments as: .zip

Change History (16)

Changed 9 years ago by Thomas Güttler <hv@…>

comment:1 Changed 9 years ago by Philippe Raoult

Keywords: feature added
Needs documentation: set
Needs tests: unset
Owner: changed from nobody to Philippe Raoult
Patch needs improvement: unset
Triage Stage: UnreviewedDesign decision needed

comment:2 Changed 9 years ago by Thomas Güttler <hv@…>

Cc: hv@… added

Changed 9 years ago by Thomas Güttler <hv@…>

comment:3 Changed 9 years ago by Thomas Güttler <hv@…>

Has patch: unset
Needs documentation: unset

I attached a new patch. It includes documentation an tests.

comment:4 Changed 9 years ago by Thomas Güttler <hv@…>

Has patch: set

Changed 9 years ago by Thomas Güttler <hv@…>

comment:5 Changed 9 years ago by Thomas Güttler <hv@…>

newforms_select_disable-2.diff is an update to apply cleanly to the current trunk.

comment:6 Changed 9 years ago by Philippe Raoult

Triage Stage: Design decision neededReady for checkin

tests are working, documentation is up to date.

comment:7 Changed 9 years ago by Malcolm Tredinnick

Triage Stage: Ready for checkinDesign decision needed

Best practice is to leave out entries that cannot be selected, not disable them. So it's not clear that this is a good change to make.

comment:8 Changed 9 years ago by Philippe Raoult

Patch needs improvement: set

We could accept a patch that makes it easier to subclass Select though. Then you can post your disable option as a snippet subclassing Select.

comment:9 Changed 6 years ago by Russell Keith-Magee

Triage Stage: Design decision neededAccepted

This is an option in the HTML spec, so we should be able to expose it in some way.

comment:10 Changed 5 years ago by Gabriel Hurley

Severity: Normal
Type: New feature

comment:11 Changed 5 years ago by Aymeric Augustin

UI/UX: unset

Change UI/UX from NULL to False.

comment:12 Changed 5 years ago by Aymeric Augustin

Easy pickings: unset

Change Easy pickings from NULL to False.

comment:13 Changed 3 years ago by Baptiste Mispelon

Cc: bmispelon@… added
Resolution: duplicate
Status: newclosed

This is a duplicate of #16149 which also has a patch but is a bit more generic.

Note: See TracTickets for help on using tickets.
Back to Top