Remove layer of abstraction in demo

Old code was better for learning. This seems related to some CSRF checks that were tested a while ago and have since been rolled back

Rollback c87e6545a9
This commit is contained in:
Samuel Georges 2019-12-29 16:15:13 +11:00
parent 321f7eaa1f
commit 71e6c1b1c3
1 changed files with 7 additions and 6 deletions

View File

@ -1,8 +1,9 @@
{{ form_ajax(__SELF__ ~ '::onAddItem', {
update: "'" ~ __SELF__ ~ "::list': '#result'",
success: "$('#input-item').val('')",
'data-request-flash': ''
}) }}
<form
role="form"
data-request="{{ __SELF__ }}::onAddItem"
data-request-update="'{{ __SELF__ }}::list': '#result'"
data-request-success="$('#input-item').val('')"
data-request-flash>
<div class="panel panel-default">
<div class="panel-heading">
<h3 class="panel-title">To Do List</h3>
@ -18,4 +19,4 @@
<ul class="list-group" id="result">
</ul>
</div>
{{ form_close() }}
</form>