|
9 | 9 |
|
10 | 10 | $enumchronRaw = $this->gatheredDetails['requestedItem']['enumchron'] ?? ''; |
11 | 11 | $enumchron = $enumchronRaw !== '' ? " ($enumchronRaw)" : ''; |
| 12 | + $defaultRequestGroupLocationText = null; |
12 | 13 | ?> |
13 | 14 | <?=$this->component('page-title', ['title' => $this->translate('request_place_text'), 'headTitle' => $this->translate('request_place_text') . ': ' . $this->driver->getBreadcrumb()]);?> |
14 | 15 | <?php if ($this->helpTextHtml): ?> |
|
68 | 69 | > |
69 | 70 | <?=$this->transEsc('request_group_' . $group['name'], null, $group['name'])?> |
70 | 71 | </option> |
| 72 | + <?php if ($group['id'] === $this->defaultRequestGroup) { |
| 73 | + $defaultRequestGroupLocationText = $group['selectLocationText'] ?? 'select_pickup_location'; |
| 74 | + } ?> |
71 | 75 | <?php endforeach; ?> |
72 | 76 | </select> |
73 | 77 | </div> |
|
88 | 92 | // default: |
89 | 93 | $selected = $this->homeLibrary ?? false; |
90 | 94 | } |
91 | | - $selectPickupLocationText = |
92 | | - array_filter($requestGroups, fn ($group) => $group['id'] == $defaultRequestGroup)[0]['selectLocationText'] |
93 | | - ?? 'select_pickup_location'; |
94 | 95 | ?> |
95 | 96 | <?php if ($this->requestGroupNeeded): ?> |
96 | 97 | <div class="form-group hold-pickup-location"> |
|
104 | 105 | <select id="pickUpLocation" name="gatheredDetails[pickUpLocation]" data-default="<?=$this->escapeHtmlAttr($selected)?>" class="form-select"> |
105 | 106 | <?php if ($selected === false): ?> |
106 | 107 | <option value="" selected="selected"> |
107 | | - <?=$this->transEsc($selectPickupLocationText)?> |
| 108 | + <?=$this->transEsc($defaultRequestGroupLocationText ?? 'select_pickup_location')?> |
108 | 109 | </option> |
109 | 110 | <?php endif; ?> |
110 | 111 | </select> |
|
115 | 116 | <select id="pickUpLocation" name="gatheredDetails[pickUpLocation]" class="form-select"> |
116 | 117 | <?php if ($selected === false && count($this->pickup) > 1): ?> |
117 | 118 | <option value="" selected="selected"> |
118 | | - <?=$this->transEsc($selectPickupLocationText)?> |
| 119 | + <?=$this->transEsc('select_pickup_location')?> |
119 | 120 | </option> |
120 | 121 | <?php endif; ?> |
121 | 122 | <?php foreach ($this->pickup as $lib): ?> |
|
0 commit comments