
<div class="page-content-wrapper">
    <div class="page-content">
        <div class="row">
            <div class="col-md-12 clinick invz" id="gprinModel">
                <!-- BEGIN EXAMPLE TABLE PORTLET-->
                <div class="portlet box blue">
                    <div class="portlet-title">
                        <div class="caption">
                            <i class="fa fa-user"></i>Organizations
                        </div>
                        <div class="actions">
                            <a href="#" class="btn btn-default btn-sm" id="addOrganization"> Add </a>
                        </div>
                    </div>
                    <div class="portlet-body all">
                        <input type="hidden" id="controllName" value="{$controllname}"/>
                        <div class="row">
                            <div class="portlet-body form">
                                <div class="form-body">
                                    <table   dir="rtl" class="wds100 table table-bordered">
                                        <thead>
                                            <tr>
                                                <th class="txtc wds40">الاسم</th>
                                                <th class="txtc wds30">اللائحة </th>
                                                <th class="txtc">تابع ل  </th>
                                            </tr>
                                        </thead>
                                        <tbody id="orgContainer">
                                            {assign var=i value=1}
                                            {foreach $organizations as $data}
                                            <tr>
                                                <td>
                                                    <input type="text" class="form-control updateElement" data-id="{$data.id}"
                                                           data-tableName="organizations" data-colName="organization_name"
                                                           data-id="{$data.id}"   value='{$data.organization_name}'>
                                                </td>

                                                <td>
                                                    <select class="form-control updateElement select2h" data-id="{$data.id}"
                                                            data-tableName="organizations" data-colName="list_id" >
                                                        <option value="">choose</option>
                                                        {foreach  $price_lists as $single}
                                                        <option value="{$single.id}"  {if $data.list_id == $single.id }
                                                                selected  {/if}>{$single.name}</option>
                                                        {/foreach}
                                                    </select>
                                                </td>

                                                <td>
                                                    <select class="form-control organizations_parents updateElement"
                                                            data-tableName="organizations" data-colName="parent_id"
                                                            data-id="{$data.id}"   id="organizations_parents{$data.id}">
                                                        <option value="">choose</option>
                                                        {foreach  $orgParents as $single}
                                                        <option value="{$single.id}"  {if $data.parent_id == $single.id }
                                                                selected  {/if}>{$single.name}</option>
                                                        {/foreach}
                                                        <option value="-1" class="deleteoptincompo">تعديل </option>
                                                    </select>
                                                </td>
                                            </tr>
                                            {capture assign=i}{$i+1}{/capture}
                                            {/foreach}
                                        </tbody>
                                    </table>
                                </div>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </div>   
    </div> 
</div>




<div class="bootbox modal fade bootbox-alert in" tabindex="-1" role="dialog" aria-hidden="false"  id="edit_detectionforview">
    <div class="modal-dialog   {if  $programesetting->system_type  == 3}wds70 {else} wds50{/if}">
        <div class="modal-content">
            <div class="modal-header">
                <button type="button" class="close" data-dismiss="modal" aria-hidden="true"></button>
                <h4 class="modal-title"> Edit </h4>
            </div>
            <div class="modal-body">
                <div class="portlet-body form">
                    <form action="" id="" method="post" class="form-horizontal  emptyform" >
                        <div class="form-body">
                            <!------===========================================------->
                            <div>
                                <div id="detectionforview" class=""> </div>
                            </div>


                            <!------===========================================------->
                            <div class="modal-footer">
                                <!--                                <button type="button" class="btn green" id="editmodel_submit"> Update </button>-->
                                <button type="button" id="amountcloseinput"   class="btn default" data-dismiss="modal">Close</button>
                            </div>
                        </div>
                    </form>
                </div>
            </div>
            <!-- /.modal-content -->
        </div>
    </div>
</div>


