[issue2551121] FR: Add an option to hide the option "- no selection -" in the <select> menu

Nagy Gabor <[email protected]>
Newsgroups gmane.comp.bug-tracking.roundup.devel
Message-ID <[email protected]>
New submission from Nagy Gabor:

Sometimes it is useful to hide the "- no selection -" option in <select> menus (rendered by the menu() methods of templating.py). When we want force the users *gently* to set a value in the web interface.

The patch is trivial, but I only did that for the class LinkHTMLProperty of templating.py: I've added a new "show_nosel=True" argument to menu(), and put
"l.append(self._('<option %svalue="-1">- no selection -</option>')%s)"
(and maybe the 2 or 3 preceding lines) behind an
"if show_nosel:"

----------
components: Web interface
messages: 7140
nosy: ngaba
severity: normal
status: new
title: FR: Add an option to hide the option "- no selection -" in the <select> menu
type: behavior

_________________________________________________
Roundup tracker <[email protected]>
<https://issues.roundup-tracker.org/issue2551121>
_________________________________________________
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.