Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit cbb47f1

Browse files
committed
Fix template select being editable when not in edit mode. Fix select rendering
1 parent 2d41af1 commit cbb47f1

File tree

4 files changed

+26
-24
lines changed

4 files changed

+26
-24
lines changed

‎public/css/fixes.css‎

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -217,12 +217,7 @@ pre code .line::before {
217217
/** select2 rendering fixes */
218218
.select2-container--bootstrap-5 .select2-selection {
219219
border: var(--bs-gray-500) 1px solid;
220-
}
221-
222-
/* Selection rendered size */
223-
.select2-container .select2-selection--single .select2-selection__rendered {
224-
font-size: 85%;
225-
padding: 2px;
220+
font-size: inherit;
226221
}
227222

228223
/* The opened input box */

‎resources/views/components/attribute/template/select.blade.php‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
:value="$value ?: $template->attributeValue($o->name_lc)"
1212
:options="$template->attributeOptions($o->name_lc)"
1313
allowclear="true"
14-
:disabled="! $edit"/>
14+
:edit="$edit"/>
1515

1616
<x-form.invalid-feedback :errors="$e"/>
1717
@endforeach

‎resources/views/components/form/select.blade.php‎

Lines changed: 21 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -7,19 +7,26 @@
77
@endisset
88

99
<div class="input-group">
10-
<x-select :id="$id ?? NULL" :name="$name ?? NULL" :old="$old ?? NULL" :options="$options ?? []" :value="$value ?? NULL" :class="$class ?? NULL"/>
10+
<x-select
11+
:id="$id ?? NULL"
12+
:name="$name ?? NULL"
13+
:old="$old ?? NULL"
14+
:options="$options ?? []"
15+
:value="$value ?? NULL"
16+
:class="$class ?? NULL"
17+
:disabled="! ($edit ?? FALSE)"/>
18+
</div>
1119

12-
@isset($name)
13-
<span class="invalid-feedback">
14-
@error((! empty($old)) ? $old : ($id ?? $name))
15-
{{ $message }}
16-
@elseif(isset($feedback))
17-
{{ $feedback }}
18-
@enderror
19-
</span>
20-
@endisset
20+
@isset($name)
21+
<span class="invalid-feedback">
22+
@error((! empty($old)) ? $old : ($id ?? $name))
23+
{{ $message }}
24+
@elseif(isset($feedback))
25+
{{ $feedback }}
26+
@enderror
27+
</span>
28+
@endisset
2129

22-
@isset($helper)
23-
<span class="input-helper">{!! html_entity_decode($helper) !!}</span>
24-
@endif
25-
</div>
30+
@isset($helper)
31+
<span class="input-helper">{!! html_entity_decode($helper) !!}</span>
32+
@endif

‎resources/views/frames/dn.blade.php‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -171,10 +171,10 @@ function editmode() {
171171
$(this).attr('readonly',false);
172172
});
173173
174-
// Our password type
175-
$('attribute#userpassword .form-select').each(function() {
174+
// Any select areas that are disabled
175+
$('attribute .form-select').each(function() {
176176
$(this).prop('disabled',false);
177-
})
177+
});
178178
179179
// Objectclasses that can be removed
180180
$('.input-group-end i.d-none').removeClass('d-none');

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /