Skip to content
Snippets Groups Projects
Commit 8cfd8940 authored by Jan-Hendrik Willms's avatar Jan-Hendrik Willms Committed by Jan-Hendrik Willms
Browse files

fixes #4274

Closes #4274

Merge request studip/studip!3094
parent bd028fd8
No related branches found
No related tags found
No related merge requests found
...@@ -307,6 +307,7 @@ select.sidebar-selectlist { ...@@ -307,6 +307,7 @@ select.sidebar-selectlist {
flex: 1; flex: 1;
padding: .25em .5em; padding: .25em .5em;
width: 100%; width: 100%;
order: 1;
} }
.submit-search { .submit-search {
...@@ -318,17 +319,22 @@ select.sidebar-selectlist { ...@@ -318,17 +319,22 @@ select.sidebar-selectlist {
cursor: pointer; cursor: pointer;
font: 0/0 a; font: 0/0 a;
text-shadow: none; text-shadow: none;
order: 3;
} }
.reset-search { .reset-search {
background-color: transparent; background: unset;
border: 1px solid var(--dark-gray-color-30);
border-left: 0;
border-right: 0;
display: inline-block; display: inline-block;
padding-right: 5px;
padding-top: 4px;
cursor: pointer; cursor: pointer;
order: 2;
height: 100%;
box-sizing: border-box;
margin-right: 2px;
margin-left: -22px;
img {
padding-top: 4px;
}
} }
} }
......
...@@ -24,25 +24,24 @@ ...@@ -24,25 +24,24 @@
<? if ($needle['placeholder']) printf('placeholder="%s"', htmlReady($needle['label'])); ?> <? if ($needle['placeholder']) printf('placeholder="%s"', htmlReady($needle['label'])); ?>
<?= arrayToHtmlAttributes($needle['attributes']) ?>> <?= arrayToHtmlAttributes($needle['attributes']) ?>>
<? endif; ?> <? endif; ?>
<? if ($reset_link): ?>
<? if ($onsubmit) : ?>
<?= Icon::create('decline')->asInput([
'title' => _('Suche zurücksetzen'),
'class' => 'reset-search',
'onclick' => "window.document.getElementById('needle-".$hash."').value = '';"
]) ?>
<? else : ?>
<a class="reset-search" href="<?= $reset_link ?>" tabindex="0" role="button"
<?= $onsubmit ? 'onclick="'."window.document.getElementById('needle-".$hash."').value = ''; window.document.getElementById('".$id."').submit(); return false; ".'"' : '' ?>
title="<?= _('Suche zurücksetzen') ?>">
<?= Icon::create('decline')->asImg(20) ?>
</a>
<? endif ?>
<? endif; ?>
<button type="submit" class="submit-search<?= $reset_link ? ' is-executed' : '' ?>" <button type="submit" class="submit-search<?= $reset_link ? ' is-executed' : '' ?>"
title="<?= _('Suche ausführen') ?>"> title="<?= _('Suche ausführen') ?>">
<?= Icon::create('search')->asImg(20) ?> <?= Icon::create('search')->asImg(20) ?>
</button> </button>
<? if ($reset_link): ?>
<? if ($onsubmit) : ?>
<?= Icon::create('decline')->asInput([
'title' => _('Suche zurücksetzen'),
'class' => 'reset-search',
'onclick' => "document.getElementById('needle-".$hash."').value = ''; this.remove();"
]) ?>
<? else : ?>
<a class="reset-search" href="<?= $reset_link ?>" tabindex="0" role="button"
title="<?= _('Suche zurücksetzen') ?>">
<?= Icon::create('decline')->asImg(20) ?>
</a>
<? endif ?>
<? endif; ?>
</li> </li>
<? endforeach; ?> <? endforeach; ?>
</ul> </ul>
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment