63 lines
3.3 KiB
PHP
63 lines
3.3 KiB
PHP
|
@extends(Theme::viewName('layout'))
|
||
|
@section('title', trans('admin.edit_service_title', ['name' => $service->name]))
|
||
|
|
||
|
@section('breadcrumb')
|
||
|
<li class="breadcrumb-item"><a href="{{ route('home') }}"><i class="fa fa-fw fa-home"></i></a></li>
|
||
|
<li class="breadcrumb-item"><a href="{{ route('admin') }}">@lang('navigation.breadcrumb.admin')</a></li>
|
||
|
<li class="breadcrumb-item"><a href="{{ route('services.index') }}">@lang('navigation.breadcrumb.services')</a></li>
|
||
|
<li class="breadcrumb-item active">@lang('navigation.breadcrumb.edit_service')</li>
|
||
|
@endsection
|
||
|
|
||
|
@section('content')
|
||
|
<div class="container">
|
||
|
<div class="row">
|
||
|
<div class="col">
|
||
|
<h1>@yield('title')</h1>
|
||
|
<p>@lang('admin.edit_service_intro')</p>
|
||
|
<hr/>
|
||
|
|
||
|
<form action="{{ route('services.update', [$service->id]) }}" method="post">
|
||
|
{{ csrf_field() }}
|
||
|
{{ method_field('PUT') }}
|
||
|
|
||
|
<div class="form-group">
|
||
|
<label class="form-control-label" for="service-type">@lang('forms.service_type_label')</label>
|
||
|
<select class="form-control{{ $errors->has('service_type') ? ' is-invalid' : '' }}" id="service-type" name="service_type" value="{{ old('service_type', $service->service_type) }}">
|
||
|
<option value="">@lang('forms.please_select')</option>
|
||
|
|
||
|
@foreach ($serviceTypes as $serviceTypeKey => $serviceTypeDescription)
|
||
|
<option value="{{ $serviceTypeKey }}"@if ($service->service_type == $serviceTypeKey) selected="selected"@endif>{{ $serviceTypeDescription }}</option>
|
||
|
@endforeach
|
||
|
</select>
|
||
|
|
||
|
@if ($errors->has('service_type'))
|
||
|
<div class="invalid-feedback">
|
||
|
<strong>{{ $errors->first('service_type') }}</strong>
|
||
|
</div>
|
||
|
@endif
|
||
|
</div>
|
||
|
|
||
|
<div class="form-group">
|
||
|
<label class="form-control-label" for="service-name">@lang('forms.name_label')</label>
|
||
|
<input type="text" class="form-control{{ $errors->has('name') ? ' is-invalid' : '' }}" id="service-name" name="name" value="{{ old('name', $service->name) }}" />
|
||
|
|
||
|
@if ($errors->has('name'))
|
||
|
<div class="invalid-feedback">
|
||
|
<strong>{{ $errors->first('name') }}</strong>
|
||
|
</div>
|
||
|
@endif
|
||
|
</div>
|
||
|
|
||
|
@if ($service->hasOAuthStandardOptions())
|
||
|
@include(Theme::viewName('partials.admin_services_oauth_options'))
|
||
|
@endif
|
||
|
|
||
|
<div class="text-right" style="margin-top: 20px;">
|
||
|
<a href="{{ route('services.index') }}" class="btn btn-link">@lang('forms.cancel_action')</a>
|
||
|
<button type="submit" class="btn btn-success"><i class="fa fa-fw fa-check"></i> @lang('forms.save_action')</button>
|
||
|
</div>
|
||
|
</form>
|
||
|
</div>
|
||
|
</div>
|
||
|
</div>
|
||
|
@endsection
|