• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

contributte / forms-bootstrap / #56

12 Mar 2024 07:04PM UTC coverage: 82.649% (-0.7%) from 83.353%
#56

Pull #90

github

dakorpar
BC: Compatibility with nette/forms 3.1.14
renamed addDate, addDateTime to addBootstrapDate and addBootstrapDateTime.
added Date/DateTime/Time/Color inputs which acts as default nette forms
Pull Request #90: BC: Compatibility with nette/forms 3.1.14

15 of 25 new or added lines in 3 files covered. (60.0%)

15 existing lines in 1 file now uncovered.

705 of 853 relevant lines covered (82.65%)

5.6 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

66.67
/src/Inputs/DateTimeControl.php
1
<?php declare(strict_types = 1);
2

3
namespace Contributte\FormsBootstrap\Inputs;
4

5
use Contributte\FormsBootstrap\BootstrapUtils;
6
use Contributte\FormsBootstrap\Traits\StandardValidationTrait;
7
use Nette\Utils\Html;
8

9
class DateTimeControl extends \Nette\Forms\Controls\DateTimeControl
10
{
11
        use StandardValidationTrait;
12

13
        /** @var string[] */
14
        public static $additionalHtmlClasses = [];
15

16
        /**
17
         * Input accepted format.
18
         * Default is d.m.yyyy
19
         *
20
         * @var string
21
         */
22
        private $format;
23

24
        /** @var bool */
25
        private $isValidated = false;
26

27
        public function getControl(): Html
28
        {
29
                $control = parent::getControl();
1✔
30
                BootstrapUtils::standardizeClass($control);
1✔
31

32
                $control->class[] = 'form-control';
1✔
33

34
                return $control;
1✔
35
        }
36

37
        /**
38
         * @inheritdoc
39
         */
40
        public function validate(): void
41
        {
NEW
42
                parent::validate();
×
43

NEW
44
                $this->isValidated = true;
×
45
        }
46

47
}
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2025 Coveralls, Inc