Skip to content

Commit

Permalink
#9: added missing input types
Browse files Browse the repository at this point in the history
  • Loading branch information
DennisBirkholz committed Aug 31, 2017
1 parent b05cc39 commit 4f67d82
Show file tree
Hide file tree
Showing 13 changed files with 25 additions and 16 deletions.
4 changes: 2 additions & 2 deletions src/Html/CheckboxInput.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,11 @@
*/
final class CheckboxInput extends Input
{
const TYPE = 'checkbox';

use InputCheckedAttributeTrait;
use InputRequiredAttributeTrait;

const TYPE = 'checkbox';

protected function renderAttributes() : string
{
return parent::renderAttributes()
Expand Down
4 changes: 2 additions & 2 deletions src/Html/ColorInput.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,10 @@
*/
final class ColorInput extends Input
{
const TYPE = 'color';

use InputAutocompleteAttributeTrait;

const TYPE = 'color';

protected function renderAttributes() : string
{
return parent::renderAttributes()
Expand Down
4 changes: 2 additions & 2 deletions src/Html/DateInput.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,13 +16,13 @@
*/
final class DateInput extends Input
{
const TYPE = 'date';

use InputAutocompleteAttributeTrait;
use InputMinMaxStepAttributeTrait;
use InputReadonlyAttributeTrait;
use InputRequiredAttributeTrait;

const TYPE = 'date';

protected function renderAttributes() : string
{
return parent::renderAttributes()
Expand Down
4 changes: 2 additions & 2 deletions src/Html/EmailInput.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,15 +16,15 @@
*/
final class EmailInput extends Input
{
const TYPE = 'email';

use InputAutocompleteAttributeTrait;
use InputMinLengthMaxLengthPatternSizeAttributesTrait;
use InputMultipleAttributeTrait;
use InputPlaceholderAttributeTrait;
use InputReadonlyAttributeTrait;
use InputRequiredAttributeTrait;

const TYPE = 'email';

protected function renderAttributes() : string
{
return parent::renderAttributes()
Expand Down
4 changes: 2 additions & 2 deletions src/Html/FileInput.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,11 @@
*/
final class FileInput extends Input
{
const TYPE = 'file';

use InputMultipleAttributeTrait;
use InputRequiredAttributeTrait;

const TYPE = 'file';

/**
* @var string
* @link https://www.w3.org/TR/html5/forms.html#attr-input-accept
Expand Down
4 changes: 2 additions & 2 deletions src/Html/NumberInput.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,14 +18,14 @@
*/
final class NumberInput extends Input
{
const TYPE = 'number';

use InputAutocompleteAttributeTrait;
use InputMinMaxStepAttributeTrait;
use InputPlaceholderAttributeTrait;
use InputReadonlyAttributeTrait;
use InputRequiredAttributeTrait;

const TYPE = 'number';

protected function renderAttributes() : string
{
return parent::renderAttributes()
Expand Down
4 changes: 2 additions & 2 deletions src/Html/RadioInput.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,11 @@
*/
final class RadioInput extends Input
{
const TYPE = 'radio';

use InputCheckedAttributeTrait;
use InputRequiredAttributeTrait;

const TYPE = 'radio';

protected function renderAttributes() : string
{
return parent::renderAttributes()
Expand Down
4 changes: 2 additions & 2 deletions src/Html/RangeInput.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,11 @@
*/
final class RangeInput extends Input
{
const TYPE = 'range';

use InputAutocompleteAttributeTrait;
use InputMinMaxStepAttributeTrait;

const TYPE = 'range';

protected function renderAttributes() : string
{
return parent::renderAttributes()
Expand Down
2 changes: 2 additions & 0 deletions src/Html/SearchInput.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@ final class SearchInput extends Input
use InputAutocompleteAttributeTrait;
use InputMinLengthMaxLengthPatternSizeAttributesTrait;

const TYPE = 'search';

protected function renderAttributes() : string
{
return parent::renderAttributes()
Expand Down
1 change: 1 addition & 0 deletions src/Html/SubmitInput.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,4 +16,5 @@
*/
final class SubmitInput extends Input
{
const TYPE = 'submit';
}
2 changes: 2 additions & 0 deletions src/Html/TelInput.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@ final class TelInput extends Input
use InputAutocompleteAttributeTrait;
use InputMinLengthMaxLengthPatternSizeAttributesTrait;

const TYPE = 'tel';

protected function renderAttributes() : string
{
return parent::renderAttributes()
Expand Down
2 changes: 2 additions & 0 deletions src/Html/TextInput.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@ final class TextInput extends Input
use InputAutocompleteAttributeTrait;
use InputMinLengthMaxLengthPatternSizeAttributesTrait;

const TYPE = 'text';

protected function renderAttributes() : string
{
return parent::renderAttributes()
Expand Down
2 changes: 2 additions & 0 deletions src/Html/TimeInput.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@ final class TimeInput extends Input
use InputAutocompleteAttributeTrait;
use InputMinMaxStepAttributeTrait;

const TYPE = 'time';

protected function renderAttributes() : string
{
return parent::renderAttributes()
Expand Down

0 comments on commit 4f67d82

Please sign in to comment.