23 lines
723 B
PHP
23 lines
723 B
PHP
|
|
<?
|
||
|
|
|
||
|
|
namespace ui\input;
|
||
|
|
|
||
|
|
class Switch_Ios extends Input {
|
||
|
|
public function render(array $opt = array()): string
|
||
|
|
{
|
||
|
|
return '
|
||
|
|
<div class="form-group" data-input="checkbox" data-name="'.$this->name.'" '.$this->getDataInit().'>
|
||
|
|
'.(($c = $this->options[Input::PLACEHOLDER])?'<label>'.$c.'</label>':'').'
|
||
|
|
<div class="mt-2">
|
||
|
|
<div class="form-check form-check-switchery form-check-inline">
|
||
|
|
<label class="form-check-label">
|
||
|
|
<input type="checkbox" class="form-check-input-switchery" name="'.$this->name.'" '.($this->value?'checked':'').'>
|
||
|
|
'.$this->label.'
|
||
|
|
</label>
|
||
|
|
</div>
|
||
|
|
</div>
|
||
|
|
</div>';
|
||
|
|
}
|
||
|
|
|
||
|
|
|
||
|
|
}
|