diff --git a/.check-author.yml b/.check-author.yml index 327ea68..0a6863c 100644 --- a/.check-author.yml +++ b/.check-author.yml @@ -6,7 +6,10 @@ exclude: languages mapping: - Andreas Isaak : Andreas Isaak + "Andreas Isaak ": "Andreas Isaak " + "Ingolf Steinhardt ": + - "xantippe " + - "zonky2 " copy-left: "Stefan Heimes ": diff --git a/src/MetaModels/Attribute/Timestamp/Timestamp.php b/src/MetaModels/Attribute/Timestamp/Timestamp.php index 7378215..0178b98 100644 --- a/src/MetaModels/Attribute/Timestamp/Timestamp.php +++ b/src/MetaModels/Attribute/Timestamp/Timestamp.php @@ -1,12 +1,15 @@ @@ -15,8 +18,9 @@ * @author David Greminger * @author David Maack * @author David Molineus - * @copyright The MetaModels team. - * @license LGPL. + * @author Ingolf Steinhardt + * @copyright 2012-2016 The MetaModels team. + * @license https://github.com/MetaModels/attribute_timestamp/blob/master/LICENSE LGPL-3.0 * @filesource */ @@ -30,11 +34,6 @@ /** * This is the MetaModelAttribute class for handling text fields. - * - * @package MetaModels - * @subpackage AttributeTimestamp - * @author Stefan Heimes - * @author Andreas Isaak */ class Timestamp extends Numeric { @@ -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'])) { + $arrFieldDef['eval']['datepicker'] = true; + $arrFieldDef['eval']['tl_class'] .= ' wizard'; + } return $arrFieldDef; }