New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
multicheckbox without extra string input #1361
Conversation
Is the commit missing something, what is supposed to happen when nostring is on? |
I misread the code before, but I do think your change is an improvement. I like the idea/reasoning behind the change. Iirc, part of the reason for having an "other" value is to handle unknown configuration values. Can I suggest modifying this slightly.
I'm open to better language for the parameter and its possible values. What do you/others think? |
Let me better understand.
If so, I like it! |
If somehow (e.g. via manual config file editing) the actual value includes a different value (e.g. |
I beg your pardon, but I've to be honestly: point 2 is outside my ability because if the idea was to use javascript, to check if is selected a particular value, I don't know how to implement it (I don't know javascript). |
2 isn't in JavaScript. [pseudo code] create other input if always or (preferred and !empty($other)) |
Sorry if I'm so pedant but there is still somthing escapes me. Consider the syntax:
and for default none of the choices is already checked, that is:
I think there are two different approach to implement the point 2. B)
Therefore, in both A) and B), how are you going to check if
and then use:
Have I mixed up the issue? |
Don't (ever) worry about seeking clarification. 'foo' wouldn't be in _choices. I will add more later when I'm back at my computer. |
Permit three values: - always (default), the other input field is always displayed - exists, the other input field is only displayed when the setting contains value(s) not listed in choices*. - never, the other input field is never displayed. If the setting contains any value(s) not listed in choices they will be discarded on saving. * This means, under normal circumstances the admin will not see the other input field. It will only appear after manual editing to enter a non-listed _choice or if an update were to remove a previously selected _choice
I created a PR against your master for you to review, do you see what I mean now? What do you think? |
Finally!! Now it's all clear. Let me sum up and explain, step by step, (also for other readers) when
this means the extra string is shown. Let's suppose the user inserts an extra value not in
which means:
Thanks for your patience! [1]
|
Change from _nostring to _other
The inspection completed: No new issues |
👍 |
multicheckbox without extra string input
Thanks @tormec could you please update the documentation at https://www.dokuwiki.org/devel:configuration#configuration_metadata ? |
Sure. I will do it as soon as possible. |
I think it would be "nice" to have a
multicheckbox
without the additional string input.The widget
multicheckbox
could accept a parameter, say_nostring
with valueon
, which disable the extra string, otherwise (default) it is created with it.So the syntax would be: