Consistent rendering of certificatelist attributes with certificate attributes
All checks were successful
Create Docker Image / Test Application (x86_64) (push) Successful in 28s
Create Docker Image / Build Docker Image (x86_64) (push) Successful in 1m26s
Create Docker Image / Build Docker Image (arm64) (push) Successful in 2m42s
Create Docker Image / Final Docker Image Manifest (push) Successful in 9s

This commit is contained in:
Deon George 2025-06-03 23:20:32 +10:00
parent 06b7c204b0
commit 33d96940e6
2 changed files with 10 additions and 3 deletions

View File

@ -3,7 +3,7 @@
<!-- $o=Certificate::class --> <!-- $o=Certificate::class -->
<x-attribute.layout :edit="$edit" :new="$new" :o="$o"> <x-attribute.layout :edit="$edit" :new="$new" :o="$o">
@foreach($o->tagValuesOld('binary') as $key => $value) @foreach($o->tagValuesOld('binary') as $key => $value)
<!-- If this attribute is not handle, it'll be an Attribute::class, we'll just render it normally --> <!-- If this attribute is not handled, it'll be an Attribute::class, we'll just render it normally -->
@if(($o instanceof Certificate) && $edit) @if(($o instanceof Certificate) && $edit)
<input type="hidden" name="name={{ $o->name_lc }}[binary][]" value="{{ md5($value) }}"> <input type="hidden" name="name={{ $o->name_lc }}[binary][]" value="{{ md5($value) }}">

View File

@ -1,7 +1,14 @@
<!-- $o=CertificateList::class --> <!-- $o=CertificateList::class -->
<x-attribute.layout :edit="$edit" :new="$new" :o="$o"> <x-attribute.layout :edit="$edit" :new="$new" :o="$o">
@foreach($o->tagValuesOld('binary') as $key => $value) @foreach($o->tagValuesOld('binary') as $key => $value)
<!-- If this attribute is not handle, it'll be an Attribute::class, we'll just render it normally --> <div class="input-group has-validation mb-3">
<span class="form-control mb-1"><pre class="m-0">{{ $o->render_item_old('binary.'.$key) }}</pre></span> <textarea class="form-control mb-1 font-size-md font-monospace overflow-hidden" rows="{{ count(explode("\n",$x=$o->render_item_old('binary.'.$key))) }}" disabled>{{ $x }}</textarea>
<div class="invalid-feedback pb-2">
@if($e=$errors->get($o->name_lc.'.binary.'.$loop->index))
{{ join('|',$e) }}
@endif
</div>
</div>
@endforeach @endforeach
</x-attribute.layout> </x-attribute.layout>