From ac6d4f3038a9a244f69e1001799597e1752ceeb3 Mon Sep 17 00:00:00 2001 From: Ingo Schommer Date: Fri, 31 Mar 2017 10:36:36 +1300 Subject: [PATCH] Move DateField->placeholders to subclass MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit It’s only used there --- src/Forms/DateField.php | 29 ----------------------------- src/Forms/SeparatedDateField.php | 29 +++++++++++++++++++++++++++++ 2 files changed, 29 insertions(+), 29 deletions(-) diff --git a/src/Forms/DateField.php b/src/Forms/DateField.php index ea3e3a7dc..4df37bb3f 100644 --- a/src/Forms/DateField.php +++ b/src/Forms/DateField.php @@ -85,13 +85,6 @@ class DateField extends TextField */ protected $dateLength = null; - /** - * Set whether to show placeholders - * - * @var bool - */ - protected $placeholders = true; - /** * Override locale for client side. * @@ -475,28 +468,6 @@ class DateField extends TextField return $rules; } - /** - * If placeholders are shown - * - * @return bool - */ - public function getPlaceholders() - { - return $this->placeholders; - } - - /** - * Set if placeholders are shown - * - * @param bool $placeholders - * @return $this - */ - public function setPlaceholders($placeholders) - { - $this->placeholders = $placeholders; - return $this; - } - /** * @return string */ diff --git a/src/Forms/SeparatedDateField.php b/src/Forms/SeparatedDateField.php index 8580a1e48..8f49c452e 100644 --- a/src/Forms/SeparatedDateField.php +++ b/src/Forms/SeparatedDateField.php @@ -15,6 +15,13 @@ class SeparatedDateField extends DateField */ protected $separator = '/'; + /** + * Set whether to show placeholders + * + * @var bool + */ + protected $placeholders = true; + public function Field($properties = array()) { // Three separate fields for day, month and year @@ -82,6 +89,28 @@ class SeparatedDateField extends DateField return $this->separator; } + /** + * If placeholders are shown + * + * @return bool + */ + public function getPlaceholders() + { + return $this->placeholders; + } + + /** + * Set if placeholders are shown + * + * @param bool $placeholders + * @return $this + */ + public function setPlaceholders($placeholders) + { + $this->placeholders = $placeholders; + return $this; + } + /** * Convert array to timestamp *