mirror of
https://github.com/snipe/snipe-it.git
synced 2025-01-01 00:47:27 -08:00
296de34e8a
I'm going ahead and merging this, since the upgrade doesn't break Flysystem any worse than the current develop is broken, so far as I can tell. * Upgraded framework to Laravel 6 ### TO DO: - Fix password restriction rules- the old library isn’t compatible with Laravel 6 :( - Figure out why in-app API calls are returning “Unauthorized” * More updates from Input:: to Request:: helper * Switch to Request:: from Input * Added passport config * Fixed goofy password minimum in seeder * Added laravel/helpers * Changed ($item) to ($item->id) in forms I have no idea why this is necessary * Changed ($item) to ($item->id) in forms * Updated API middleware to auth:api * Updated with added laravel auth.php values * FIxed *&!^$%^&$^%!!!! ajax issue * Switch to Request::get from Input::get * Switched to Request facade * Added password security minimums back in The package we were using has not been updated to Laravel v6, so I created custom validators instead * Added language strings for error messages for password rules * Fixed `($item)` issue in formActions for partials
69 lines
3.5 KiB
PHP
Executable file
69 lines
3.5 KiB
PHP
Executable file
@extends('layouts/edit-form', [
|
|
'createText' => trans('admin/manufacturers/table.create') ,
|
|
'updateText' => trans('admin/manufacturers/table.update'),
|
|
'helpTitle' => trans('admin/manufacturers/table.about_manufacturers_title'),
|
|
'helpText' => trans('admin/manufacturers/table.about_manufacturers_text'),
|
|
'formAction' => (isset($item->id)) ? route('manufacturers.update', ['manufacturer' => $item->id]) : route('manufacturers.store'),
|
|
])
|
|
|
|
|
|
{{-- Page content --}}
|
|
@section('inputFields')
|
|
@include ('partials.forms.edit.name', ['translated_name' => trans('admin/manufacturers/table.name')])
|
|
<!-- URL -->
|
|
<div class="form-group {{ $errors->has('url') ? ' has-error' : '' }}">
|
|
<label for="url" class="col-md-3 control-label">{{ trans('admin/manufacturers/table.url') }}
|
|
</label>
|
|
<div class="col-md-6">
|
|
<input class="form-control" type="text" name="url" id="url" value="{{ Request::old('url', $item->url) }}" />
|
|
{!! $errors->first('url', '<span class="alert-msg"><i class="fa fa-times"></i> :message</span>') !!}
|
|
</div>
|
|
</div>
|
|
|
|
<!-- Support URL -->
|
|
<div class="form-group {{ $errors->has('support_url') ? ' has-error' : '' }}">
|
|
<label for="support_url" class="col-md-3 control-label">{{ trans('admin/manufacturers/table.support_url') }}
|
|
</label>
|
|
<div class="col-md-6">
|
|
<input class="form-control" type="text" name="support_url" id="support_url" value="{{ Request::old('support_url', $item->support_url) }}" />
|
|
{!! $errors->first('support_url', '<span class="alert-msg"><i class="fa fa-times"></i> :message</span>') !!}
|
|
</div>
|
|
</div>
|
|
|
|
<!-- Support Phone -->
|
|
<div class="form-group {{ $errors->has('support_phone') ? ' has-error' : '' }}">
|
|
<label for="support_phone" class="col-md-3 control-label">{{ trans('admin/manufacturers/table.support_phone') }}
|
|
</label>
|
|
<div class="col-md-6">
|
|
<input class="form-control" type="text" name="support_phone" id="support_phone" value="{{ Request::old('support_phone', $item->support_phone) }}" />
|
|
{!! $errors->first('support_phone', '<span class="alert-msg"><i class="fa fa-times"></i> :message</span>') !!}
|
|
</div>
|
|
</div>
|
|
|
|
<!-- Support Email -->
|
|
<div class="form-group {{ $errors->has('support_email') ? ' has-error' : '' }}">
|
|
<label for="support_email" class="col-md-3 control-label">{{ trans('admin/manufacturers/table.support_email') }}
|
|
</label>
|
|
<div class="col-md-6">
|
|
<input class="form-control" type="email" name="support_email" id="support_email" value="{{ Request::old('support_email', $item->support_email) }}" />
|
|
{!! $errors->first('support_email', '<span class="alert-msg"><i class="fa fa-times"></i> :message</span>') !!}
|
|
</div>
|
|
</div>
|
|
|
|
<!-- Image -->
|
|
@if ($item->image)
|
|
<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-5">
|
|
{{ Form::checkbox('image_delete') }}
|
|
<img src="{{ Storage::disk('public')->url(app('manufacturers_upload_path').e($item->image)) }}" class="img-responsive" />
|
|
{!! $errors->first('image_delete', '<span class="alert-msg">:message</span>') !!}
|
|
</div>
|
|
</div>
|
|
@endif
|
|
|
|
@include ('partials.forms.edit.image-upload')
|
|
|
|
|
|
@stop
|