<div class="row">
    <div class="container">
        <ol class="breadcrumb">
            <li><a href="#">سيارات</a></li>
             <li><a href="CarsDetails.php?do=show">سيارات</a></li>
            <li class="active">تعديل</li>
        </ol>
        <div class="panel panel-default panel-m">
            <div class="panel-heading">
                <h3 class="panel-title">تعديل</h3>
            </div>
            <div class="panel-body"> {literal}
                <form class="nameToBeChecked form-horizontal" role="form" action="CarsDetails.php?do=update"
                      method="post" enctype="multipart/form-data" id="spform">
                    {/literal}
                  
                       
                    <div class="form-group">
                        <label for="notes" class="col-lg-2 control-label">السيارة</label>
                        <div class="col-lg-4">
                            <input type="text" name="car" id="car" placeholder="السيارة" value="{$showData->car}" class="form-control">
                        </div>
                        <span class="textfieldRequiredMsg">*</span>
                    </div>
                     <!--==============================-->
                  
                      
                      <div class="form-group">
                        <label for="notes" class="col-lg-2 control-label">اللون</label>
                        <div class="col-lg-4">
                            <input type="text" name="color" id="color" placeholder="اللون" value="{$showData->color}" class="form-control">
                        </div>
                        <span class="textfieldRequiredMsg">*</span>
                    </div>
                    <!--==============================-->
                    
                    <div class="form-group">
                        <label for="notes" class="col-lg-2 control-label">رقم اللوحة</label>
                        <div class="col-lg-4">
                            <input type="text" name="num" id="num" value="{$showData->num}" class="form-control">
                        </div>
                        <span class="textfieldRequiredMsg">*</span>
                    </div>
                    <!--==============================-->
                     <div class="form-group">
                        <label for="notes" class="col-lg-2 control-label">العداد</label>
                        <div class="col-lg-4">
                            <input type="text" name="counter" id="counter" value="{$showData->counter}" placeholder="العداد" class="form-control">
                        </div>
                        <span class="textfieldRequiredMsg">*</span>
                    </div>
                    <!--==============================-->
                    
                    <div class="form-group">
                        <label for="court_decision" class="col-lg-2 control-label">ملاحظات</label>
                        <div class="col-lg-4">
                            <textarea name="notes" id="notes" class="form-control"  rows="4" >{$showData->notes}</textarea>
                        </div>
                    </div>

                    
                        <!-- =================================================   -->
                    <input name="id" id="id" type="hidden" value="{$showData->id}" />
                    <!-- =================================================   -->
                    <div class="form-group">
                        <div class="col-lg-offset-2 col-lg-4">
                            <button type="button" class="btn btn-primary pull-left" id="spbutton">حفظ</button>
                        </div>
                    </div>
                </form>
            </div>
        </div>
    </div>
</div>
{literal}
<script type="text/javascript">
    var sprytextfield1 = new Spry.Widget.ValidationTextField("sprytextfield1");
    var sprytextfield2 = new Spry.Widget.ValidationTextField("sprytextfield2");
    $('#spbutton').live('click', function (e) {
        if (!$('#spbutton').hasClass("processing")) {
            $('#spbutton').addClass("processing");
            $('#productCatName').trigger('blur');
            setTimeout(function () {
                var myForm = document.getElementById("spform");
                var SS = Spry.Widget.Form.validate(myForm);
                if (SS == true) {
                    myForm.submit();
                } else {
                    $('#spbutton').removeClass("processing");
                }
            }, 500);
        }
    });
   
</script>
{/literal}