<div class="row">
    <div class="container">

        <ol class="breadcrumb">
            <li><a href="#">استيراد السيارات</a></li>
            <li><a href="importContractController.php?do=show">عقود الاستيراد</a></li>
            <li class="active">تعديل </li>
        </ol>
        <div class="panel panel-default panel-m">
            <div class="panel-heading">
                {if $contractdata->del lt 2}
                <h3 class="panel-title">تعديل </h3>
                {else}
                <h3 class="panel-title">تفاصيل </h3>
                {/if}
            </div>
            <div class="panel-body">


                {literal}
                <form class="form-horizontal" action="importContractController.php" id="carformajax" method="post"
                    enctype="multipart/form-data" data-dosave="?do=savedata">

                    {/literal}
                    <div class="form-group">
                        <label class="col-lg-2 control-label">العميل </label>
                        <div class="col-lg-4">
                            <select name="clientid" required="required" data-placeholder="اختر " class="selectnew"
                                required data-table="importcontract" data-tablecol="clientid">
                                <option value=""></option>
                                {foreach $allClients as $single}
                                <option value="{$single.clientid}" {if $contractdata->clientid eq $single.clientid}selected{/if}>{$single.clientname}</option>
                                {/foreach}
                            </select>
                        </div>
                    </div>

                    <div class="form-group">
                        <label for="txtName" class="col-lg-2 control-label">صوره العقد</label>
                        <div class="col-lg-2">
                            {if $contractdata->contractimage !="." && $contractdata->contractimage}
                            <img src="../views/default/images/importcontract/{$contractdata->contractimage}"
                                style="width: 140px;height: 100px;border: 3px solid;border-radius: 6px;">
                            {else}
                            <img src="../views/default/assets/img/blank.png"
                                style="width: 140px;height: 100px;border: 3px solid;border-radius: 6px;" alt=""
                                class="card-img">
                            {/if}
                            <input type="hidden" name="oldcontractimage" id="oldcontractimage"
                                value="{$contractdata->contractimage}" />
                            {if $contractdata->del lt 2}
                            <input type="file" name="contractimage" id="contractimage" />
                            {/if}
                        </div>
                    </div>

                    <input type="hidden" name="contractid" value="{$contractdata->id}" />
                    {if $contractdata->del neq 5}
                    <input type="hidden" class="deldata" value="{$contractdata->del}" />
                    {/if}



                    {if $contractdata->del lt 2}
                    <div class="form-group">
                        <div class="col-lg-offset-2 col-lg-4">
                            <button type="button" class="btn btn-primary pull-left carformajax">تعديل </button>
                        </div>
                    </div>
                    {/if}
                </form>
            </div>
        </div>
    </div>
</div>
<script type="text/javascript">
    $(document).ready(function () {
        deldata();
    });
</script>