35 lines
1.6 KiB
PHP
35 lines
1.6 KiB
PHP
@extends('layouts.layout-2')
|
|
|
|
@section('content')
|
|
<div class="card">
|
|
<h6 class="card-header">{{ $model->exists ? __('Lagerort bearbeiten') : __('Lagerort anlegen') }}</h6>
|
|
<div class="card-body">
|
|
<form method="post" action="{{ $model->exists ? route('admin.inventory.locations.update', $model) : route('admin.inventory.locations.store') }}">
|
|
@csrf
|
|
@if($model->exists)
|
|
@method('PUT')
|
|
@endif
|
|
|
|
<div class="form-group">
|
|
<label for="name">{{ __('Name') }}</label>
|
|
<input type="text" name="name" id="name" class="form-control @error('name') is-invalid @enderror"
|
|
value="{{ old('name', $model->name) }}" required>
|
|
@error('name')
|
|
<div class="invalid-feedback">{{ $message }}</div>
|
|
@enderror
|
|
</div>
|
|
|
|
<div class="form-group">
|
|
<label class="custom-control custom-checkbox">
|
|
<input type="checkbox" name="active" value="1" class="custom-control-input"
|
|
@checked(old('active', $model->active))>
|
|
<span class="custom-control-label">{{ __('Aktiv') }}</span>
|
|
</label>
|
|
</div>
|
|
|
|
<button type="submit" class="btn btn-primary">{{ __('Speichern') }}</button>
|
|
<a href="{{ route('admin.inventory.locations.index') }}" class="btn btn-outline-secondary">{{ __('Zurück') }}</a>
|
|
</form>
|
|
</div>
|
|
</div>
|
|
@endsection
|