Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

marcar visualmente los filtros aplicados #1685

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Core/Lib/ListFilter/AutocompleteFilter.php
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ public function render(): string
. '</button>';
}

$html .= '<input type="text" value="' . $this->getDescription() . '" class="form-control filter-autocomplete"'
$html .= '<input type="text" value="' . $this->getDescription() . '" class="form-control filter-autocomplete' . ($this->value ? ' is-valid' : '') . '"'
. ' data-name="' . $this->name() . '" data-field="' . $this->field . '" data-source="' . $this->table . '" data-fieldcode="' . $this->fieldcode
. '" data-fieldtitle="' . $this->fieldtitle . '" placeholder = "' . $label . '" autocomplete="off" ' . $this->readonly() . '/>'
. '</div>'
Expand Down
2 changes: 1 addition & 1 deletion Core/Lib/ListFilter/CheckboxFilter.php
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ public function render(): string
. '<div class="mb-3">'
. '<div class="form-check mb-2 mb-sm-0">'
. '<label class="form-check-label me-3">'
. '<input class="form-check-input" type="checkbox" name="' . $this->name() . '" value="TRUE"' . $extra . $this->onChange() . $this->readonly() . '/>'
. '<input class="form-check-input' . ($this->value ? ' is-valid' : '') . '" type="checkbox" name="' . $this->name() . '" value="TRUE"' . $extra . $this->onChange() . $this->readonly() . '/>'
. static::$i18n->trans($this->label)
. '</label>'
. '</div>'
Expand Down
2 changes: 1 addition & 1 deletion Core/Lib/ListFilter/DateFilter.php
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ public function render(): string
. ''
. '<span class="input-group-text">' . $this->operation . ''
. '</span>'
. '<input type="date" name="' . $this->name() . '" value="' . $value . '" class="form-control"'
. '<input type="date" name="' . $this->name() . '" value="' . $value . '" class="form-control' . ($this->value ? ' is-valid' : '') . '"'
. ' autocomplete="off"' . $this->onChange() . $this->readonly() . '/>'
. '</div>'
. '</div>'
Expand Down
2 changes: 1 addition & 1 deletion Core/Lib/ListFilter/NumberFilter.php
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ public function render(): string
. ''
. '<span class="input-group-text">' . $this->operation . ''
. '</span>'
. '<input type="text" name="' . $this->name() . '" value="' . $this->value . '" class="form-control" placeholder="'
. '<input type="text" name="' . $this->name() . '" value="' . $this->value . '" class="form-control' . ($this->value ? ' is-valid' : '') . '" placeholder="'
. static::$i18n->trans($this->label) . '" autocomplete="off"' . $this->onChange() . $this->readonly() . '/>'
. '</div>'
. '</div>'
Expand Down
4 changes: 2 additions & 2 deletions Core/Lib/ListFilter/SelectFilter.php
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ public function render(): string
if (empty($this->icon)) {
return '<div class="col-sm-3 col-lg-2">'
. '<div class="mb-3">'
. '<select name="' . $this->name() . '" class="form-control"' . $this->onChange() . $this->readonly()
. '<select name="' . $this->name() . '" class="form-control' . ($this->value ? ' is-valid' : '') . '"' . $this->onChange() . $this->readonly()
. ' title="' . static::$i18n->trans($this->label) . '">' . $this->getHtmlOptions()
. '</select>'
. '</div>'
Expand All @@ -73,7 +73,7 @@ public function render(): string
. '<i class="' . $this->icon . ' fa-fw" aria-hidden="true"></i>'
. ''
. '</span>'
. '<select name="' . $this->name() . '" class="form-control"' . $this->onChange() . $this->readonly() . '>'
. '<select name="' . $this->name() . '" class="form-control' . ($this->value ? ' is-valid' : '') . '"' . $this->onChange() . $this->readonly() . '>'
. $this->getHtmlOptions()
. '</select>'
. '</div>'
Expand Down