-
Notifications
You must be signed in to change notification settings - Fork 7
Hotfix hide datepicker is widget readonly #21
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
Hotfix hide datepicker is widget readonly #21
Conversation
| $arrFieldDef = parent::getFieldDefinition($arrOverrides); | ||
| $arrFieldDef['eval']['rgxp'] = $strDateType; | ||
| $arrFieldDef['eval']['datepicker'] = ($strDateType !== 'time'); | ||
| $arrFieldDef['eval']['datepicker'] = !empty($arrFieldDef['eval']['readonly'])?false:true; |
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 change this to $arrFieldDef['eval']['datepicker'] = empty($arrFieldDef['eval']['readonly']); as the result is already boolean.
Since when is time picker supported? Do we need to bump the minimum version in composer.json along the way?
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.
is this necessary?
...the attribute timestamp require "contao/core" and this require "contao-components/all" and this require "contao-components/datepicker"
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.
... o.k. separate PR
| $arrFieldDef['eval']['rgxp'] = $strDateType; | ||
| $arrFieldDef['eval']['datepicker'] = !empty($arrFieldDef['eval']['readonly'])?false:true; | ||
| $arrFieldDef['eval']['datepicker'] = empty($arrFieldDef['eval']['readonly']); | ||
| $arrFieldDef['eval']['tl_class'] .= ' wizard'; |
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.
Shouldn't this class only be added when there really is a wizard?
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.
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.
I fail to see the benefit of adding an icon which will never be clickable at all.
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.
I fail to see the benefit of adding an icon which will never be clickable at all.
it´s "contao standard" - the most icons habe a disabled status as "grey"
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.
Where do we have disabled wizards in Contao? O.o
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.
not disabled wizards, but icons with status "disabled"
|
@discordier with commit 8059400 should the label "Up for discussion" obsolete... and "we" can merge this... |
6925cc7 to
05ca89f
Compare
Squashed commit: [37e87aa] add css class 'wizard' [7cb826d] fix MetaModels#21 (review)
05ca89f to
bfda4ee
Compare
Squashed commit: [37e87aa] add css class 'wizard' [7cb826d] fix MetaModels#21 (review) (+1 squashed commits) Squashed commits: [251a525] Hotfix hide datepicker is widget readonly
bfda4ee to
3aaceb6
Compare
|
? |
|
without this its not possible to save a input mask with readonly timestamp |
| $arrFieldDef = parent::getFieldDefinition($arrOverrides); | ||
| $arrFieldDef['eval']['rgxp'] = $strDateType; | ||
|
|
||
| if (!empty($arrFieldDef['eval']['readonly'])) { |
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.
false condition :-(
- if (!empty($arrFieldDef['eval']['readonly'])) {
+ if (empty($arrFieldDef['eval']['readonly'])) {|
Eh, YOU told me it is ok to merge. |
|
nobody is perfect :-( |
|
Ok, we will fix. Need a unit test then. ;) |

Hotfix hide datepicker is widget readonly and activate picker also for time