Skip to content

Commit

Permalink
no separator space in template class values
Browse files Browse the repository at this point in the history
  • Loading branch information
mvorisek committed Jun 5, 2023
1 parent 5e302f1 commit 148ccf3
Show file tree
Hide file tree
Showing 9 changed files with 12 additions and 12 deletions.
4 changes: 2 additions & 2 deletions src/Form/Control/Dropdown.php
Original file line number Diff line number Diff line change
Expand Up @@ -232,10 +232,10 @@ protected function renderView(): void
}

if ($this->disabled) {
$this->template->set('disabledClass', ' disabled');
$this->template->set('disabledClass', 'disabled');
$this->template->dangerouslySetHtml('disabled', 'disabled="disabled"');
} elseif ($this->readOnly) {
$this->template->set('disabledClass', ' read-only');
$this->template->set('disabledClass', 'read-only');
$this->template->dangerouslySetHtml('disabled', 'readonly="readonly"');

$this->setDropdownOption('allowTab', false);
Expand Down
4 changes: 2 additions & 2 deletions src/Form/Control/Lookup.php
Original file line number Diff line number Diff line change
Expand Up @@ -363,12 +363,12 @@ protected function renderView(): void
}

if ($this->disabled) {
$this->template->set('disabledClass', ' disabled');
$this->template->set('disabledClass', 'disabled');
$this->template->dangerouslySetHtml('disabled', 'disabled="disabled"');

$this->settings['allowTab'] = false;
} elseif ($this->readOnly) {
$this->template->set('disabledClass', ' read-only');
$this->template->set('disabledClass', 'read-only');
$this->template->dangerouslySetHtml('disabled', 'readonly="readonly"');

$this->settings['allowTab'] = false;
Expand Down
4 changes: 2 additions & 2 deletions src/Form/Control/Radio.php
Original file line number Diff line number Diff line change
Expand Up @@ -40,10 +40,10 @@ protected function renderView(): void

$this->lister->onHook(Lister::HOOK_BEFORE_ROW, function (Lister $lister) use ($value) {
if ($this->disabled) {
$lister->tRow->dangerouslySetHtml('disabledClass', ' disabled');
$lister->tRow->dangerouslySetHtml('disabledClass', 'disabled');
$lister->tRow->dangerouslySetHtml('disabled', 'disabled="disabled"');
} elseif ($this->readOnly) {
$lister->tRow->dangerouslySetHtml('disabledClass', ' read-only');
$lister->tRow->dangerouslySetHtml('disabledClass', 'read-only');
$lister->tRow->dangerouslySetHtml('disabled', 'readonly="readonly"');
}

Expand Down
2 changes: 1 addition & 1 deletion template/form/control/dropdown.html
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@

<div {$attributes}>
{$BeforeInput}{$AfterBeforeInput}
<div class="ui dropdown {$multipleClass} search selection{$disabledClass}" style="width: 100%;">
<div class="ui dropdown {$multipleClass} search selection {$disabledClass}" style="width: 100%;">
{$Input}
<i class="dropdown icon"></i>
<div class="default text">{$DefaultText}</div>
Expand Down
2 changes: 1 addition & 1 deletion template/form/control/dropdown.pug
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
| <div {$attributes}>
| {$BeforeInput}{$AfterBeforeInput}
| <div class="ui dropdown {$multipleClass} search selection{$disabledClass}" style="width: 100%;">
| <div class="ui dropdown {$multipleClass} search selection {$disabledClass}" style="width: 100%;">
| {$Input}
| <i class="dropdown icon"></i>
| <div class="default text">{$DefaultText}</div>
Expand Down
2 changes: 1 addition & 1 deletion template/form/control/lookup.html
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@

<div {$attributes}>
{$BeforeInput}{$AfterBeforeInput}
<div class="ui dropdown {$multipleClass} search selection{$disabledClass}" style="width: 100%;">
<div class="ui dropdown {$multipleClass} search selection {$disabledClass}" style="width: 100%;">
{$Input}
<i class="dropdown icon"></i>
<div class="default text">{$placeholder}</div>
Expand Down
2 changes: 1 addition & 1 deletion template/form/control/lookup.pug
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
| <div {$attributes}>
| {$BeforeInput}{$AfterBeforeInput}
| <div class="ui dropdown {$multipleClass} search selection{$disabledClass}" style="width: 100%;">
| <div class="ui dropdown {$multipleClass} search selection {$disabledClass}" style="width: 100%;">
| {$Input}
| <i class="dropdown icon"></i>
| <div class="default text">{$placeholder}</div>
Expand Down
2 changes: 1 addition & 1 deletion template/form/control/radio.html
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@

<div {$attributes}>
{Radio}{rows}{row}
<div class="field"><div class="ui checkbox radio{$disabledClass}">
<div class="field"><div class="ui checkbox radio {$disabledClass}">
<input id="{$_id}_input" type="radio" name="{$_name}" value="{$id}" {$checked} {$disabled}>
<label for="{$_id}_input">{$name}</label>
</div></div>
Expand Down
2 changes: 1 addition & 1 deletion template/form/control/radio.pug
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
| <div {$attributes}>
| {Radio}{rows}{row}
| <div class="field"><div class="ui checkbox radio{$disabledClass}">
| <div class="field"><div class="ui checkbox radio {$disabledClass}">
| <input id="{$_id}_input" type="radio" name="{$_name}" value="{$id}" {$checked} {$disabled}>
| <label for="{$_id}_input">{$name}</label>
| </div></div>
Expand Down

0 comments on commit 148ccf3

Please sign in to comment.