v1.5.19d Add the add function in create multiple events

This commit is contained in:
2021-05-04 11:24:56 +02:00
parent 574534fe2a
commit c617012187
3 changed files with 37 additions and 58 deletions
@@ -40,41 +40,19 @@
<input type="text" name="week" placeholder="Uge">
<label id="fileuploadee"for="fileuploade">Baggrundsbillede til nyheden (Valgfri)</label>
<input id="fileuploade" type="file" name="resource" accept="image/*">
<table>
<table class="asd">
<tr>
<th>Ugedag</th>
<th>Aktivitets navn</th>
<th>Aktivitets beskrivelse</th>
<th>Tovholder</th>
<th>Tidsrum (Start)</th>
</tr>
<tr>
<td>Mandag</td>
<td><input type="text" name="name[]" max="255" value="{{ old("name.0") }}"></td>
<td><input type="text" name="description[]" max="255" value="{{ old("description.0") }}"></td>
<td><input type="text" name="accountable[]" value="{{ old("accountable.0") }}"></td>
<td><input type="datetime-local" name="date[]" value="{{ old("date.0") }}"></td>
</tr>
<tr>
<td>Tirsdag</td>
<td><input type="text" name="name[]" max="255" value="{{ old("name.1") }}"></td>
<td><input type="text" name="description[]" max="255" value="{{ old("description.1") }}"></td>
<td><input type="text" name="accountable[]" value="{{ old("accountable.1") }}"></td>
<td><input type="datetime-local" name="date[]" value="{{ old("date.1") }}"></td>
</tr>
<tr>
<td>Onsdag</td>
<td><input type="text" name="name[]" max="255" value="{{ old("name.2") }}"></td>
<td><input type="text" name="description[]" max="255" value="{{ old("description.2") }}"></td>
<td><input type="text" name="accountable[]" value="{{ old("accountable.2") }}"></td>
<td><input type="datetime-local" name="date[]" value="{{ old("date.2") }}"></td>
</tr>
<tr>
<td>Torsdag</td>
<td><input type="text" name="name[]" max="255" value="{{ old("name.3") }}"></td>
<td><input type="text" name="description[]" max="255" value="{{ old("description.3") }}"></td>
<td><input type="text" name="accountable[]" value="{{ old("accountable.3") }}"></td>
<td><input type="datetime-local" name="date[]" value="{{ old("date.3") }}"></td>
<td><input type="text" name="name[]"></td>
<td><input type="text" name="description[]"></td>
<td><input type="text" name="accountable[]"></td>
<td><input type="datetime-local" name="date[]"></td>
<td><button type="button" class="btn btn-inline btn-sde-blue" id="add2">Tilføj en kolonne</button></td>
</tr>
</table>
@@ -148,5 +126,17 @@
}
});
})
$(document).ready(function (){
$("#add2").click(function(){
$( ".asd" ).append( "<tr><td><input type='text' name='name[]'></td><td><input type='text' name='description[]'></td><td><input type='text' name='accountable[]'></td><td><input type='datetime-local' name='date[]'><td/></tr>" );
console.log("1");
});
});
</script>
@endsection