Skip to content

Commit eff48ef

Browse files
committed
fix show errors in form
1 parent a5f3f15 commit eff48ef

File tree

6 files changed

+14
-30
lines changed

6 files changed

+14
-30
lines changed

config/app.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,7 @@
106106
|
107107
*/
108108

109-
'faker_locale' => 'en_US',
109+
'faker_locale' => 'pl_PL',
110110

111111
/*
112112
|--------------------------------------------------------------------------

doc/kto_co_robi.txt

-18
This file was deleted.

public/css/patient.css

+1-1
Original file line numberDiff line numberDiff line change
@@ -170,7 +170,7 @@ input::-webkit-input-placeholder {
170170
gap: 5vh;
171171
}
172172

173-
#error {
173+
.error {
174174
color: red;
175175
margin-top: -4vh;
176176
}

public/js/work.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11

22
const viewDoctorHours = (selectElement = null) =>{
33

4-
$('#error').text("")
4+
$('#error_js').text("")
55

66
let doctorId = $("#form_doctor").val();
77
let doctorName = (selectElement != null) ? selectElement.options[selectElement.selectedIndex].text : $("#form_doctor option:first").text();
@@ -36,7 +36,7 @@ const viewDoctorHours = (selectElement = null) =>{
3636

3737
})
3838
.catch((error)=>{
39-
$('#error').text(error)
39+
$('#error_js').text(error)
4040
})
4141
}
4242

resources/views/patient/add_appointment.blade.php

+5-4
Original file line numberDiff line numberDiff line change
@@ -43,24 +43,25 @@
4343
@endforeach
4444
</select>
4545

46-
<textarea id="form_description" placeholder="Krótki opis dla lekarza..." name="description"
46+
<textarea required id="form_description" placeholder="Krótki opis dla lekarza..." name="description"
4747
>@isset($description){{$description}}@endisset</textarea>
4848

49-
<input type="date" name="visit_date"
49+
<input required type="date" name="visit_date"
5050
@isset($visit_date)
5151
value="{{$visit_date}}"
5252
@endisset
5353
>
5454

55-
<input type="time" name="visit_time"
55+
<input required type="time" name="visit_time"
5656
@isset($visit_time)
5757
value="{{$visit_time}}"
5858
@endisset
5959
>
6060

6161
<input type="submit">
6262

63-
<span id="error">{{ $error_message }}</span>
63+
<span class="error">{{ $error_message }}</span>
64+
<span class="error" id="error_js"></span>
6465

6566
</div>
6667

resources/views/reception/edit_appointment.blade.php

+5-4
Original file line numberDiff line numberDiff line change
@@ -48,24 +48,25 @@
4848
@endforeach
4949
</select>
5050

51-
<textarea id="form_description" placeholder="Krótki opis dla lekarza..." name="description"
51+
<textarea required id="form_description" placeholder="Krótki opis dla lekarza..." name="description"
5252
>@isset($description){{$description}}@endisset</textarea>
5353

54-
<input type="date" name="visit_date"
54+
<input required type="date" name="visit_date"
5555
@isset($visit_date)
5656
value="{{$visit_date}}"
5757
@endisset
5858
>
5959

60-
<input type="time" name="visit_time"
60+
<input required type="time" name="visit_time"
6161
@isset($visit_time)
6262
value="{{$visit_time}}"
6363
@endisset
6464
>
6565

6666
<input type="submit">
6767

68-
<span id="error">{{ $error_message }}</span>
68+
<span class="error">{{ $error_message }}</span>
69+
<span class="error" id="error_js"></span>
6970

7071
</div>
7172

0 commit comments

Comments
 (0)