
<div class="row">
    <div class="container">
        <ol class="breadcrumb">
            <li><a href="#">المنتجات</a></li>
            <li><a href="sparePartController.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="sparePartController.php?do=add" method="post" onsubmit="if (Spry.Widget.Form.validate(this)) {
                            checkName(event, 'sparepart', 'sparepartname');
                            return true;
                        } else {
                            return false;
                        }">
                    {/literal}
                    <div class="form-group">
                        <label for="storeName" class="col-lg-2 control-label">إسم القطعة</label>
                        <div class="col-lg-4"> <span id="name">
                                <input type="text" name="sparepartname" id="sparepartname"   placeholder="إسم القطعة" class="form-control" />
                                <span class="textfieldRequiredMsg">*</span></span>
                            <div id="nameError" class="alert alert-block alert-danger fade in" style="display:none">
                                <button type="button" class="close pull-left" data-dismiss="alert" aria-hidden="true">&times;</button>
                                <h4>رسالة خطا</h4>
                                <p>هذا الاسم مستخدم من قبل</p>
                                <div class="clearfix"></div>
                            </div>
                        </div>
                    </div>

                    <!-- =================================================   -->
                    <div class="form-group">
                        <label for="storeDescription" class="col-lg-2 control-label">التكلفة</label>
                        <div class="col-lg-4"><span id="sprytextfield1">
                                <input type="text" name="sparepartprice" id="sparepartprice" class="form-control" />
                                <span class="textfieldRequiredMsg">*</span><span class="textfieldInvalidFormatMsg">*</span></span></div>
                    </div>

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

                    <div class="form-group">
                        <label for="storeDescription" class="col-lg-2 control-label">عدد القطع في المخزن</label>
                        <div class="col-lg-4"><span id="sprytextfield2">
                                <input type="text" name="partquantity" id="partquantity" class="form-control"/>
                                <span class="textfieldRequiredMsg">*</span><span class="textfieldInvalidFormatMsg">*</span></span></div>
                    </div>

                    <!-- =================================================   -->
                    <div class="form-group">
                        <label for="storeDescription" class="col-lg-2 control-label">ملاحظات</label>
                        <div class="col-lg-4">
                            <textarea  class="form-control" rows="3" name="sparepartnotes"></textarea>
                        </div>
                    </div>

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

                    <div class="form-group">
                        <div class="col-lg-offset-2 col-lg-4">
                            <button type="submit"  class="btn btn-primary pull-left">حفظ</button>
                        </div>
                    </div>
                </form>
            </div>
        </div>
    </div>
</div>
{literal}
<script type="text/javascript">
    var name = new Spry.Widget.ValidationTextField("name");
    var sprytextfield1 = new Spry.Widget.ValidationTextField("sprytextfield1", "real");
    var sprytextfield2 = new Spry.Widget.ValidationTextField("sprytextfield2", "integer");
</script>
{/literal}
