• 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/ColorPicker.php
1
<?php
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 ColorPicker extends \Nette\Forms\Controls\ColorPicker
10
{
11

12
        use StandardValidationTrait;
13

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

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

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

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

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

35
                return $control;
1✔
36
        }
37

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

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

48
}
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

© 2026 Coveralls, Inc