{% set userData = app.session.get('userData') %}
<form id="form-canvassAddQuantity" method="POST">
    <input type="hidden" name="canvass_id" value="{{ canvass_id }}" />
    <h4>{{ page_title }}</h4>
    <div id="flash-messages-content-modal"></div>
    <p class="form-hint-text">Enter basic information below</p>
    <table class="display responsive" id="canvassItemAddQuantity-datalist" width="100%">
        <thead>
        <tr>
            <th>Item</th>
            <th>Required Qty</th>
            <th>Canvassed Qty</th>
            <th>Added Qty</th>
        </tr>
        </thead>
        <tbody>
        {% for key,canvassItem in canvass.canvassitems %}
            <tr>
                <td>{{ canvassItem.materialrequisitionitem.item.description }}</td>
                <td>{{ canvassItem.quantity }}</td>
                <td>{{ canvassItem.quantitycanvassed }}</td>
                <td>
                    <input type="hidden" name="canvassItems[{{ key }}][id]" value="{{ canvassItem.id }}" />
                    <input type="text" class="amount" name="canvassItems[{{ key }}][addedQuantity]" value="{{ canvassItem.quantityadded }}" />
                </td>
            </tr>
        {% endfor %}
        </tbody>
    </table>
    <br/>
    <div class="row max-width-initial">
        <div class="small-12 columns no-padding-right">
            <div class="button-container clearfix">
                <button type="button" class="button just-continue href-AddQuantity-action float-right" id="href-canvassAddQuantity-action" name="action" value=""
                        data-message="Are you sure you want to save this information?"
                >Save</button>
            </div>
        </div>
    </div>
</form>