Skip to content
Snippets Groups Projects
Commit 4e798558 authored by Rasmus Fuhse's avatar Rasmus Fuhse
Browse files

Resolve "VA-Administration: Filter nach Text-Datenfelder funktionieren nicht"

Closes #4215

Merge request studip/studip!3042
parent e1c2f5b8
No related branches found
No related tags found
1 merge request!13Draft: integrate debug bar
<form action="<?= URLHelper::getLink($url) ?>"
method="<?= $method ?>"
<? if (isset($id)) printf('id="%s"', htmlReady($id)); ?>
<? $id = $id ?? 'form-'.md5(uniqid()) ?>
<? printf('id="%s"', htmlReady($id)) ?>
<?= $onsubmit ? 'onsubmit="'.htmlReady($onsubmit).'"' : '' ?>
class="sidebar-search">
<? foreach ($url_params as $key => $value): ?>
......@@ -8,9 +9,10 @@
<? endforeach; ?>
<ul class="needles">
<? foreach ($needles as $needle): ?>
<? $hash = md5($url . '|' . $needle['name']) ?>
<li <? if ($needle['quick_search'] && $needle['quick_search']->hasExtendedLayout()) echo 'class="extendedLayout" id="' . $needle['quick_search']->getId() . '_frame"'; ?>>
<div class="input-group files-search">
<label for="needle-<?= $hash = md5($url . '|' . $needle['name']) ?>" <? if ($needle['placeholder']) echo 'style="display:none;"'; ?>>
<label for="needle-<?= $hash ?>" <? if ($needle['placeholder']) echo 'style="display:none;"'; ?>>
<?= htmlReady($needle['label']) ?>
</label>
<? if ($needle['quick_search']): ?>
......@@ -23,10 +25,19 @@
<?= arrayToHtmlAttributes($needle['attributes']) ?>>
<? endif; ?>
<? if ($reset_link): ?>
<a class="reset-search" href="<?= $reset_link ?>" tabindex="0" role="button"
title="<?= _('Suche zurücksetzen') ?>">
<?= Icon::create('decline')->asImg(20) ?>
</a>
<? 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' : '' ?>"
title="<?= _('Suche ausführen') ?>">
......
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