Handle no attribute tags at an Attribute::class level, added form/disabled components

This commit is contained in:
2025-03-16 19:29:08 +11:00
parent 1470170928
commit 81e0e58650
22 changed files with 113 additions and 79 deletions

View File

@@ -1,8 +1,2 @@
<!-- $o=Attribute::class -->
<x-attribute.layout :edit="false" :new="false" :detail="true" :o="$o">
@foreach(old($o->name_lc,($new ?? FALSE) ? [NULL] : $o->values) as $value)
<div class="input-group">
<input type="text" @class(['form-control','mb-1']) name="{{ $o->name_lc }}[]" value="{{ \Carbon\Carbon::createFromTimestamp(strtotime($value))->format(config('pla.datetime_format','Y-m-d H:i:s')) }}" @disabled(true)>
</div>
@endforeach
</x-attribute.layout>
<!-- $o=NoAttrTags/Generic::class -->
@include('components.form.disabled.datetime')

View File

@@ -1 +1,2 @@
@include('components.attribute.krblastfailedauth')
<!-- $o=NoAttrTags/Generic::class -->
@include('components.form.disabled.datetime')

View File

@@ -1 +1,2 @@
@include('components.attribute.krblastfailedauth')
<!-- $o=NoAttrTags/Generic::class -->
@include('components.form.disabled.datetime')

View File

@@ -1,8 +1,2 @@
<!-- $o=Attribute::class -->
<x-attribute.layout :edit="false" :new="false" :detail="true" :o="$o">
@foreach(old($o->name_lc,($new ?? FALSE) ? [NULL] : $o->values) as $value)
<div class="input-group">
<input type="text" @class(['form-control','mb-1']) name="{{ $o->name_lc }}[]" value="{{ $value }}" @disabled(true)>
</div>
@endforeach
</x-attribute.layout>
<!-- $o=NoAttrTags/Generic::class -->
@include('components.form.disabled.input')

View File

@@ -1 +1,2 @@
@include('components.attribute.krblastfailedauth')
<!-- $o=NoAttrTags/Generic::class -->
@include('components.form.disabled.datetime')

View File

@@ -1,5 +1,5 @@
<!-- @todo We are not handling redirect backs yet with updated passwords -->
<!-- $o=Password::class -->
<!-- $o=KrbPrincipleKey::class -->
<x-attribute.layout :edit="$edit ?? FALSE" :new="$new ?? FALSE" :o="$o">
@foreach($o->values_old as $value)
@if($edit)

View File

@@ -1,29 +1,23 @@
<!-- $o=KrbTicketFlags::class -->
<x-attribute.layout :edit="$edit ?? FALSE" :new="$new ?? FALSE" :o="$o">
<!-- krbticketflags cannot handle multivalue tags -->
@if($o->values->keys()->count() <= 1)
@foreach((count($o->values->first()) ? $o->values->first() : ($new ? [0] : NULL)) as $value)
@if($edit)
<div id="32"></div>
<div id="16"></div>
@foreach(($o->values->count() ? $o->values : ($new ? [0] : NULL)) as $value)
@if($edit)
<div id="32"></div>
<div id="16"></div>
<div class="input-group has-validation mb-3">
<input type="hidden" @class(['form-control','is-invalid'=>($e=$errors->get($o->name_lc.'.'.$loop->index)),'mb-1','border-focus'=>$o->values->contains($value)]) name="{{ $o->name_lc }}[]" value="{{ $value }}" @readonly(true)>
<div class="input-group has-validation mb-3">
<input type="hidden" @class(['form-control','is-invalid'=>($e=$errors->get($o->name_lc.'.'.$loop->index)),'mb-1','border-focus'=>$o->values->contains($value)]) name="{{ $o->name_lc }}[]" value="{{ $value }}" @readonly(true)>
<div class="invalid-feedback pb-2">
@if($e)
{{ join('|',$e) }}
@endif
</div>
<div class="invalid-feedback pb-2">
@if($e)
{{ join('|',$e) }}
@endif
</div>
@else
{{ $value }}
@endif
@endforeach
@else
<x-alert.attribute_tags_cant_manage :tags="$o->values->keys()"/>
@endif
</div>
@else
{{ $value }}
@endif
@endforeach
</x-attribute.layout>
@section($o->name_lc.'-scripts')

View File

@@ -1,7 +1,7 @@
<!-- $o=Attribute::class -->
<x-attribute.layout :edit="$edit" :new="$new" :o="$o">
@foreach(old($o->name_lc,$o->values) as $value)
@if ($edit)
@if($edit)
<x-attribute.widget.objectclass :o="$o" :edit="$edit" :new="$new" :loop="$loop" :value="$value"/>
@else
{{ $value }}