Am o baza de date cu toate locatiile
Cod: Selectaţi tot
location_id | name |address |telephone | open
Si un formular prin care incarc datele in bd. Intrebarea mea este daca pot sa inlocuiest acesta linie in care scriu manual programul (Ex: Luni-vineri : 9:00-18:00 Sambata: 9:00 - 14:00 Duminica : Inchis)
Cod: Selectaţi tot
<textarea name="open" rows="5" placeholder="{{ entry_open }}" id="input-open" class="form-control">{{ open }}</textarea>
Cod: Selectaţi tot
<table class="table table-bordered table-hover">
<thead>
<tr>
<td style="width: 1px;" class="text-center"><input type="checkbox" id="days_check" onclick="$('input[name*=\'days\']').prop('checked', this.checked);"></td>
<td style="text-align: left">Zi</td>
<td style="text-align: left">Deschis</td>
<td style="text-align: left">Inchis</td>
</tr>
</thead>
<tbody>
<tr>
<td>
<input type="checkbox" name="days[]" id="monday_check" value="1" checked="">
</td>
<td>
<label class="col-sm-2 control-label" for="input-status">Luni</label>
</td>
<td>
<select name="monday_time_from" id="monday_time_from" class="form-control">
<option value="0" selected="">Inchis</option>
<option value="10">04:30 AM</option>
<option value="11">05:00 AM</option>
</select>
</td>
<td>
<select name="monday_time_to" id="monday_time_to" class="form-control">
<option value="0" selected="">Inchis</option>
<option value="41">08:00 PM</option>
<option value="42">08:30 PM</option>
</select>
</td>
</tr>
<tr>
<td>
<input type="checkbox" name="days[]" id="tuesday_check" value="2" checked="">
</td>
<td>
<label class="col-sm-2 control-label" for="input-status">Marti</label>
</td>
<td>
<select name="tuesday_time_from" id="tuesday_time_from" class="form-control">
<option value="0" selected="">Inchis</option>
<option value="10">08:30 AM</option>
</select>
</td>
<td>
<select name="tuesday_time_to" id="tuesday_time_to" class="form-control">
<option value="0" selected="">Inchis</option>
<option value="37">06:00 PM</option>
<option value="38">06:30 PM</option>
</select>
</td>
</tr>
<tr>
<td>
<input type="checkbox" name="days[]" id="wednesday_check" value="3" checked="">
</td>
<td>
<label class="col-sm-2 control-label" for="input-status">Sambata</label>
</td>
<td>
<select name="saturday_time_from" id="saturday_time_from" class="form-control">
<option value="0" selected="">Inchis</option>
<option value="10">04:30 AM</option>
<option value="11">05:00 AM</option>
</select>
</td>
<td>
<select name="saturday_time_to" id="saturday_time_to" class="form-control">
<option value="0" selected="">Inchis</option>
<option value="33">04:00 PM</option>
<option value="34">04:30 PM</option>
</select>
</td>
</tr>
<tr>
<td>
<input type="checkbox" name="days[]" id="sunday_check" value="7" checked="">
</td>
<td>
<label class="col-sm-2 control-label" for="input-status">Duminica</label>
</td>
<td>
<select name="sunday_time_from" id="sunday_time_from" class="form-control">
<option value="0" selected="">Inchis</option>
<option value="10">04:30 AM</option>
<option value="11">05:00 AM</option>
<option value="12">05:30 AM</option>
</select>
</td>
<td>
<select name="sunday_time_to" id="sunday_time_to" class="form-control">
<option value="0" selected="">Inchis</option>
<option value="44">09:30 PM</option>
<option value="45">10:00 PM</option>
<option value="46">10:30 PM</option>
</select>
</td>
</tr>
</tbody>
</table>
Multumesc