



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

        <ol class="breadcrumb">
            <li><a href="#">المخازن</a></li>
            <li><a href="storeController.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 class="nameToBeChecked form-horizontal" role="form" action="storeController.php?do=update" method="post" id="spform">



                    <div class="form-group">
                        <label for="storeName" class="col-lg-2 control-label">اسم المخزن</label>
                        <div class="col-lg-4">

                            <input type="text" name="storeName" id="storeName"   placeholder="اسم المخزن" class="form-control" value="{$loadData->storeName}" />
                            <div id="nameError" style="display:none;"></div>
                        </div>
                    </div>

                    <div class="form-group">
                        <label for="nameEn" class="col-lg-2 control-label">اسم المخزن (إنجليزي)</label>
                        <div class="col-lg-4">
                            <input type="text" name="nameEn" id="nameEn" placeholder="Store Name in English" class="form-control" value="{$loadData->nameEn}" required />
                        </div>
                    </div>

                    <div class="form-group">
                        <label for="branchId" class="col-lg-2 control-label">الفرع</label>
                        <div class="col-lg-4">
                            <select class="select2" name="branchId" id="branchId">
                                <option value="">اختر الفرع</option>
                                {foreach $branches as $branch}
                                <option value="{$branch->branchId}" {if $branch->branchId eq $loadData->branchId}selected{/if}>{$branch->branchName}</option>
                                {/foreach}
                            </select>
                        </div>
                    </div>

                    <div class="form-group">
                        <label for="addressAr" class="col-lg-2 control-label">العنوان (عربي)</label>
                        <div class="col-lg-4">
                            <textarea name="addressAr" id="addressAr" class="form-control" placeholder="العنوان بالعربية">{$loadData->addressAr}</textarea>
                        </div>
                    </div>

                    <div class="form-group">
                        <label for="addressEn" class="col-lg-2 control-label">العنوان (إنجليزي)</label>
                        <div class="col-lg-4">
                            <textarea name="addressEn" id="addressEn" class="form-control" placeholder="Address in English">{$loadData->addressEn}</textarea>
                        </div>
                    </div>

                    <div class="form-group">
                        <label for="phone" class="col-lg-2 control-label">رقم الهاتف</label>
                        <div class="col-lg-4">
                            <input type="tel" name="phone" id="phone" placeholder="رقم الهاتف" class="form-control" value="{$loadData->phone}" />
                        </div>
                    </div>

                    <div class="form-group">
                        <label for="email" class="col-lg-2 control-label">البريد الإلكتروني</label>
                        <div class="col-lg-4">
                            <input type="email" name="email" id="email" placeholder="البريد الإلكتروني" class="form-control" value="{$loadData->email}" />
                        </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="storeDescription">{$loadData->storeDescription}</textarea>

                        </div>
                    </div>

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

                    <input type="hidden" name="oldname" id="oldname" value="{$loadData->storeName}"/>
                    <input type="hidden" name="storeId" id="storeId" value="{$loadData->storeId}"/>
                    <input type="hidden" name="storeDate" value="{$loadData->storeDate}"/>
                    <input type="hidden" name="conditions" value="{$loadData->conditions}"/>


                    <!-- =================================================   -->
                    <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>


