-
-
Notifications
You must be signed in to change notification settings - Fork 437
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
Add label, date and datetime picker to system.xml #2739
Conversation
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.
love some new feature
but there's a conflict now |
@luigifab can you please check your repository settings? I cant open a PR there. I'd to use https://github.com/luigifab/magento-lts/compare/new-config-fields...sreichel:magento-lts:new-config-fields manually. PR: https://github.com/luigifab/magento-lts/pull/1 |
I updated some things, not sure if the good ones. |
Please do not force push when your previous commit is used (like in my PR). Now there are conflicts and i cant see what you recently changed. :( |
Oh sorry, ok I didn't check correctly what you did, I only supposed that the problem is the rebase. |
I use force push to, but only when i missied something in my last commit. At the end its more clear to use merge instead of rebase. However .... a hope it was okay to push to your branch. If there is smomething wrong, pls let me know. |
Should we write something in the README? In the "what's different" section? |
done |
Causes edit: Error comes from W/o it works b/c Mage_Core_Model_Config_Element has a __toString method. Still testing ... |
When saving date (w/o format) ...
|
I've change some parts. Everything works, but save datetime is still not correct ... Took fields from @luigifab post and added to cms config section ... There is a 12h offset for datetimes ...
|
I reverted my changes and tested @luigifab initial commit. It does not work. I cant save dates (same error as in my tests yesterday) and also displayed time is wrong. Now it shows |
I tested again with the original commit, with PHP 8.0, with OpenMage locale fr_FR, with browser locale fr_FR, with OpenMage timezone utc+1, with branch 1.9.4.x. For me, when I save my config page with:
I can save my page multiple times, there are no problems. With: But when I change OpenMage locale to en_US, you are right there are some bugs. With your changes, I have a problem: date(time)s are not save in UTC.
With: |
app/code/core/Mage/Adminhtml/Block/System/Config/Form/Field/AbstractDate.php
Outdated
Show resolved
Hide resolved
app/code/core/Mage/Adminhtml/Block/System/Config/Form/Field/Date.php
Outdated
Show resolved
Hide resolved
app/code/core/Mage/Adminhtml/Block/System/Config/Form/Field/Label.php
Outdated
Show resolved
Hide resolved
app/code/core/Mage/Adminhtml/Block/System/Config/Form/Field/Label.php
Outdated
Show resolved
Hide resolved
app/code/core/Mage/Adminhtml/Model/System/Config/Backend/AbstractDate.php
Outdated
Show resolved
Hide resolved
app/code/core/Mage/Adminhtml/Model/System/Config/Backend/AbstractDate.php
Outdated
Show resolved
Hide resolved
app/code/core/Mage/Adminhtml/Model/System/Config/Backend/Date.php
Outdated
Show resolved
Hide resolved
app/code/core/Mage/Adminhtml/Model/System/Config/Backend/Date.php
Outdated
Show resolved
Hide resolved
app/code/core/Mage/Adminhtml/Model/System/Config/Backend/Datetime.php
Outdated
Show resolved
Hide resolved
app/code/core/Mage/Adminhtml/Model/System/Config/Backend/Datetime.php
Outdated
Show resolved
Hide resolved
Closed because this PR can be split in multiple PR, and there are issues... and I will be out there until 2025. |
Latest version is here with IPv6, but incomplete.
Description
Some new fields for system.xml, example:
XML of the screen shot:
There are some bugs with the JS calendar, sometimes it doesn't understand the format, so it's better to use the short format. But this is also another problem.
Date and datetime are stored in UTC time in
core_config_data
. If you check with Adminer, useSET @@session.time_zone='+00:00';
(https://dba.stackexchange.com/q/20217/242650).Contribution checklist