Added default lunch times on select
This commit is contained in:
parent
f26d82c0f4
commit
89a50d132b
2 changed files with 12 additions and 7 deletions
|
|
@ -133,10 +133,15 @@ function require_recurrent_event(option) {
|
|||
|
||||
function require_lunch(option) {
|
||||
$("#lunch_start").prop('required', option);
|
||||
}
|
||||
|
||||
function require_lunch(option) {
|
||||
$("#lunch_finish").prop('required', option);
|
||||
if (option) {
|
||||
document.getElementById("lunch_start").value = "12:30";
|
||||
document.getElementById("lunch_finish").value = "13:30";
|
||||
}
|
||||
else {
|
||||
document.getElementById("lunch_start").value = "";
|
||||
document.getElementById("lunch_finish").value = "";
|
||||
}
|
||||
}
|
||||
|
||||
function require_mask(option) {
|
||||
|
|
|
|||
|
|
@ -137,14 +137,14 @@
|
|||
|
||||
<!-- Lunch Options -->
|
||||
Lunch break:
|
||||
<input type="radio" id="lunch_option_no" name="lunch_option" value=0 checked="checked" onclick="require_fields(this)">
|
||||
<input type="radio" id="lunch_option_no" name="lunch_option" value=0 onclick="require_fields(this)">
|
||||
<label for="lunch_option">No</label>
|
||||
<input type="radio" id="lunch_option_yes" name="lunch_option" value=1 onclick="require_fields(this)"></input>
|
||||
<input type="radio" id="lunch_option_yes" name="lunch_option" value=1 checked="checked" onclick="require_fields(this)"></input>
|
||||
<label for="lunch_option">Yes</label><br>
|
||||
|
||||
<div id="DIVlunch_break">
|
||||
Start: <input type="time" id="lunch_start" name="lunch_start" unrequired>
|
||||
Finish: <input type="time" id="lunch_finish" class="finish_time" name="lunch_finish" unrequired>
|
||||
Start: <input type="time" id="lunch_start" name="lunch_start" value="12:30" required>
|
||||
Finish: <input type="time" id="lunch_finish" class="finish_time" name="lunch_finish" value="13:30" required>
|
||||
<span id="lunch_time_error" class="red_text" hidden>Finish time must be after start</span><br>
|
||||
</div>
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue