phpldapadmin/resources/views/components/attribute.blade.php

31 lines
1.2 KiB
PHP
Raw Normal View History

<!-- $o=Attribute::class -->
2023-03-31 04:55:08 +00:00
<div class="row">
<div class="col-12">
<div id="{{ $o->name_lc }}">
@foreach (old($o->name_lc,$o->values) as $value)
@if ($edit && ! $o->is_rdn)
2023-04-12 13:18:26 +00:00
<div class="input-group has-validation">
<input type="text" class="form-control @if($e=$errors->get($o->name_lc.'.'.$loop->index))is-invalid @endif mb-1 @if($o->values->search($value) === FALSE) border-focus @endif" name="{{ $o->name_lc }}[]" value="{{ $value }}" placeholder="{{ ! is_null($x=Arr::get($o->values,$loop->index)) ? $x : '['.__('NEW').']' }}" readonly="true">
<div class="invalid-feedback pb-2">
@if($e)
{{ join('|',$e) }}
@endif
</div>
</div>
2023-03-31 04:55:08 +00:00
@else
{{ $value }}<br>
@endif
@endforeach
</div>
</div>
<div class="col-12 col-sm-6 col-lg-4">
@if($o->is_rdn)
<span class="btn btn-sm btn-outline-focus mt-3 mb-3"><i class="fas fa-fw fa-exchange"></i> @lang('Rename')</span>
2023-03-31 04:55:08 +00:00
@elseif($edit && $o->can_addvalues)
2023-04-11 22:17:57 +00:00
<div class="p-0 m-0 addable d-none" id="{{ $o->name_lc }}">
<span class="btn btn-sm btn-outline-primary mt-3 mb-3"><i class="fas fa-fw fa-plus"></i> @lang('Add Value')</span>
2023-03-31 04:55:08 +00:00
</div>
@endif
</div>
</div>