19 declare(strict_types=1);
21 require_once(__DIR__ .
"/../../../../../libs/composer/vendor/autoload.php");
22 require_once(__DIR__ .
"/../../../Base.php");
23 require_once(__DIR__ .
"/InputTest.php");
42 $df =
new Data\Factory();
44 return new I\Input\Field\Factory(
58 $cp =
$f->colorpicker(
"label",
"byline");
59 $this->assertInstanceOf(\
ILIAS\
UI\
Component\Input\Container\Form\FormInput::class, $cp);
60 $this->assertInstanceOf(Field\ColorPicker::class, $cp);
69 $cp =
$f->colorpicker($label, $byline)->withNameFrom($this->name_source);
74 <div class="form-group row"> 75 <label class="control-label col-sm-4 col-md-3 col-lg-2">label</label> 76 <div class="col-sm-8 col-md-9 col-lg-10"> 77 <input id="id_1" type="color" name="name_0" value=""/> 78 <div class="help-block">byline</div> 91 $cp =
$f->colorpicker($label, $byline)
92 ->withNameFrom($this->name_source)
99 <div class="form-group row"> 100 <label class="control-label col-sm-4 col-md-3 col-lg-2">label</label> 101 <div class="col-sm-8 col-md-9 col-lg-10"> 102 <input id="id_1" type="color" name="name_0" value=""/> 103 <div class="help-block">byline</div> 116 $cp =
$f->colorpicker($label, $byline)
117 ->withNameFrom($this->name_source)
118 ->withRequired(
true);
124 <div class="form-group row"> 125 <label class="control-label col-sm-4 col-md-3 col-lg-2">label 126 <span class="asterisk">*</span></label> 127 <div class="col-sm-8 col-md-9 col-lg-10"> 128 <input id="id_1" type="color" name="name_0" value=""/> 129 <div class="help-block">byline</div> 142 $cp =
$f->colorpicker($label, $byline)
144 ->withNameFrom($this->name_source);
150 <div class="form-group row"> 151 <label class="control-label col-sm-4 col-md-3 col-lg-2">label</label> 152 <div class="col-sm-8 col-md-9 col-lg-10"> 153 <input id="id_1" type="color" name="name_0" value="value_0"/> 154 <div class="help-block">byline</div> 167 $cp =
$f->colorpicker($label, $byline)
168 ->withNameFrom($this->name_source)
169 ->withRequired(
true);
171 $cp1 = $cp->withInput(
new DefInputData([$name =>
"#FFF"]));
172 $value1 = $cp1->getContent();
173 $this->assertTrue($value1->isOk());
175 $cp2 = $cp->withInput(
new DefInputData([$name =>
"#00"]));
176 $value2 = $cp2->getContent();
177 $this->assertTrue($value2->isError());
180 $value2 = $cp3->getContent();
181 $this->assertTrue($value2->isError());
187 $colorpicker =
$f->colorpicker(
"label",
"byline");
188 $this->expectException(\InvalidArgumentException::class);
189 $colorpicker->withValue(null);
getDefaultRenderer(JavaScriptBinding $js_binding=null, array $with_stub_renderings=[])
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
Class ChatMainBarProvider .
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
brutallyTrimHTML(string $html)
A more radical version of normalizeHTML.
assertHTMLEquals(string $expected_html_as_string, string $html_as_string)
Provides common functionality for UI tests.
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...