Updated HTML for “standard” image edit/delete

Signed-off-by: snipe <snipe@snipe.net>
This commit is contained in:
snipe 2023-01-21 16:23:04 -08:00
parent 563a252d18
commit cfa342c81a
12 changed files with 149 additions and 95 deletions

View file

@ -24,13 +24,20 @@
@include ('partials.forms.edit.notes') @include ('partials.forms.edit.notes')
<!-- Image --> <!-- Image -->
@if ($item->image) @if (($item->image) && ($item->image!=''))
<div class="form-group{{ $errors->has('image_delete') ? ' has-error' : '' }}"> <div class="form-group{{ $errors->has('image_delete') ? ' has-error' : '' }}">
<label class="col-md-3 control-label" for="image_delete">{{ trans('general.image_delete') }}</label> <div class="col-md-9 col-md-offset-3">
<div class="col-md-5"> <label for="image_delete">
{{ Form::checkbox('image_delete', '1', old('image_delete'), array('class' => 'minimal', 'aria-label'=>'image_delete')) }} {{ Form::checkbox('image_delete', '1', old('image_delete'), ['class'=>'minimal','aria-label'=>'image_delete']) }}
<img src="{{ Storage::disk('public')->url('accessories/'.e($item->image)) }}" class="img-responsive" /> {{ trans('general.image_delete') }}
{!! $errors->first('image_delete', '<span class="alert-msg" aria-hidden="true">:message</span>') !!} {!! $errors->first('image_delete', '<span class="alert-msg">:message</span>') !!}
</label>
</div>
</div>
<div class="form-group">
<div class="col-md-9 col-md-offset-3">
<img src="{{ Storage::disk('public')->url(app('accessories_upload_path').e($item->image)) }}" class="img-responsive">
{!! $errors->first('image_delete', '<span class="alert-msg">:message</span>') !!}
</div> </div>
</div> </div>
@endif @endif

View file

@ -74,9 +74,7 @@
<!-- Email on Checkin --> <!-- Email on Checkin -->
<div class="form-group"> <div class="form-group">
<div class="col-md-3"> <div class="col-md-9 col-md-offset-3">
</div>
<div class="col-md-9">
<label for="checkin_email"> <label for="checkin_email">
{{ Form::checkbox('checkin_email', '1', old('checkin_email', $item->checkin_email), ['class'=>'minimal','aria-label'=>'checkin_email']) }} {{ Form::checkbox('checkin_email', '1', old('checkin_email', $item->checkin_email), ['class'=>'minimal','aria-label'=>'checkin_email']) }}
{{ trans('admin/categories/general.checkin_email') }} {{ trans('admin/categories/general.checkin_email') }}
@ -87,12 +85,19 @@
<!-- Image --> <!-- Image -->
@if ($item->image) @if (($item->image) && ($item->image!=''))
<div class="form-group{{ $errors->has('image_delete') ? ' has-error' : '' }}"> <div class="form-group{{ $errors->has('image_delete') ? ' has-error' : '' }}">
<label class="col-md-3 control-label" for="image_delete">{{ trans('general.image_delete') }}</label> <div class="col-md-9 col-md-offset-3">
<div class="col-md-9"> <label for="image_delete">
{{ Form::checkbox('image_delete', '1', old('image_delete'), array('class' => 'minimal', 'aria-label'=>'image_delete')) }} {{ Form::checkbox('image_delete', '1', old('image_delete'), ['class'=>'minimal','aria-label'=>'image_delete']) }}
<img src="{{ Storage::disk('public')->url(app('categories_upload_path').e($item->image)) }}" class="img-responsive" /> {{ trans('general.image_delete') }}
{!! $errors->first('image_delete', '<span class="alert-msg">:message</span>') !!}
</label>
</div>
</div>
<div class="form-group">
<div class="col-md-9 col-md-offset-3">
<img src="{{ Storage::disk('public')->url(app('companies_upload_path').e($item->image)) }}" class="img-responsive">
{!! $errors->first('image_delete', '<span class="alert-msg">:message</span>') !!} {!! $errors->first('image_delete', '<span class="alert-msg">:message</span>') !!}
</div> </div>
</div> </div>

View file

@ -10,13 +10,19 @@
@section('inputFields') @section('inputFields')
@include ('partials.forms.edit.name', ['translated_name' => trans('admin/companies/table.name')]) @include ('partials.forms.edit.name', ['translated_name' => trans('admin/companies/table.name')])
<!-- Image --> @if (($item->image) && ($item->image!=''))
@if ($item->image)
<div class="form-group{{ $errors->has('image_delete') ? ' has-error' : '' }}"> <div class="form-group{{ $errors->has('image_delete') ? ' has-error' : '' }}">
<label class="col-md-3 control-label" for="image_delete">{{ trans('general.image_delete') }}</label> <div class="col-md-9 col-md-offset-3">
<div class="col-md-5"> <label for="image_delete">
{{ Form::checkbox('image_delete', '1', old('image_delete'), array('class' => 'minimal', 'aria-label'=>'image_delete')) }} {{ Form::checkbox('image_delete', '1', old('image_delete'), ['class'=>'minimal','aria-label'=>'image_delete']) }}
<img src="{{ Storage::disk('public')->url(app('companies_upload_path').e($item->image)) }}" class="img-responsive" /> {{ trans('general.image_delete') }}
{!! $errors->first('image_delete', '<span class="alert-msg">:message</span>') !!}
</label>
</div>
</div>
<div class="form-group">
<div class="col-md-9 col-md-offset-3">
<img src="{{ Storage::disk('public')->url(app('companies_upload_path').e($item->image)) }}" class="img-responsive">
{!! $errors->first('image_delete', '<span class="alert-msg">:message</span>') !!} {!! $errors->first('image_delete', '<span class="alert-msg">:message</span>') !!}
</div> </div>
</div> </div>

View file

@ -22,12 +22,19 @@
@include ('partials.forms.edit.purchase_cost') @include ('partials.forms.edit.purchase_cost')
<!-- Image --> <!-- Image -->
@if ($item->image) @if (($item->image) && ($item->image!=''))
<div class="form-group{{ $errors->has('image_delete') ? ' has-error' : '' }}"> <div class="form-group{{ $errors->has('image_delete') ? ' has-error' : '' }}">
<label class="col-md-3 control-label" for="image_delete">{{ trans('general.image_delete') }}</label> <div class="col-md-9 col-md-offset-3">
<div class="col-md-5"> <label for="image_delete">
{{ Form::checkbox('image_delete', '1', old('image_delete'), array('class' => 'minimal', 'aria-label'=>'image_delete')) }} {{ Form::checkbox('image_delete', '1', old('image_delete'), ['class'=>'minimal','aria-label'=>'image_delete']) }}
<img src="{{ Storage::disk('public')->url(app('components_upload_path').e($item->image)) }}" class="img-responsive" /> {{ trans('general.image_delete') }}
{!! $errors->first('image_delete', '<span class="alert-msg">:message</span>') !!}
</label>
</div>
</div>
<div class="form-group">
<div class="col-md-9 col-md-offset-3">
<img src="{{ Storage::disk('public')->url(app('components_upload_path').e($item->image)) }}" class="img-responsive">
{!! $errors->first('image_delete', '<span class="alert-msg">:message</span>') !!} {!! $errors->first('image_delete', '<span class="alert-msg">:message</span>') !!}
</div> </div>
</div> </div>

View file

@ -23,12 +23,19 @@
@include ('partials.forms.edit.notes') @include ('partials.forms.edit.notes')
<!-- Image --> <!-- Image -->
@if ($item->image) @if (($item->image) && ($item->image!=''))
<div class="form-group{{ $errors->has('image_delete') ? ' has-error' : '' }}"> <div class="form-group{{ $errors->has('image_delete') ? ' has-error' : '' }}">
<label class="col-md-3 control-label" for="image_delete">{{ trans('general.image_delete') }}</label> <div class="col-md-9 col-md-offset-3">
<div class="col-md-5"> <label for="image_delete">
{{ Form::checkbox('image_delete', '1', old('image_delete'), array('class' => 'minimal', 'aria-label'=>'image_delete')) }} {{ Form::checkbox('image_delete', '1', old('image_delete'), ['class'=>'minimal','aria-label'=>'image_delete']) }}
<img src="{{ Storage::disk('public')->url(app('consumables_upload_path').e($item->image)) }}" class="img-responsive" /> {{ trans('general.image_delete') }}
{!! $errors->first('image_delete', '<span class="alert-msg">:message</span>') !!}
</label>
</div>
</div>
<div class="form-group">
<div class="col-md-9 col-md-offset-3">
<img src="{{ Storage::disk('public')->url(app('consumables_upload_path').e($item->image)) }}" class="img-responsive">
{!! $errors->first('image_delete', '<span class="alert-msg">:message</span>') !!} {!! $errors->first('image_delete', '<span class="alert-msg">:message</span>') !!}
</div> </div>
</div> </div>

View file

@ -24,12 +24,19 @@
@include ('partials.forms.edit.location-select', ['translated_name' => trans('general.location'), 'fieldname' => 'location_id']) @include ('partials.forms.edit.location-select', ['translated_name' => trans('general.location'), 'fieldname' => 'location_id'])
<!-- Image --> <!-- Image -->
@if ($item->image) @if (($item->image) && ($item->image!=''))
<div class="form-group{{ $errors->has('image_delete') ? ' has-error' : '' }}"> <div class="form-group{{ $errors->has('image_delete') ? ' has-error' : '' }}">
<label class="col-md-3 control-label" for="image_delete">{{ trans('general.image_delete') }}</label> <div class="col-md-9 col-md-offset-3">
<div class="col-md-5"> <label for="image_delete">
{{ Form::checkbox('image_delete', '1', old('image_delete'), array('class' => 'minimal', 'aria-label'=>'image_delete')) }} {{ Form::checkbox('image_delete', '1', old('image_delete'), ['class'=>'minimal','aria-label'=>'image_delete']) }}
<img src="{{ Storage::disk('public')->url(app('departments_upload_path').e($item->image)) }}" class="img-responsive" /> {{ trans('general.image_delete') }}
{!! $errors->first('image_delete', '<span class="alert-msg">:message</span>') !!}
</label>
</div>
</div>
<div class="form-group">
<div class="col-md-9 col-md-offset-3">
<img src="{{ Storage::disk('public')->url(app('departments_upload_path').e($item->image)) }}" class="img-responsive">
{!! $errors->first('image_delete', '<span class="alert-msg">:message</span>') !!} {!! $errors->first('image_delete', '<span class="alert-msg">:message</span>') !!}
</div> </div>
</div> </div>

View file

@ -68,18 +68,21 @@
@include ('partials.forms.edit.requestable', ['requestable_text' => trans('admin/hardware/general.requestable')]) @include ('partials.forms.edit.requestable', ['requestable_text' => trans('admin/hardware/general.requestable')])
<!-- Image --> <!-- Image -->
@if ($item->image) @if (($item->image) && ($item->image!=''))
<div class="form-group{{ $errors->has('image_delete') ? ' has-error' : '' }}"> <div class="form-group{{ $errors->has('image_delete') ? ' has-error' : '' }}">
<label class="col-md-3 control-label" for="image_delete">{{ trans('general.image_delete') }}</label> <div class="col-md-9 col-md-offset-3">
<div class="col-md-5"> <label for="image_delete">
<label class="control-label" for="image_delete"> {{ Form::checkbox('image_delete', '1', old('image_delete'), ['class'=>'minimal','aria-label'=>'image_delete']) }}
<input type="checkbox" value="1" name="image_delete" id="image_delete" class="minimal" {{ Request::old('image_delete') == '1' ? ' checked="checked"' : '' }}> {{ trans('general.image_delete') }}
{!! $errors->first('image_delete', '<span class="alert-msg">:message</span>') !!} {!! $errors->first('image_delete', '<span class="alert-msg">:message</span>') !!}
</label> </label>
<div style="margin-top: 0.5em">
<img src="{{ Storage::disk('public')->url(app('assets_upload_path').e($item->image)) }}" class="img-responsive" />
</div> </div>
</div> </div>
<div class="form-group">
<div class="col-md-9 col-md-offset-3">
<img src="{{ Storage::disk('public')->url(app('assets_upload_path').e($item->image)) }}" class="img-responsive">
{!! $errors->first('image_delete', '<span class="alert-msg">:message</span>') !!}
</div>
</div> </div>
@endif @endif

View file

@ -46,14 +46,18 @@
<!-- Image --> <!-- Image -->
@if (($item->image) && ($item->image!='')) @if (($item->image) && ($item->image!=''))
<div class="form-group{{ $errors->has('image_delete') ? ' has-error' : '' }}"> <div class="form-group{{ $errors->has('image_delete') ? ' has-error' : '' }}">
<label class="col-md-3 control-label" for="image_delete">{{ trans('general.image_delete') }}</label> <div class="col-md-9 col-md-offset-3">
<div class="col-md-9">
<label for="image_delete"> <label for="image_delete">
{{ Form::checkbox('image_delete', '1', old('image_delete'), array('class' => 'minimal', 'aria-label'=>'image_delete')) }} {{ Form::checkbox('image_delete', '1', old('image_delete'), ['class'=>'minimal','aria-label'=>'image_delete']) }}
{{ trans('general.image_delete') }}
{!! $errors->first('image_delete', '<span class="alert-msg">:message</span>') !!}
</label> </label>
<br> </div>
<img src="{{ url('/') }}/uploads/locations/{{ $item->image }}" alt="Image for {{ $item->name }}"> </div>
{!! $errors->first('image_delete', '<span class="alert-msg" aria-hidden="true"><br>:message</span>') !!} <div class="form-group">
<div class="col-md-9 col-md-offset-3">
<img src="{{ Storage::disk('public')->url(app('locations_upload_path').e($item->image)) }}" class="img-responsive">
{!! $errors->first('image_delete', '<span class="alert-msg">:message</span>') !!}
</div> </div>
</div> </div>
@endif @endif

View file

@ -51,16 +51,13 @@
</div> </div>
<!-- Image --> <!-- Image -->
@if (($item->image) && ($item->image!='')) @if ($item->image)
<div class="form-group {{ $errors->has('image_delete') ? 'has-error' : '' }}"> <div class="form-group {{ $errors->has('image_delete') ? 'has-error' : '' }}">
<label class="col-md-3 control-label" for="image_delete">{{ trans('general.image_delete') }}</label> <label class="col-md-3 control-label" for="image_delete">{{ trans('general.image_delete') }}</label>
<div class="col-md-5"> <div class="col-md-5">
<label for="image_delete">
{{ Form::checkbox('image_delete', '1', old('image_delete'), array('class' => 'minimal', 'aria-label'=>'image_delete')) }} {{ Form::checkbox('image_delete', '1', old('image_delete'), array('class' => 'minimal', 'aria-label'=>'image_delete')) }}
</label> <img src="{{ Storage::disk('public')->url(app('manufacturers_upload_path').e($item->image)) }}" class="img-responsive" />
<br> {!! $errors->first('image_delete', '<span class="alert-msg">:message</span>') !!}
<img src="{{ url('/') }}/uploads/manufacturers/{{ $item->image }}" alt="Image for {{ $item->name }}" class="img-responsive">
{!! $errors->first('image_delete', '<span class="alert-msg" aria-hidden="true"><br>:message</span>') !!}
</div> </div>
</div> </div>
@endif @endif

View file

@ -42,18 +42,20 @@
<!-- Image --> <!-- Image -->
@if (($item->image) && ($item->image!='')) @if (($item->image) && ($item->image!=''))
<div class="form-group{{ $errors->has('image_delete') ? ' has-error' : '' }}"> <div class="form-group{{ $errors->has('image_delete') ? ' has-error' : '' }}">
<label class="col-md-3 control-label" for="image_delete">{{ trans('general.image_delete') }}</label> <div class="col-md-9 col-md-offset-3">
<div class="col-md-5">
<label for="image_delete"> <label for="image_delete">
{{ Form::checkbox('image_delete', '1', old('image_delete'), array('class' => 'minimal', 'aria-label'=>'image_delete')) }} {{ Form::checkbox('image_delete', '1', old('image_delete'), ['class'=>'minimal','aria-label'=>'image_delete']) }}
{{ trans('general.image_delete') }}
{!! $errors->first('image_delete', '<span class="alert-msg">:message</span>') !!}
</label> </label>
<br>
<img src="{{ Storage::disk('public')->url(app('models_upload_path').e($item->image )) }}" alt="Image for {{ $item->name }}" class="img-responsive">
{!! $errors->first('image_delete', '<span class="alert-msg" aria-hidden="true"><br>:message</span>') !!}
</div> </div>
</div> </div>
<div class="form-group">
<div class="col-md-9 col-md-offset-3">
<img src="{{ Storage::disk('public')->url(app('models_upload_path').e($item->image)) }}" class="img-responsive">
{!! $errors->first('image_delete', '<span class="alert-msg">:message</span>') !!}
</div>
</div>
@endif @endif
@include ('partials.forms.edit.image-upload') @include ('partials.forms.edit.image-upload')

View file

@ -46,18 +46,20 @@
<!-- Image --> <!-- Image -->
@if (($item->image) && ($item->image!='')) @if (($item->image) && ($item->image!=''))
<div class="form-group{{ $errors->has('image_delete') ? ' has-error' : '' }}"> <div class="form-group{{ $errors->has('image_delete') ? ' has-error' : '' }}">
<label class="col-md-3 control-label" for="image_delete">{{ trans('general.image_delete') }}</label> <div class="col-md-9 col-md-offset-3">
<div class="col-md-5">
<label for="image_delete"> <label for="image_delete">
{{ Form::checkbox('image_delete', '1', old('image_delete'), array('class' => 'minimal', 'aria-label'=>'image_delete')) }} {{ Form::checkbox('image_delete', '1', old('image_delete'), ['class'=>'minimal','aria-label'=>'image_delete']) }}
{{ trans('general.image_delete') }}
{!! $errors->first('image_delete', '<span class="alert-msg">:message</span>') !!}
</label> </label>
<br>
<img src="{{ url('/') }}/uploads/suppliers/{{ $item->image }}" alt="Image for {{ $item->name }}" class="img-responsive">
{!! $errors->first('image_delete', '<span class="alert-msg" aria-hidden="true"><br>:message</span>') !!}
</div> </div>
</div> </div>
<div class="form-group">
<div class="col-md-9 col-md-offset-3">
<img src="{{ Storage::disk('public')->url(app('suppliers_upload_path').e($item->image)) }}" class="img-responsive">
{!! $errors->first('image_delete', '<span class="alert-msg">:message</span>') !!}
</div>
</div>
@endif @endif
@include ('partials.forms.edit.image-upload') @include ('partials.forms.edit.image-upload')

View file

@ -274,13 +274,20 @@
@endif @endif
<!-- Image --> <!-- Image -->
@if ($user->avatar) @if (($user->avatar) && ($user->avatar!=''))
<div class="form-group{{ $errors->has('image_delete') ? ' has-error' : '' }}"> <div class="form-group{{ $errors->has('image_delete') ? ' has-error' : '' }}">
<label class="col-md-3 control-label" for="image_delete">{{ trans('general.image_delete') }}</label> <div class="col-md-9 col-md-offset-3">
<div class="col-md-5"> <label for="image_delete">
{{ Form::checkbox('image_delete', '1', old('image_delete'), array('class' => 'minimal', 'aria-label'=>'image_delete')) }} {{ Form::checkbox('image_delete', '1', old('image_delete'), ['class'=>'minimal','aria-label'=>'image_delete']) }}
<img src="{{ Storage::disk('public')->url(app('users_upload_path').e($user->avatar)) }}" class="img-responsive" /> {{ trans('general.image_delete') }}
{!! $errors->first('image_delete', '<span class="alert-msg"><br>:message</span>') !!} {!! $errors->first('image_delete', '<span class="alert-msg">:message</span>') !!}
</label>
</div>
</div>
<div class="form-group">
<div class="col-md-9 col-md-offset-3">
<img src="{{ Storage::disk('public')->url(app('users_upload_path').$user->avatar) }}" class="img-responsive">
{!! $errors->first('image_delete', '<span class="alert-msg">:message</span>') !!}
</div> </div>
</div> </div>
@endif @endif