fix browser date picker

master
Jean-Christian Paul Denis 2022-04-27 12:04:29 +02:00
parent b62a33f302
commit 81f2a3f967
Signed by: JcDenis
GPG Key ID: 1B5B8C5B90B6C951
6 changed files with 37 additions and 21 deletions

View File

@ -1,6 +1,9 @@
2021.08.20.1 - dev 2022.04.27.1 - dev
- [ ] fix wrong timezone on admin vs public expired date - [ ] fix wrong timezone on admin vs public expired date
- [x] clean up again...
2022.04.27
- require Dotclear 2.21.3
- fix browser date picker
2021.08.20 2021.08.20
- fix metadata call - fix metadata call

View File

@ -1,5 +1,13 @@
# README # 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 ? ## WHAT IS POSTEXPIRED ?
Post expired is a plugin for the open-source 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: postExpired requires:
* contentadmin permissions * contentadmin permissions
* Dotclear 2.6 * Dotclear 2.21.3
## USAGE ## USAGE
@ -31,8 +39,15 @@ Notes:
* Only one expired date per post is supported * Only one expired date per post is supported
* Expired dates are checked from public home page and feed page * 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) * Source & contribution : [GitHub Page](https://github.com/JcDenis/postExpired)
* Packages & details: [Dotaddict Page](https://plugins.dotaddict.org/dc2/details/postExpired) * 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.

View File

@ -215,7 +215,7 @@ class adminBehaviorPostExpired
$pa->getCallerTitle() => $pa->getRedirection(true), $pa->getCallerTitle() => $pa->getRedirection(true),
__('Add expired date to this selection') => '' __('Add expired date to this selection') => ''
)), )),
dcPage::jsDatePicker() . //dcPage::jsDatePicker() .
self::adminPostHeaders() self::adminPostHeaders()
); );
@ -346,13 +346,11 @@ class adminBehaviorPostExpired
$fields['post_expired_date'] = $fields['post_expired_date'] =
'<p><label for="post_expired_date">' . '<p><label for="post_expired_date">' .
__('Date:') . '</label>' . __('Date:') . '</label>' .
form::field( form::datetime('post_expired_date', [
'post_expired_date', 'default' => html::escapeHTML(dt::str('%Y-%m-%dT%H:%M', strtotime($post_expired['date'] ?? 0))),
16, 'class' => (empty($post_expired['date']) ? 'invalid' : ''),
16, ])
empty($post_expired['date']) ? . '</p>';
'' : $post_expired['date']
) . '</p>';
$fields['post_expired_status'] = $fields['post_expired_status'] =
'<h5>' . __('On this date, change:') . '</h5>' . '<h5>' . __('On this date, change:') . '</h5>' .

View File

@ -19,9 +19,9 @@ $this->registerModule(
'Expired entries', 'Expired entries',
'Change entries options at a given date', 'Change entries options at a given date',
'Jean-Christian Denis and Contributors', 'Jean-Christian Denis and Contributors',
'2021.09.10', '2022.04.27',
[ [
'requires' => [['core', '2.19']], 'requires' => [['core', '2.21']],
'permissions' => 'usage,contentadmin', 'permissions' => 'usage,contentadmin',
'type' => 'plugin', 'type' => 'plugin',
'support' => 'https://github.com/JcDenis/postExpired', 'support' => 'https://github.com/JcDenis/postExpired',

View File

@ -16,7 +16,7 @@ if (!defined('DC_CONTEXT_ADMIN')) {
} }
# -- Module specs -- # -- Module specs --
$dc_min = '2.18'; $dc_min = '2.21';
$mod_id = 'postExpired'; $mod_id = 'postExpired';
# -- Nothing to change below -- # -- Nothing to change below --

View File

@ -1,11 +1,11 @@
<modules xmlns:da="http://dotaddict.org/da/"> <modules xmlns:da="http://dotaddict.org/da/">
<module id="postExpired"> <module id="postExpired">
<name>Billets périmés</name> <name>Billets périmés</name>
<version>2021.09.10</version> <version>2022.04.27</version>
<author>Jean-Christian Denis and Contributors</author> <author>Jean-Christian Denis and Contributors</author>
<desc>Change entries options at a given date</desc> <desc>Change entries options at a given date</desc>
<file>https://github.com/JcDenis/postExpired/releases/download/v2021.09.10/plugin-postExpired.zip</file> <file>https://github.com/JcDenis/postExpired/releases/download/v2022.04.27/plugin-postExpired.zip</file>
<da:dcmin>2.19</da:dcmin> <da:dcmin>2.121</da:dcmin>
<da:details>https://plugins.dotaddict.org/dc2/details/postExpired</da:details> <da:details>https://plugins.dotaddict.org/dc2/details/postExpired</da:details>
<da:support>https://github.com/JcDenis/postExpired</da:support> <da:support>https://github.com/JcDenis/postExpired</da:support>
</module> </module>