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'] = '
' . __('On this date, change:') . '
' . diff --git a/_define.php b/_define.php index df487cb..81a053e 100644 --- a/_define.php +++ b/_define.php @@ -19,9 +19,9 @@ $this->registerModule( 'Expired entries', 'Change entries options at a given date', 'Jean-Christian Denis and Contributors', - '2021.09.10', + '2022.04.27', [ - 'requires' => [['core', '2.19']], + 'requires' => [['core', '2.21']], 'permissions' => 'usage,contentadmin', 'type' => 'plugin', 'support' => 'https://github.com/JcDenis/postExpired', diff --git a/_install.php b/_install.php index e3fea2e..1a38f9d 100644 --- a/_install.php +++ b/_install.php @@ -16,7 +16,7 @@ if (!defined('DC_CONTEXT_ADMIN')) { } # -- Module specs -- -$dc_min = '2.18'; +$dc_min = '2.21'; $mod_id = 'postExpired'; # -- Nothing to change below -- diff --git a/dcstore.xml b/dcstore.xml index 2415a99..3b6e937 100644 --- a/dcstore.xml +++ b/dcstore.xml @@ -1,11 +1,11 @@ Billets périmés -2021.09.10 +2022.04.27 Jean-Christian Denis and Contributors Change entries options at a given date -https://github.com/JcDenis/postExpired/releases/download/v2021.09.10/plugin-postExpired.zip -2.19 +https://github.com/JcDenis/postExpired/releases/download/v2022.04.27/plugin-postExpired.zip +2.121 https://plugins.dotaddict.org/dc2/details/postExpired https://github.com/JcDenis/postExpired