Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
Stud.IP
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Jan-Hendrik Willms
Stud.IP
Commits
1f6cc4e5
Commit
1f6cc4e5
authored
4 months ago
by
David Siegfried
Committed by
Jan-Hendrik Willms
4 months ago
Browse files
Options
Downloads
Patches
Plain Diff
prevent warnings in multiperson-search, fixes #4812
Closes #4812 Merge request
studip/studip!3601
parent
660b1d5f
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
app/views/multipersonsearch/no_js_form.php
+41
-14
41 additions, 14 deletions
app/views/multipersonsearch/no_js_form.php
with
41 additions
and
14 deletions
app/views/multipersonsearch/no_js_form.php
+
41
−
14
View file @
1f6cc4e5
<?php
/**
* @var string $title
* @var MultipersonsearchController $controller
* @var string $name
* @var array $selectableUsersHidden
* @var array $selectedUsersHidden
* @var array $quickfilter
* @var array $selectableUsers
* @var array $selectedUsers
* @var string $search
* @var string $searchPreset
* @var string $additionHTML
*/
?>
<?
if
(
isset
(
$title
))
:
?>
<h1>
<?=
htmlReady
(
$title
)
?>
</h1>
<?
endif
;
?>
<form
method=
"
POST
"
action=
"
<?=
$controller
->
url
_for
(
"
multipersonsearch/no_js_form/?name=
"
.
$name
)
?>
"
>
<form
method=
"
post
"
action=
"
<?=
$controller
->
link
_for
(
'
multipersonsearch/no_js_form/?name=
'
.
$name
)
?>
"
>
<input
type=
"hidden"
name=
"search_persons_selectable_hidden"
value=
"
<?=
htmlReady
(
json_encode
(
$selectableUsersHidden
))
?>
"
>
<input
type=
"hidden"
name=
"search_persons_selected_hidden"
value=
"
<?=
htmlspecialchars
(
json_encode
(
$selectedUsersHidden
))
?>
"
>
<input
type=
"hidden"
name=
"last_search_hidden"
value=
"
<?=
$search
?>
"
>
<input
type=
"hidden"
name=
"last_search_preset"
value=
"
<?=
$searchPreset
?>
"
>
<input
type=
"hidden"
name=
"last_search_hidden"
value=
"
<?=
htmlReady
(
$search
)
?>
"
>
<input
type=
"hidden"
name=
"last_search_preset"
value=
"
<?=
htmlReady
(
$searchPreset
??
''
)
?>
"
>
<input
type=
"hidden"
name=
"not_first_call"
value=
"true"
>
<?=
CSRFProtection
::
tokenTag
()
?>
...
...
@@ -14,23 +29,31 @@
<label>
<input
name=
"freesearch"
type=
"text"
placeholder=
"
<?=
_
(
'Suchen'
)
?>
"
aria-label=
"
<?=
_
(
'Suchbegriff'
)
?>
"
style=
"width: 45%"
value=
"
<?=
$search
?>
"
>
<?=
Icon
::
create
(
'search'
,
'clickable'
,
[
'title'
=>
_
(
'Suche starten'
)])
->
asInput
([
'name'
=>
'submit_search'
,
'class'
=>
'stay_on_dialog'
,])
?>
<?=
Icon
::
create
(
'search'
)
->
asInput
([
'name'
=>
'submit_search'
,
'class'
=>
'stay_on_dialog'
,
'title'
=>
_
(
'Suche starten'
)
])
?>
</label>
<br><br>
<select
name=
"search_preset"
aria-label=
"
<?=
_
(
'Vorauswahl bestimmter Bereiche, alternativ zur Suche'
)
?>
"
style=
"width: 45%"
>
<option>
<?=
_
(
'--- Suchvorlagen ---'
)
?>
</option>
<?
foreach
(
$quickfilter
as
$title
)
:
?>
<option
value=
"
<?=
htmlReady
(
$title
)
?>
"
<?=
$searchPreset
==
$title
?
"
selected
"
:
""
;
?>
>
<option
value=
"
<?=
htmlReady
(
$title
)
?>
"
<?=
isset
(
$searchPreset
)
&&
$searchPreset
=
==
$title
?
'
selected
'
:
''
?>
>
<?=
$title
;
?>
</option>
<?
endforeach
;
?>
</select>
<?=
Icon
::
create
(
'accept'
,
'clickable'
,
[
'title'
=>
_
(
'Vorauswahl anwenden'
)])
->
asInput
([
'name'
=>
'submit_search_preset'
,
'class'
=>
'stay_on_dialog'
])
?>
<?=
Icon
::
create
(
'accept'
)
->
asInput
([
'name'
=>
'submit_search_preset'
,
'class'
=>
'stay_on_dialog'
,
'title'
=>
_
(
'Vorauswahl anwenden'
)
])
?>
<div
id=
"search_persons_content"
>
<div
style=
"display: inline-block; float: left; width: 44%; height: 100%"
>
<label>
<?=
_
(
'Suchergebnis'
)
?>
<br>
<select
id=
"search_persons_selectable"
name=
"search_persons_selectable[]"
style=
"min
W
idth: 200px; width: 100%; height: 116px"
style=
"height: 16px"
multiple
<select
id=
"search_persons_selectable"
name=
"search_persons_selectable[]"
style=
"min
-w
idth: 200px; width: 100%; height: 116px"
style=
"height: 16px"
multiple
aria-label=
"
<?=
_
(
'Gefundene Personen, die der Gruppe hinzugefügt werden können'
)
?>
"
>
<?
if
(
count
(
$selectableUsers
)
==
0
)
:
?>
<option
disabled
>
<?=
_
(
"Keine neuen Suchergebnisse gefunden"
);
?>
</option>
...
...
@@ -46,31 +69,35 @@
<br>
<br>
<br>
<?=
Icon
::
create
(
'arr_2right'
,
'clickable'
,
[
'title'
=>
_
(
'In den Suchergebnissen markierte Bereiche der Gruppe hinzufügen'
)]
)
<?=
Icon
::
create
(
'arr_2right'
)
->
asInput
([
'id'
=>
'search_persons_add'
,
'name'
=>
'search_persons_add'
,
'class'
=>
'stay_on_dialog'
])
?>
'class'
=>
'stay_on_dialog'
,
'title'
=>
_
(
'In den Suchergebnissen markierte Bereiche der Gruppe hinzufügen'
)
])
?>
<br><br>
<?=
Icon
::
create
(
'arr_2left'
,
'clickable'
,
[
'title'
=>
_
(
'Bei den bereits ausgewählten Personen die markierten Personen entfernen'
)]
)
<?=
Icon
::
create
(
'arr_2left'
)
->
asInput
([
'id'
=>
'search_persons_remove'
,
'name'
=>
'search_persons_remove'
,
'class'
=>
'stay_on_dialog'
])
?>
'class'
=>
'stay_on_dialog'
,
'title'
=>
_
(
'Bei den bereits ausgewählten Personen die markierten Personen entfernen'
)
])
?>
</div>
<div
style=
"display: inline-block; float: right; width: 44%"
>
<label>
<div>
<?
$selectedCount
=
count
(
$selectedUsers
);
if
(
$selectedCount
==
0
)
:
?>
if
(
$selectedCount
==
=
0
)
:
?>
<?=
_
(
'Niemand wurde ausgewählt.'
)
?>
<?
elseif
(
$selectedCount
==
1
)
:
?>
<?
elseif
(
$selectedCount
==
=
1
)
:
?>
<?=
_
(
'Eine Person wurde ausgewählt'
)
?>
<?
else
:
?>
<?=
sprintf
(
_
(
'%s Personen wurden ausgewählt.'
),
$selectedCount
)
?>
<?
endif
?>
</div>
<select
id=
"search_persons_selected"
name=
"search_persons_selected[]"
style=
"min
W
idth: 200px; width: 100%; height: 116px"
size=
"7"
multiple
<select
id=
"search_persons_selected"
name=
"search_persons_selected[]"
style=
"min
-w
idth: 200px; width: 100%; height: 116px"
size=
"7"
multiple
aria-label=
"
<?=
_
(
'Personen, die in die Gruppe eingetragen werden'
)
?>
"
>
<?
foreach
(
$selectedUsers
as
$user
)
:
?>
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment