Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion .check-author.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,10 @@ exclude:
languages

mapping:
Andreas Isaak <info@andreas-isaak.de>: Andreas Isaak <andy.jared@googlemail.com>
"Andreas Isaak <info@andreas-isaak.de>": "Andreas Isaak <andy.jared@googlemail.com>"
"Ingolf Steinhardt <info@e-spin.de>":
- "xantippe <info@e-spin.de>"
- "zonky2 <info@e-spin.de>"

copy-left:
"Stefan Heimes <stefan_heimes@hotmail.com>":
Expand Down
35 changes: 19 additions & 16 deletions src/MetaModels/Attribute/Timestamp/Timestamp.php
Original file line number Diff line number Diff line change
@@ -1,12 +1,15 @@
<?php

/**
* The MetaModels extension allows the creation of multiple collections of custom items,
* each with its own unique set of selectable attributes, with attribute extendability.
* The Front-End modules allow you to build powerful listing and filtering of the
* data in each collection.
* This file is part of MetaModels/attribute_timestamp.
*
* (c) 2012-2016 The MetaModels team.
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*
* This project is provided in good faith and hope to be usable by anyone.
*
* PHP version 5
* @package MetaModels
* @subpackage AttributeTimestamp
* @author Christian Schiffler <c.schiffler@cyberspectrum.de>
Expand All @@ -15,8 +18,9 @@
* @author David Greminger <david.greminger@1up.io>
* @author David Maack <david.maack@arcor.de>
* @author David Molineus <david.molineus@netzmacht.de>
* @copyright The MetaModels team.
* @license LGPL.
* @author Ingolf Steinhardt <info@e-spin.de>
* @copyright 2012-2016 The MetaModels team.
* @license https://github.com/MetaModels/attribute_timestamp/blob/master/LICENSE LGPL-3.0
* @filesource
*/

Expand All @@ -30,11 +34,6 @@

/**
* This is the MetaModelAttribute class for handling text fields.
*
* @package MetaModels
* @subpackage AttributeTimestamp
* @author Stefan Heimes <stefan_heimes@hotmail.com>
* @author Andreas Isaak <info@andreas-isaak.de>
*/
class Timestamp extends Numeric
{
Expand All @@ -51,10 +50,14 @@ public function getSQLDataType()
*/
public function getFieldDefinition($arrOverrides = array())
{
$strDateType = $this->getDateTimeType();
$arrFieldDef = parent::getFieldDefinition($arrOverrides);
$arrFieldDef['eval']['rgxp'] = $strDateType;
$arrFieldDef['eval']['datepicker'] = ($strDateType !== 'time');
$strDateType = $this->getDateTimeType();
$arrFieldDef = parent::getFieldDefinition($arrOverrides);
$arrFieldDef['eval']['rgxp'] = $strDateType;

if (!empty($arrFieldDef['eval']['readonly'])) {
Copy link
Contributor Author

@zonky2 zonky2 Jan 13, 2017

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'])) {

$arrFieldDef['eval']['datepicker'] = true;
$arrFieldDef['eval']['tl_class'] .= ' wizard';
}

return $arrFieldDef;
}
Expand Down