Fix display of password attributes and update processing with jpegphoto and password
This commit is contained in:
@@ -1,33 +1,40 @@
|
||||
<!-- $o=Binary\JpegPhoto::class -->
|
||||
@if($edit)
|
||||
<div class="input-group has-validation @if($e=$errors->get($o->name_lc))is-invalid @endif">
|
||||
@endif
|
||||
<!-- @todo We are not handling redirect backs with updated photos -->
|
||||
<div class="row pt-2">
|
||||
<div class="col-1"></div>
|
||||
<div class="col-10 p-2">
|
||||
<div id="{{ $o->name_lc }}">
|
||||
<table class="table table-borderless p-0 m-0">
|
||||
@foreach ($o->values as $value)
|
||||
<div class="input-group has-validation">
|
||||
<tr>
|
||||
@switch ($x=$f->buffer($value,FILEINFO_MIME_TYPE))
|
||||
@case('image/jpeg')
|
||||
@default
|
||||
<td>
|
||||
<input type="hidden" name="{{ $o->name_lc }}[]" value="{{ md5($value) }}">
|
||||
<img class="jpegphoto" src="data:{{ $x }};base64, {{ base64_encode($value) }}" @if($e=$errors->get($o->name_lc.'.'.$loop->index))is-invalid @endif />
|
||||
|
||||
<table class="table table-borderless p-0 m-0">
|
||||
<tr>
|
||||
@foreach ($o->values as $value)
|
||||
@switch ($x=$f->buffer($value,FILEINFO_MIME_TYPE))
|
||||
@case('image/jpeg')
|
||||
@default
|
||||
<td>
|
||||
<input type="hidden" name="{{ $o->name_lc }}[]" value="{{ md5($value) }}">
|
||||
<img class="jpegphoto" src="data:{{ $x }};base64, {{ base64_encode($value) }}" />
|
||||
@if ($edit)
|
||||
<br>
|
||||
<!-- @todo TO IMPLEMENT -->
|
||||
<span class="btn btn-sm btn-danger deletable d-none"><i class="fas fa-trash-alt"></i> @lang('Delete')</span>
|
||||
|
||||
@if($edit)
|
||||
<br><span class="btn btn-sm btn-danger deletable d-none"><i class="fas fa-trash-alt"></i> @lang('Delete')</span>
|
||||
@endif
|
||||
</td>
|
||||
@endswitch
|
||||
@endforeach
|
||||
</tr>
|
||||
</table>
|
||||
<div class="invalid-feedback pb-2">
|
||||
@if($e)
|
||||
{{ join('|',$e) }}
|
||||
@endif
|
||||
</div>
|
||||
@endif
|
||||
</td>
|
||||
@endswitch
|
||||
</tr>
|
||||
</div>
|
||||
@endforeach
|
||||
</table>
|
||||
</div>
|
||||
|
||||
@if($edit)
|
||||
<div class="invalid-feedback pb-2">
|
||||
@if($e)
|
||||
{{ join('|',$e) }}
|
||||
@endif
|
||||
<!-- @todo TO IMPLEMENT -->
|
||||
@include('components.attribute.widget.options')
|
||||
</div>
|
||||
|
||||
</div>
|
||||
@endif
|
||||
</div>
|
@@ -1,11 +1,14 @@
|
||||
<!-- $o=Password::class -->
|
||||
<div class="row">
|
||||
<div class="col-12">
|
||||
<!-- @todo We are not handling redirect backs with updated values -->
|
||||
<div class="row pt-2">
|
||||
<div class="col-1"></div>
|
||||
<div class="col-10 p-2">
|
||||
<div id="{{ $o->name_lc }}">
|
||||
@foreach (old($o->name_lc,$o->values) as $value)
|
||||
@foreach ($o->values as $value)
|
||||
@if ($edit)
|
||||
<div class="input-group has-validation">
|
||||
<input type="password" 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="{{ str_repeat('*',10) }}" readonly="true">
|
||||
<input type="password" 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="{{ md5($value) }}" readonly="true">
|
||||
|
||||
<div class="invalid-feedback pb-2">
|
||||
@if($e)
|
||||
{{ join('|',$e) }}
|
||||
@@ -17,9 +20,11 @@
|
||||
@endif
|
||||
@endforeach
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-12 col-sm-6 col-lg-4">
|
||||
<span class="btn btn-sm btn-outline-dark mt-3 mb-3"><i class="fas fa-user-check"></i> @lang('Check Password')</span>
|
||||
@include('components.attribute.widget.options')
|
||||
|
||||
<span class="p-0 m-0">
|
||||
<span class="btn btn-sm btn-outline-dark mt-3"><i class="fas fa-user-check"></i> @lang('Check Password')</span>
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
@@ -1,7 +1,7 @@
|
||||
@if($o->is_rdn)
|
||||
<span class="btn btn-sm btn-outline-focus mt-3"><i class="fas fa-fw fa-exchange"></i> @lang('Rename')</span>
|
||||
@elseif($edit && $o->can_addvalues)
|
||||
<div class="p-0 m-0">
|
||||
<span class="p-0 m-0">
|
||||
<span class="btn btn-sm btn-outline-primary mt-3 addable @if(! $new)d-none @endif" id="{{ $o->name_lc }}"><i class="fas fa-fw fa-plus"></i> @lang('Add Value')</span>
|
||||
@if($new)
|
||||
<script type="text/javascript">
|
||||
@@ -15,7 +15,7 @@
|
||||
});
|
||||
</script>
|
||||
@endif
|
||||
</div>
|
||||
</span>
|
||||
@endif
|
||||
|
||||
@section('page-scripts')
|
||||
|
@@ -3,7 +3,7 @@
|
||||
@section('page_title')
|
||||
<table class="table table-borderless">
|
||||
<tr>
|
||||
<td class="{{ ($x=Arr::get($o->getAttributes(),'jpegphoto')) ? 'border' : '' }}" rowspan="2">{!! $x ? $x->render() : sprintf('<div class="page-title-icon f32"><i class="%s"></i></div>',$o->icon() ?? "fas fa-info") !!}</td>
|
||||
<td class="{{ ($x=Arr::get($o->getOriginal(),'jpegphoto')) ? 'border' : '' }}" rowspan="2">{!! $x ? $x->render() : sprintf('<div class="page-title-icon f32"><i class="%s"></i></div>',$o->icon() ?? "fas fa-info") !!}</td>
|
||||
<td class="text-end align-text-top p-0 {{ $x ? 'ps-5' : 'pt-2' }}"><strong>{{ $dn }}</strong></td>
|
||||
</tr>
|
||||
<tr>
|
||||
@@ -89,7 +89,7 @@
|
||||
</tr><tr>
|
||||
@endif
|
||||
|
||||
<td>{{ Arr::get(Arr::get($o->getOriginal(),$key,['['.strtoupper(__('New Value')).']']),$xx) }}</td>
|
||||
<td>{{ Arr::get(Arr::get($o->getOriginal(),$key),$xx,'['.strtoupper(__('New Value')).']') }}</td>
|
||||
<td>{{ $y=Arr::get($value,$xx) }}<input type="hidden" name="{{ $key }}[]" value="{{ $y }}"></td>
|
||||
@endfor
|
||||
</tr>
|
||||
|
Reference in New Issue
Block a user