

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

        <ol class="breadcrumb">
            <li><a href="#">المنتجات</a></li>
            <li><a href="unitController.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">



                <form id="myform" class="nameToBeChecked form-horizontal" role="form" action="unitController.php?do=update" method="post">






                    <div class="form-group">
                        <label for="unitName" class="col-lg-2 control-label">اسم الوحدة</label>
                        <div class="col-lg-4">
                            <input type="text" name="unitName" id="unitName"   onkeyup="checkNameWithId(event, 'unit', 'unitName', 'unitId')"  placeholder="اسم الوحدة" class="form-control" value="{$unitData->unitName}" />
                            <div id="nameError" style="display:none"></div>

                        </div>
                    </div>

                    <!-- =================================================   -->




                    <div class="form-group">
                        <label for="unitSymbol" class="col-lg-2 control-label">رمز الوحدة</label>
                        <div class="col-lg-4">

                            <input type="text" name="unitSymbol" id="unitSymbol"   class="form-control" placeholder="الرمز" value="{$unitData->unitSymbol}"/>

                        </div>
                    </div>


                    <!-- =================================================   -->



                    <div class="form-group">
                        <label for="unitDescription" class="col-lg-2 control-label">التعليق</label>
                        <div class="col-lg-4">

                            <textarea  class="form-control" rows="3" name="unitDescription">{$unitData->unitDescription}</textarea>

                        </div>
                    </div>

                    <!-- =================================================   -->

                    <input name="oldname" id="oldname" type="hidden" value="{$unitData->unitName}" />

                    <input name="unitId" id="unitId" type="hidden" value="{$unitData->unitId}" />
                    <input name="conditions" id="conditions" type="hidden" value="{$unitData->conditions}" />

                    <!-- =================================================   -->


                    <div class="form-group">
                        <div class="col-lg-offset-2 col-lg-4">
                            <button type="button" id="savebtn"  class="btn btn-primary pull-left">حفظ الامر</button>
                        </div>
                    </div>


                </form>
            </div>
        </div>




    </div>
</div>



{literal}
<script type="text/javascript">
    var sprytextfield1 = new Spry.Widget.ValidationTextField("sprytextfield1");
</script>
{/literal}
