1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
|
<form method="post" name="room_request" class="default"
action="<?= $controller->link_for('course/room_requests/request_first_step/' . $request_id) ?>"
<?= Request::isXhr() ? 'data-dialog="size=big"' : ''?>>
<input type="hidden" name="request_id" value="<?= htmlReady($request_id) ?>">
<?= CSRFProtection::tokenTag() ?>
<?= $this->render_partial('course/room_requests/_new_request_header') ?>
<section class="resources-grid">
<div>
<fieldset>
<legend><?= _('Suche nach Raumkategorie und Eigenschaften') ?></legend>
<? if ($available_room_categories): ?>
<label>
<?= _('Raumkategorie') ?>
<span class="flex-row">
<select name="category_id" <?= $category ? 'disabled' : '' ?>>
<option value=""><?= _('bitte auswählen') ?></option>
<? foreach ($available_room_categories as $rc): ?>
<option value="<?= htmlReady($rc->id) ?>"
<?= $_SESSION[$request_id]['room_category'] === $rc->id
? 'selected'
: '' ?>>
<?= htmlReady($rc->name) ?>
</option>
<? endforeach ?>
</select>
<? if ($category) : ?>
<?= Icon::create('decline')->asInput(
[
'title' => _('alle Angaben zurücksetzen'),
'type' => 'image',
'class' => 'text-bottom',
'name' => 'reset_category',
'style' => 'margin-left: 0.2em; margin-top: 0.6em;'
]
) ?>
<? else : ?>
<?= Icon::create('accept')->asInput(
[
'title' => _('Raumtyp auswählen'),
'type' => 'image',
'class' => 'text-bottom',
'name' => 'search_by_category',
'value' => _('Raumtyp auswählen'),
'style' => 'margin-left: 0.2em; margin-top: 0.6em;'
]
) ?>
<? endif ?>
</span>
</label>
<? endif ?>
<? if (!$embedded) : ?>
</fieldset>
</div>
<div>
<fieldset>
<legend><?= _('Raumsuche') ?></legend>
<label>
<?= _('Raumname') ?>
<span class="flex-row">
<input type="text" name="room_name" value="<?= htmlReady($_SESSION[$request_id]['room_name']) ?>">
<?= Icon::create('search')->asInput(
[
'title' => _('Räume suchen'),
'name' => 'search_by_name',
'class' => 'text-bottom',
'style' => 'margin-left: 0.2em; margin-top: 0.6em;'
]
) ?>
<? if ($room_name) : ?>
<?= Icon::create('decline')->asInput(
[
'title' => _('alle Angaben zurücksetzen'),
'type' => 'image',
'class' => 'text-bottom',
'name' => 'reset_name',
'style' => 'margin-left: 0.2em; margin-top: 0.6em;'
]
) ?>
<? endif?>
</span>
</label>
</fieldset>
</div>
</section>
<?= $this->render_partial('course/room_requests/_new_request_form_footer', ['step' => $step]) ?>
<? endif ?>
|