my-idlers/resources/views/settings/index.blade.php

172 lines
8.8 KiB
PHP
Raw Normal View History

@section('title') {{'Edit settings'}} @endsection
<x-app-layout>
<x-slot name="header">
Edit Settings
</x-slot>
<div class="container">
<x-card class="shadow mt-3">
@if ($message = Session::get('success'))
<div class="alert alert-success" role="alert">
<p class="my-1">{{ $message }}</p>
</div>
@endif
<x-back-button>
<x-slot name="href">{{ route('/') }}</x-slot>
Back to home
</x-back-button>
<form action="{{ route('settings.update', 1) }}" method="POST">
@csrf
@method('PUT')
<div class="row mt-2">
<div class="col-12 col-md-4 mb-3">
<div class="input-group">
<div class="input-group-prepend"><span
class="input-group-text">Show versions footer</span></div>
<select class="form-control" name="show_versions_footer">
<option value="1" {{ ($setting[0]->show_versions_footer === 1) ? 'selected' : '' }}>
Yes
</option>
<option value="0" {{ ($setting[0]->show_versions_footer === 0) ? 'selected' : '' }}>
No
</option>
</select>
</div>
</div>
</div>
<div class="row mt-3">
<div class="col-12 col-md-4 mb-3">
<div class="input-group">
<div class="input-group-prepend"><span
class="input-group-text">Show servers to public</span></div>
<select class="form-control" name="show_servers_public">
<option value="1" {{ ($setting[0]->show_servers_public === 1) ? 'selected' : '' }}>
Yes
</option>
<option value="0" {{ ($setting[0]->show_servers_public === 0) ? 'selected' : '' }}>
No
</option>
</select>
</div>
</div>
</div>
<p>Only if <i>show_servers_public</i> is <b>YES</b> do these apply:</p>
<div class="row mt-3">
<div class="col-12 col-md-4 mb-3">
<div class="input-group">
<div class="input-group-prepend"><span
class="input-group-text">Show servers IP's</span></div>
<select class="form-control" name="show_server_value_ip">
<option value="1" {{ ($setting[0]->show_server_value_ip === 1) ? 'selected' : '' }}>
Yes
</option>
<option value="0" {{ ($setting[0]->show_server_value_ip === 0) ? 'selected' : '' }}>
No
</option>
</select>
</div>
</div>
</div>
<div class="row mt-3">
<div class="col-12 col-md-4 mb-3">
<div class="input-group">
<div class="input-group-prepend"><span
class="input-group-text">Show servers hostname</span></div>
<select class="form-control" name="show_server_value_hostname">
<option
value="1" {{ ($setting[0]->show_server_value_hostname === 1) ? 'selected' : '' }}>
Yes
</option>
<option
value="0" {{ ($setting[0]->show_server_value_hostname === 0) ? 'selected' : '' }}>
No
</option>
</select>
</div>
</div>
</div>
<div class="row mt-3">
<div class="col-12 col-md-4 mb-3">
<div class="input-group">
<div class="input-group-prepend"><span
class="input-group-text">Show servers provider</span></div>
<select class="form-control" name="show_server_value_provider">
<option
value="1" {{ ($setting[0]->show_server_value_provider === 1) ? 'selected' : '' }}>
Yes
</option>
<option
value="0" {{ ($setting[0]->show_server_value_provider === 0) ? 'selected' : '' }}>
No
</option>
</select>
</div>
</div>
</div>
<div class="row mt-3">
<div class="col-12 col-md-4 mb-3">
<div class="input-group">
<div class="input-group-prepend"><span
class="input-group-text">Show servers location</span></div>
<select class="form-control" name="show_server_value_location">
<option
value="1" {{ ($setting[0]->show_server_value_location === 1) ? 'selected' : '' }}>
Yes
</option>
<option
value="0" {{ ($setting[0]->show_server_value_location === 0) ? 'selected' : '' }}>
No
</option>
</select>
</div>
</div>
</div>
<div class="row mt-3">
<div class="col-12 col-md-4 mb-3">
<div class="input-group">
<div class="input-group-prepend"><span
class="input-group-text">Show servers price</span></div>
<select class="form-control" name="show_server_value_price">
<option
value="1" {{ ($setting[0]->show_server_value_price === 1) ? 'selected' : '' }}>
Yes
</option>
<option
value="0" {{ ($setting[0]->show_server_value_price === 0) ? 'selected' : '' }}>
No
</option>
</select>
</div>
</div>
</div>
<div class="row mt-3">
<div class="col-12 col-md-4 mb-3">
<div class="input-group">
<div class="input-group-prepend"><span
class="input-group-text">Show servers YABs</span></div>
<select class="form-control" name="show_server_value_yabs">
<option
value="1" {{ ($setting[0]->show_server_value_yabs === 1) ? 'selected' : '' }}>
Yes
</option>
<option
value="0" {{ ($setting[0]->show_server_value_yabs === 0) ? 'selected' : '' }}>
No
</option>
</select>
</div>
</div>
</div>
<div class="row">
<div class="col-12 col-lg-4">
<x-submit-button>Update settings</x-submit-button>
</div>
</div>
</form>
</x-card>
@if(Session::has('timer_version_footer') && Session::get('timer_version_footer') === 1)
<p class="text-muted mt-4 text-end"><small>Built on Laravel
v{{ Illuminate\Foundation\Application::VERSION }} (PHP v{{ PHP_VERSION }})</small></p>
@endif
</div>
</x-app-layout>