diff --git a/CHANGELOG.md b/CHANGELOG.md index 061bed0..754b54b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,9 @@ -2021.08.20.1 - dev - - [ ] fix wrong timezone on admin vs public expired date - - [x] clean up again... +2022.04.27.1 - dev +- [ ] fix wrong timezone on admin vs public expired date + +2022.04.27 +- require Dotclear 2.21.3 +- fix browser date picker 2021.08.20 - fix metadata call diff --git a/README.md b/README.md index b25750e..c9397e4 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,13 @@ # README +[![Release](https://img.shields.io/github/v/release/JcDenis/postExpired)](https://github.com/JcDenis/postExpired/releases) +[![Date](https://img.shields.io/github/release-date/JcDenis/postExpired)](https://github.com/JcDenis/postExpired/releases) +[![Issues](https://img.shields.io/github/issues/JcDenis/postExpired)](https://github.com/JcDenis/postExpired/issues) +[![Dotclear](https://img.shields.io/badge/dotclear-v2.20-blue.svg)](https://fr.dotclear.org/download) +[![Dotaddict](https://img.shields.io/badge/dotaddict-official-green.svg)](https://plugins.dotaddict.org/dc2/details/postExpired) +[![License](https://img.shields.io/github/license/JcDenis/postExpired)](https://github.com/JcDenis/postExpired/blob/master/LICENSE) + + ## WHAT IS POSTEXPIRED ? Post expired is a plugin for the open-source @@ -13,7 +21,7 @@ to change some options of a post at a given time. postExpired requires: * contentadmin permissions - * Dotclear 2.6 + * Dotclear 2.21.3 ## USAGE @@ -31,8 +39,15 @@ Notes: * Only one expired date per post is supported * Expired dates are checked from public home page and feed page -## MORE +## LINKS - * License : GNU GPL v2 + * License : [GNU GPL v2](https://www.gnu.org/licenses/old-licenses/lgpl-2.0.html) * Source & contribution : [GitHub Page](https://github.com/JcDenis/postExpired) - * Packages & details: [Dotaddict Page](https://plugins.dotaddict.org/dc2/details/postExpired) \ No newline at end of file + * Packages & details: [Dotaddict Page](https://plugins.dotaddict.org/dc2/details/postExpired) + * Discuss & help: [Dotclear Forum](https://forum.dotclear.org/viewtopic.php?id=42305) + +## CONTRIBUTORS + + * Jean-Christian Denis + + You are welcome to contribute to this code. \ No newline at end of file diff --git a/_admin.php b/_admin.php index 98111bf..8b9d786 100644 --- a/_admin.php +++ b/_admin.php @@ -215,7 +215,7 @@ class adminBehaviorPostExpired $pa->getCallerTitle() => $pa->getRedirection(true), __('Add expired date to this selection') => '' )), - dcPage::jsDatePicker() . + //dcPage::jsDatePicker() . self::adminPostHeaders() ); @@ -346,13 +346,11 @@ class adminBehaviorPostExpired $fields['post_expired_date'] = '
' . - form::field( - 'post_expired_date', - 16, - 16, - empty($post_expired['date']) ? - '' : $post_expired['date'] - ) . '
'; + form::datetime('post_expired_date', [ + 'default' => html::escapeHTML(dt::str('%Y-%m-%dT%H:%M', strtotime($post_expired['date'] ?? 0))), + 'class' => (empty($post_expired['date']) ? 'invalid' : ''), + ]) + . ''; $fields['post_expired_status'] = '