aboutsummaryrefslogtreecommitdiff
path: root/resources/views/pages/reserve.blade.php
blob: d0253dfbe9322bf97c6851e94486dfca51ba61ce (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
@extends('layouts.app')

@section('title', 'Make reservation')

@section('navbar', View::make('inc.navbar'))

@section('content')
  @if (session('status'))
    <div class="alert alert-success">
      {{ session('status') }}
    </div>
  @endif
  @if ($errors->any())
    <div class="alert alert-danger">
      All fields must be filled and conditions satisfied!
    </div>
  @endif
<form action="{{ route('reserve') }}" method="POST">
  @csrf      

  <call-sign-description></call-sign-description>
  @error('scall')
    <div class="alert alert-danger mt-2">{{ $message }}</div>
  @enderror

  {{--<!-- SPECIAL CALL -->--}}
{{--<div class="form-group">--}}
  {{--<label for="special-call">Special Callsign:</label>--}}
  {{--<select class="form-control @error('scall') is-invalid @enderror" id="special-call" name="scall" required>--}}
    {{--@foreach ($signs as $sign)--}}
      {{--<option value="{{ $sign->sign }}" {{ old('scall') == $sign->sign ? 'selected' : '' }}>{{ $sign->sign }}</option>--}}
    {{--@endforeach--}}
  {{--</select> --}}
  {{--@error('scall')--}}
    {{--<div class="alert alert-danger mt-2">{{ $message }}</div>--}}
  {{--@enderror--}}
{{--</div>--}}

{{--<div class="card mb-3">--}}
  {{--<div class="card-body pb-1">--}}
    {{--<div class="card-text" id="call-desc"></div>--}}
  {{--</div>--}}
{{--</div>--}}

@error('time')
  <div class="alert alert-danger mt-2">{{ $message }}</div>
@enderror
  <!-- START TIME -->
<div class="form-group">
  <label for="start-date">Start date:</label>
  <input class="jquery-date form-control @error('sdate') is-invalid @enderror" type="text" placeholder="DD.MM.YYYY." id="start-date" name="sdate" value="{{ old('sdate') }}" required>
  @error('sdate')
    <div class="alert alert-danger mt-2">{{ $message }}</div>
  @enderror
</div>

<div class="form-group">
  <label for="start-time">Start time:</label>
  <input class="jquery-time form-control @error('stime') is-invalid @enderror" type="text" placeholder="HH:MM" id="start-time" name="stime" value="{{ old('stime') }}" required>
  @error('stime')
    <div class="alert alert-danger mt-2">{{ $message }}</div>
  @enderror
</div>

  <!-- END TIME -->
<div class="form-group">
  <label for="end-date">End date:</label>
  <input class="jquery-date form-control @error('edate') is-invalid @enderror" type="text" placeholder="DD.MM.YYYY." id="end-date" name="edate" value="{{ old('edate') }}" required>
  @error('edate')
    <div class="alert alert-danger mt-2">{{ $message }}</div>
  @enderror
</div>

<div class="form-group">
  <label for="end-time">End time:</label>
  <input class="jquery-time form-control @error('etime') is-invalid @enderror" type="text" placeholder="HH:MM" id="end-time" name="etime" value="{{ old('etime') }}" required>
  @error('etime')
    <div class="alert alert-danger mt-2">{{ $message }}</div>
  @enderror
</div>

<!-- BANDS -->
<fieldset class="form-group">
  <legend>I will be active on bands:</legend>
@foreach ($freq_list as $freq)
  <div class="form-check">
      <input class="form-check-input" type="checkbox" id="fcb{{ $loop->index }}" name="freqs[]" value="{{ $freq }}" @if(is_array(old('freqs')) && in_array($freq, old('freqs'))) checked @endif>
      <label class="form-check-label" for="fcb{{ $loop->index }}">{{ $freq }}</label>
  </div>
@endforeach

@error('freqs')
  <div class="alert alert-danger mt-2">{{ $message }}</div>
@enderror
</fieldset>

<!-- MODES -->
<fieldset class="form-group">
  <legend>I will use modes:</legend>

@foreach ($mode_list as $key => $value)
  <div class="form-check">
    <input class="form-check-input" type="checkbox" id="mcb{{ $loop->index }}" name="modes[]" value="{{ $key }}" @if(is_array(old('modes')) && in_array($key, old('modes'))) checked @endif>
    <label class="form-check-label" for="mcb{{ $loop->index }}">{{ $value }}</label>
  </div>
@endforeach

@error('modes')
  <div class="alert alert-danger mt-2">{{ $message }}</div>
@enderror
</fieldset>

  <!-- OPERATOR CALL -->
<div class="form-group">
  <label for="operator-call">Operator Callsign:</label>
  <input class="form-control @error('ocall') is-invalid @enderror" type="text" id="operator-call" name="ocall" value="{{ old('ocall') }}" required>
  @error('ocall')
    <div class="alert alert-danger mt-2">{{ $message }}</div>
  @enderror
</div>

  <!-- OPERATOR NAME -->
<div class="form-group">
  <label for="operator-name">Operator name:</label>
  <input class="form-control @error('oname') is-invalid @enderror" type="text" id="operator-name" name="oname" value="{{ old('oname') }}" required>
  @error('oname')
    <div class="alert alert-danger mt-2">{{ $message }}</div>
  @enderror
</div>

  <!-- OPERATOR EMAIL -->
<div class="form-group">
  <label for="operator-email">Operator email:</label>
  <input class="form-control @error('email') is-invalid @enderror" type="email" id="operator-email" name="email" value="{{ old('email') }}" required>
  @error('email')
    <div class="alert alert-danger mt-2">{{ $message }}</div>
  @enderror
</div>

  <!-- OPERATOR PHONE -->
<div class="form-group">
  <label for="operator-phone">Operator phone:</label>
  <input class="form-control @error('phone') is-invalid @enderror" type="tel" id="operator-phone" name="phone" value="{{ old('phone') }}" required>
  @error('phone')
    <div class="alert alert-danger mt-2">{{ $message }}</div>
  @enderror
</div>

  <!-- SUBMIT BUTTON -->
<div class="form-group">
  <input class="btn btn-primary" type="submit" value="Submit reservation request">
</div>
</form>
@endsection()

@section('styles')
  <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/jquery-datetimepicker/2.5.20/jquery.datetimepicker.min.css" integrity="sha512-f0tzWhCwVFS3WeYaofoLWkTP62ObhewQ1EZn65oSYDZUg1+CyywGKkWzm8BxaJj5HGKI72PnMH9jYyIFz+GH7g==" crossorigin="anonymous" />
@endsection

@section('scripts')
  <script src="https://cdnjs.cloudflare.com/ajax/libs/jquery-datetimepicker/2.5.20/jquery.datetimepicker.full.min.js" integrity="sha512-AIOTidJAcHBH2G/oZv9viEGXRqDNmfdPVPYOYKGy3fti0xIplnlgMHUGfuNRzC6FkzIo0iIxgFnr9RikFxK+sw==" crossorigin="anonymous"></script>
  <script>
    jQuery('.jquery-date').datetimepicker({
      timepicker: false,
      format: 'd.m.Y.'
    });
    jQuery('.jquery-time').datetimepicker({
      datepicker: false,
      format: 'H:i'
    });
  </script>
  {{--<script src="{{ asset('js/reserve.js') }}"></script>--}}
@endsection