-
Notifications
You must be signed in to change notification settings - Fork 1
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
Enhance select element #88
Conversation
8dda69f
to
e71d5f3
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Since you are adjusting the entire class, please define the proper arguments and return types for all methods the class provides itself.
7def169
to
f94135d
Compare
7d617be
to
e18950e
Compare
279571f
to
3c76e50
Compare
3c76e50
to
1242f0c
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- Please document the trait.
- Please test the trait.
- Don't drop ZF1 compatibility yet. I haven't checked if any of this applies to IPL forms, but I wouldn't bother to check either. The separate PR was fine.
- The whole logic for disabling options is questionable as it is not possible to control this via construct time attributes and option groups cannot be disabled or the entire element (which effectively means all options (and groups) are automatically disabled). And the funniest thing is, it's not used at all, see here, here, here and here. So we have a semi-implemented feature that is not used at all and just presents complexity for further changes. I would remove the ability to disable options.
- And while we're removing stuff anyway, please drop
deselect()
. Also not used.
Update:
4. I would remove the ability to disable options.
This applies to the methods in the form, since $form->getOption()->setAttribute('disabled', true)
can always be called. Note that validation must still take disabled attributes into account. Your current changes would no longer do that for the above call. Please add a test for this as well.
fafe57f
to
ee0b1bd
Compare
Introduce trait `MultipleAttribute`
This change has the following efects: * If no value is set, the option with `null` or `''` is selected as defalt, if given. * SelectOption converts `''` value to `null`
a0bd6b4
to
10e6fea
Compare
* Remove the unused methods `disableOption` and `disableOptions` * Introduce new method `setDisabledOptions` * getOption throws an exception if no option with the specified value exists
10e6fea
to
b5de880
Compare
Thank you for your pull request. Before we can look at it, you'll need to sign a Contributor License Agreement (CLA). Please follow instructions at https://icinga.com/company/contributor-agreement to sign the CLA. After that, please reply here with a comment and we'll verify. Contributors that have not signed yet: @sukhwinder33445
|
@cla-bot check |
Blocked by
DeferredInArrayValidator
ipl-validator#12getLabel()
and change methodsetLabel()
#70fixes #84
TODO:
testSelectingDisabledOptionIsNotPossible()
fails because of cachedisValid()
.