<div style="float: left;">
    <button type="button" class="btn btn-primary adddatamodal" data-table="guaranteetype"
        data-tableid="guarantee_type_id" data-toggle="modal" data-target="#Modalguarantee_type_id"
        data-whatever="@guarantee_type" data-formt="formguarantee_type" data-selectitr="">اضافة نوع كفالة</button>
    <button type="button" class="btn btn-primary editdatamodal" data-model="#Modalguarantee_type_id"
        data-table="guaranteetype" data-name="guarantee_type_id" data-tableid="id" data-join=""
        data-control="subventionController.php" data-formt="formguarantee_type" data-selectitr="1">تعديل نوع
        كفالة</button>
</div>
<input type="hidden" name="itr" value="{count($allBen)}" />
<table class="table table-black">
    <thead>
        <tr>
            <th style="width:50px;">م</th>
            <th>رقم الحالة</th>
            <th>اسم المستفيد</th>
            <th>الرقم القومي</th>
            <th>إعانة مالية</th>
            <th>إعانة عينية</th>
            <th>نوع الكفالة</th>
            <th>ملاحظات</th>
        </tr>
    </thead>
    <tbody>
        {assign var="i" value=1}
        {foreach $allBen as $data}
        <tr>
            <td>{$i}</td>
            <td>{$data.id}
                <input type="hidden" name="id{$i}" value="{$data.id}" />
            </td>
            <td>{$data.name}</td>
            <td>{$data.idnumber}</td>
            <td><input type="text" name="financial_aid{$i}" /></td>
            <td><input type="text" name="inkind_aid{$i}" /></td>
            <td>
                <div>
                    <input id="guarantee_type_id{$i}" type="text" name="guarantee_type_id{$i}"
                        class="getselectjoin guarantee_type_id" data-placeholder=" نوع الكفالة"
                        data-table="guaranteetype" data-tableid="guarantee_type_id" data-join="" data-filter=""
                        data-parent="" data-itr="{$i}" data-search="name" />
                    <input type="hidden" name="guarantee_type_id{$i}" class="selectedit" data-tableidname="id"
                        data-itr="{$i}" data-join="" data-table="guaranteetype" data-tableid="id" data-search="name"
                        value="" />
                </div>
            </td>
            <td><input type="text" name="notes{$i}" value="" /></td>
        </tr>
        {assign var="i" value=$i+1}
        {/foreach}
    </tbody>
</table>
<script type="text/javascript">
    selectedit();
    getselectjoin();
</script>