2020-04-20 22:33:42 +01:00
|
|
|
@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>
|
|
|
|
|
2020-04-29 22:19:21 +01:00
|
|
|
@if ($service->isFacebook())
|
|
|
|
@include(Theme::viewName('partials.admin_services_oauth_options'), ['oauthService' => \App\ExternalService::FACEBOOK])
|
|
|
|
@elseif ($service->isGoogle())
|
|
|
|
@include(Theme::viewName('partials.admin_services_oauth_options'), ['oauthService' => \App\ExternalService::GOOGLE])
|
2020-04-21 08:40:56 +01:00
|
|
|
@elseif ($service->isDropbox())
|
2020-04-29 22:19:21 +01:00
|
|
|
@include(Theme::viewName('partials.admin_services_oauth_options'), ['oauthService' => \App\ExternalService::DROPBOX])
|
|
|
|
@elseif ($service->isTwitter())
|
|
|
|
@include(Theme::viewName('partials.admin_services_oauth_options'), ['oauthService' => \App\ExternalService::TWITTER])
|
2020-04-20 22:33:42 +01:00
|
|
|
@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
|