diff --git a/public/css/custom.css b/public/css/custom.css index a8f46350..77563962 100644 --- a/public/css/custom.css +++ b/public/css/custom.css @@ -1,9 +1,18 @@ -/** ensure our userpassword has select is next to the password input */ -attribute#userpassword .select2-container--bootstrap-5 .select2-selection { - font-size: inherit; +/* ensure our password type select box shrinks and has the full boarder */ +attribute#userpassword .input-group > .form-select { + flex-grow: 0; width: 9em; border: var(--bs-gray-500) 1px solid; - background-color: #f0f0f0; + z-index: 2; +} + +attribute#userpassword .input-group .select2-container--bootstrap-5 { + flex-grow: 0; + margin-bottom: 0.25em !important; +} + +attribute#userpassword .input-group > .select2-container--bootstrap-5 .select2-selection { + background-color: #eef2f4; } /* render the structural inside the input box */ @@ -14,20 +23,6 @@ attribute#objectclass .input-group-end:not(input.form-control) { z-index: 5; } -/* select forms that have nothing next to them */ -.select-group:first-child .select2-container--bootstrap-5 .select2-selection { - border-radius: 4px !important; -} - -.input-group:first-child:not(.select-group):not(:last-child) .select2-container--bootstrap-5 .select2-selection { - border-bottom-right-radius: unset; - border-top-right-radius: unset; -} - -.select2-container .select2-selection--single .select2-selection__rendered { - font-size: 0.88em; -} - input.form-control.input-group-end { border-bottom-right-radius: 4px !important; border-top-right-radius: 4px !important; diff --git a/public/css/fixes.css b/public/css/fixes.css index 6e9ba1e3..17a4814a 100644 --- a/public/css/fixes.css +++ b/public/css/fixes.css @@ -215,9 +215,17 @@ pre code .line::before { } /** select2 rendering fixes */ +.select2-container--bootstrap-5 .select2-selection { + border: var(--bs-gray-500) 1px solid; +} + +/* Selection rendered size */ +.select2-container .select2-selection--single .select2-selection__rendered { + font-size: 95%; +} + /* The opened input box */ .select2-container--bootstrap-5 .select2-dropdown .select2-search .select2-search__field { - line-height: 1.0; border: 1px solid #aaa; } @@ -226,23 +234,21 @@ pre code .line::before { font-size: 95%; } -select2-container--bootstrap-5 .select2-selection--multiple .select2-selection__clear, .select2-container--bootstrap-5 .select2-selection--single .select2-selection__clear { - width: 0.5rem; - height: 0.5rem; -} - +/* Place holder text */ .select2-container--bootstrap-5 .select2-selection--single .select2-selection__rendered .select2-selection__placeholder { - line-height: 1.0; font-size: 90%; } +/* Group options title rendering */ .select2-container--bootstrap-5 .select2-dropdown .select2-results__options .select2-results__option[role=group] .select2-results__group { color: #212529; font-weight: 800; } +/* Multiple selected items rendering */ .select2-container--bootstrap-5 .select2-selection--multiple .select2-selection__rendered .select2-selection__choice { padding: 0.25em 0.45em; + font-size: 90%; } /* Remove the shadow outline on an opened box */ diff --git a/resources/views/components/attribute.blade.php b/resources/views/components/attribute.blade.php index 03b9d2a5..545cd32f 100644 --- a/resources/views/components/attribute.blade.php +++ b/resources/views/components/attribute.blade.php @@ -1,49 +1,47 @@ -
-
- @foreach($o->langtags as $langtag) - $loop->index === 0]) id="langtag-{{ $o->name_lc }}-{{ $langtag }}" role="tabpanel"> - @foreach(Arr::get(old($o->name_lc,[$langtag=>$new ? [NULL] : $o->tagValues($langtag)]),$langtag,[]) as $key => $value) - - @if($new && $template && ($av=$template->attributeValue($o->name_lc))) - - @endif +
+ @foreach($o->langtags as $langtag) + $loop->index === 0]) id="langtag-{{ $o->name_lc }}-{{ $langtag }}" role="tabpanel"> + @foreach(Arr::get(old($o->name_lc,[$langtag=>$new ? [NULL] : $o->tagValues($langtag)]),$langtag,[]) as $key => $value) + + @if($new && $template && ($av=$template->attributeValue($o->name_lc))) + + @endif -
- (! $edit) || ($o->is_rdn), - 'is-invalid'=>($e=$errors->get($o->name_lc.'.'.$langtag.'.'.$loop->index)) || ($e=$errors->get('_auto_value.'.$o->name_lc)), - 'mb-1', - 'border-focus'=>! ($tv=$o->tagValuesOld($langtag))->contains($value), - 'bg-success-subtle'=>$updated]) - name="{{ $o->name_lc }}[{{ $langtag }}][]" - value="{{ $value ?: ($av ?? '') }}" - placeholder="{{ ! is_null($x=$tv->get($loop->index)) ? $x : '['.__('NEW').']' }}" - @readonly(! $new) - @disabled($o->isDynamic())> +
+ (! $edit) || ($o->is_rdn), + 'is-invalid'=>($e=$errors->get($o->name_lc.'.'.$langtag.'.'.$loop->index)) || ($e=$errors->get('_auto_value.'.$o->name_lc)), + 'mb-1', + 'border-focus'=>! ($tv=$o->tagValuesOld($langtag))->contains($value), + 'bg-success-subtle'=>$updated]) + name="{{ $o->name_lc }}[{{ $langtag }}][]" + value="{{ $value ?: ($av ?? '') }}" + placeholder="{{ ! is_null($x=$tv->get($loop->index)) ? $x : '['.__('NEW').']' }}" + @readonly(! $new) + @disabled($o->isDynamic())> -
- @if($e) - {{ join('|',$e) }} - @endif -
+
+ @if($e) + {{ join('|',$e) }} + @endif
- @endforeach - - @endforeach +
+ @endforeach + + @endforeach - @if($edit && (! $o->is_rdn)) - - - It is not possible to create new language tags at the moment. This functionality should come soon.
- You can create them with an LDIF import though. -
+ @if($edit && (! $o->is_rdn)) + + + It is not possible to create new language tags at the moment. This functionality should come soon.
+ You can create them with an LDIF import though.
- @endif -
+
+ @endif
diff --git a/resources/views/components/attribute/password.blade.php b/resources/views/components/attribute/password.blade.php index 42e28cac..8a31ee3b 100644 --- a/resources/views/components/attribute/password.blade.php +++ b/resources/views/components/attribute/password.blade.php @@ -4,7 +4,7 @@ @foreach(($o->tagValues($langtag)->count() ? $o->tagValues($langtag) : [$langtag => NULL]) as $key => $value) @if($edit)
- + ($e=$errors->get($o->name_lc.'.'.$langtag.'.'.$loop->index)),'mb-1','border-focus'=>! $o->tagValuesOld($langtag)->contains($value),'bg-success-subtle'=>$updated]) name="{{ $o->name_lc }}[{{ $langtag }}][]" value="{{ Arr::get(old($o->name_lc),$langtag.'.'.$loop->index,$value ? md5($value) : '') }}" @readonly(! $new)>
diff --git a/resources/views/components/attribute/template/select.blade.php b/resources/views/components/attribute/template/select.blade.php index fd92fbf1..5a49de6f 100644 --- a/resources/views/components/attribute/template/select.blade.php +++ b/resources/views/components/attribute/template/select.blade.php @@ -3,22 +3,20 @@ @foreach($o->langtags as $langtag) @foreach(($o->tagValues($langtag)->count() ? $o->tagValues($langtag) : [$langtag => NULL]) as $key => $value) @if($edit) -
- ($e=$errors->get($o->name_lc.'.'.$langtag.'.'.$loop->index)),'mb-1','border-focus'=>! $o->tagValuesOld($langtag)->contains($value)]) - id="{{ $o->name_lc }}_{{$loop->index}}{{$template?->name ?: ''}}" - name="{{ $o->name_lc }}[{{ $langtag }}][]" - :value="$value" - :options="$template->attributeOptions($o->name_lc)" - allowclear="true" - :disabled="! $new" - :readonly="false"/> + ($e=$errors->get($o->name_lc.'.'.$langtag.'.'.$loop->index)),'mb-1','border-focus'=>! $o->tagValuesOld($langtag)->contains($value)]) + id="{{ $o->name_lc }}_{{$loop->index}}{{$template?->name ?: ''}}" + name="{{ $o->name_lc }}[{{ $langtag }}][]" + :value="$value" + :options="$template->attributeOptions($o->name_lc)" + allowclear="true" + :disabled="! $new" + :readonly="false"/> -
- @if($e=$errors->get($o->name_lc.'.'.$langtag.'.'.$loop->index)) - {{ join('|',$e) }} - @endif -
+
+ @if($e=$errors->get($o->name_lc.'.'.$langtag.'.'.$loop->index)) + {{ join('|',$e) }} + @endif
@else {{ $o->render_item_old($langtag.'.'.$key) }} diff --git a/resources/views/components/form/select.blade.php b/resources/views/components/form/select.blade.php index b8dead01..c91dd61d 100644 --- a/resources/views/components/form/select.blade.php +++ b/resources/views/components/form/select.blade.php @@ -1,78 +1,7 @@ - - @isset($name) - - @endisset +@isset($name) + +@endisset - - - -@section('page-scripts') - -@append \ No newline at end of file +
+ +
\ No newline at end of file diff --git a/resources/views/components/select.blade.php b/resources/views/components/select.blade.php new file mode 100644 index 00000000..74247908 --- /dev/null +++ b/resources/views/components/select.blade.php @@ -0,0 +1,72 @@ + + +@section('page-scripts') + +@append \ No newline at end of file