Skip to content

Commit

Permalink
Code style fix
Browse files Browse the repository at this point in the history
  • Loading branch information
Nayjest committed Apr 24, 2015
1 parent c33e25b commit 88977ef
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions resources/views/default/filters/select.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
/** @var Nayjest\Grids\SelectFilterConfig $cfg */
$cfg = $filter->getConfig();
$onchange = '';
if(method_exists($cfg,'isSubmittedOnChange') && $cfg->isSubmittedOnChange()) {
if (method_exists($cfg, 'isSubmittedOnChange') && $cfg->isSubmittedOnChange()) {
$onchange = 'onchange="this.form.submit()"';
}
?>
Expand All @@ -14,7 +14,13 @@ class="form-control input-sm"
>
<option value="">--//--</option>
<?php foreach ($filter->getConfig()->getOptions() as $value => $label): ?>
<?php $maybe_selected = ($filter->getValue() == $value && $filter->getValue() !== '' and $filter->getValue() !== null) ? 'selected="selected"':'' ?>
<?php
$maybe_selected = (
$filter->getValue() == $value
&& $filter->getValue() !== ''
&& $filter->getValue() !== null
) ? 'selected="selected"' : ''
?>
<option <?= $maybe_selected ?> value="<?= $value ?>">
<?= $label ?>
</option>
Expand Down

0 comments on commit 88977ef

Please sign in to comment.