Using "post" when deleting, fixing deleting

This commit is contained in:
Michael 2021-08-02 19:18:44 +00:00
commit 88e276843e
5 changed files with 72 additions and 53 deletions

View file

@ -1,31 +1,28 @@
<div class="generic-page-wrapper">
{{* include the title template for the settings title *}}
{{include file="section_title.tpl" title=$title}}
<form action="profile/{{$nickname}}/schedule" method="post" autocomplete="off">
<input type='hidden' name='form_security_token' value='{{$form_security_token}}'>
<table id='application-block' class='table table-condensed table-striped'>
<thead>
<tr>
<th>{{$scheduled_at}}</th>
<th>{{$content}}</th>
</tr>
</thead>
<tbody>
{{foreach $schedule as $row}}
<tr>
<td>{{$row.scheduled_at}}</td>
<td>{{$row.content}}</td>
<td>
<form action="{{$baseurl}}/profile/{{$nickname}}/schedule" method="post">
<input type="hidden" name="form_security_token" value="{{$form_security_token}}">
<button type="submit" name="delete" value="{{$row.id}}" title="{{$delete}}">
<i class="fa fa-trash" aria-hidden="true">
</button>
</form>
</td>
</tr>
{{/foreach}}
</tbody>
</table>
</form>
<table id='application-block' class='table table-condensed table-striped'>
<thead>
<tr>
<th>{{$scheduled_at}}</th>
<th>{{$content}}</th>
</tr>
</thead>
<tbody>
{{foreach $schedule as $row}}
<tr>
<td>{{$row.scheduled_at}}</td>
<td>{{$row.content}}</td>
<td>
<form action="{{$baseurl}}/profile/{{$nickname}}/schedule" method="post">
<input type="hidden" name="form_security_token" value="{{$form_security_token}}">
<button type="submit" name="delete" value="{{$row.id}}" title="{{$delete}}">
<i class="fa fa-trash" aria-hidden="true">
</button>
</form>
</td>
</tr>
{{/foreach}}
</tbody>
</table>
</div>