<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>
        </div>
        <div class="panel-body">
            <div class="input-group">
                <input type="text" id="input-item" class="form-control" value="" name="newItem" placeholder="What needs to be done?">
                <span class="input-group-btn">
                    <button type="submit" class="btn btn-primary">Add</button>
                </span>
            </div>
        </div>
        <ul class="list-group" id="result">
            {% partial __SELF__ ~ '::list' %}
        </ul>
    </div>
</form>
