<div class="row">
    <div class="container">
        <ol class="breadcrumb">
            <li><a href="#">المتجر اونلاين</a></li>
            <li><a href="paymentMethodsController.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="paymentMethodsController.php?do=add"
                      method="post" enctype="multipart/form-data" id="spform">
                    {/literal}

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

                    <div class="form-group">
                        <label for="name_ar" class="col-lg-2 control-label">الاسم عربي</label>
                        <div class="col-lg-4"> <span id="sprytextfield1">
                                <input type="text" name="name_ar" id="name_ar" class="form-control" />
                                <span class="textfieldRequiredMsg">*</span></span>
                        </div>
                    </div>
                    <div class="form-group">
                        <label for="name_en" class="col-lg-2 control-label">الاسم بالانجليزى</label>
                        <div class="col-lg-4"> <span id="sprytextfield2">
                                <input type="text" name="name_en" id="name_en"  class="form-control" />
                                <span class="textfieldRequiredMsg">*</span></span>
                        </div>
                    </div>
                    <!--==============================-->
                    <div class="form-group">
                        <label class="col-lg-2 control-label">صورة </label>
                        <div class="col-lg-4">
                            <input type="file" name="image" id="image" />
                        </div>
                    </div>
                    <!--==============================-->

                    <div class="form-group">
                        <label for="productCatDescription"
                               class="col-lg-2 control-label">الملاحظه عربي</label>
                        <div class="col-lg-10">
                            <textarea class="form-control ckeditor" rows="3" name="note_ar"></textarea>
                        </div>
                    </div>
                    <div class="form-group">
                        <label for="productCatDescription"
                               class="col-lg-2 control-label">الملاحظه بالانجليزى</label>
                        <div class="col-lg-10">
                            <textarea class="form-control ckeditor" rows="3" name="note_en"></textarea>
                        </div>
                    </div>
                    <!--==============================-->
                     {if $userid lt 1}
                    <div class="form-group">
                        <label for="productCatDescription"
                               class="col-lg-2 control-label">توكن الدفع  </label>
                        <div class="col-lg-10">
                            <textarea class="form-control" rows="3" name="apikey"></textarea>
                        </div>
                    </div>
                    
                    <div class="form-group">
                        <label for="merchant_id" class="col-lg-2 control-label">معرف التاجر </label>
                        <div class="col-lg-4"> 
                                <input type="text" name="merchant_id" id="merchant_id"  class="form-control" />
                        </div>
                    </div>
                    {/if}

                    <!--==============================-->
                    <div class="form-group">
                        <label for="productCatName" class="col-lg-2 control-label">اظهار الصفحة</label>
                        <div class="col-lg-4">
                            <div class="radio-inline">
                                <label>
                                    <input type="radio" name="is_active" id="is_active0" class="radioR" value="1" checked>
                                    نعم </label>
                            </div>
                            <div class="radio-inline">
                                <label>
                                    <input type="radio" name="is_active" id="is_active1" class="radioR" value="0">
                                    لا </label>
                            </div>
                        </div>
                    </div>
                    <!-- =================================================   -->

                    <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");
            var myForm = document.getElementById("spform");
            var SS = Spry.Widget.Form.validate(myForm);
            if (SS == true) {
                myForm.submit();
            } else {
                $('#spbutton').removeClass("processing");
            }
        }
    });
</script>
{/literal}