

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

        <ol class="breadcrumb">
            <li><a href="#">المصروفات والايرادات</a></li>
            <li><a href="bankaccountController.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='myBankAccForm' class="nameToBeChecked form-horizontal" action="bankaccountController.php?do=add" method="post" >

                    <div class="form-group">
                        <label for="bankid" class="col-lg-2 control-label"> البنك</label>
                        <div class="col-lg-4">
                            <select class="select2 wdt100" name="bankid" id="bankid">
                                <option value="-1">اختر بنك</option>

                                {foreach $bankData as $bank}

                                <option value="{$bank->bankid}">{$bank->bankname}</option>

                                {/foreach}

                            </select>
                            <div id="bankidError" style="display:none;"></div>
                        </div>
                    </div>



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

                    <div class="form-group">
                        <label for="accountname" class="col-lg-2 control-label"> اسم الحساب</label>
                        <div class="col-lg-4">
                            <input type="text" name="accountname" id="accountname" class="form-control" placeholder="اسم الحساب"  />
                            <div id="accuntNameError" style="display:none;"></div>
                        </div>
                    </div>


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



                    <div class="form-group">
                        <label for="accountnumber" class="col-lg-2 control-label"> رقم الحساب</label>
                        <div class="col-lg-4">
                            <input type="text" name="accountnumber" id="accountnumber" class="form-control" placeholder="رقم الحساب" />
                            <div id="accuntNumberError" style="display:none;"></div>
                        </div>
                    </div>


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


                    <div class="form-group">
                        <label for="accountbeginingbalance" class="col-lg-2 control-label">قيمة الحساب</label>
                        <div class="col-lg-4">
                            <div class="input-group">
                                <input type="text" name="accountbeginingbalance" id="accountbeginingbalance"   class="form-control numberinput" placeholder="قيمة الحساب"  />
                                <span class="input-group-addon">{$currency}</span>
                            </div>
                            <div id="balanceError" style="display:none;"></div>
                        </div>
                    </div>


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



                    <div class="form-group">
                        <label for="accountcurrencytype" class="col-lg-2 control-label">نوع العملة</label>
                        <div class="col-lg-4">
                            <input type="text" name="accountcurrencytype" id="accountcurrencytype"  class="form-control " placeholder="نوع العملة" />
                            <div id="typeError" style="display:none;"></div>
                        </div>
                    </div>

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



                    <div class="form-group">
                        <label for="accountcurrencytype" class="col-lg-2 control-label">فيزا</label>
                        <div class="col-lg-4">
                            <input type="checkbox" name="visa" id="visa" value="1"/>
                        </div>
                    </div>
                    <div class="form-group" id="visaDisPerDiv" style="display: none">
                        <label for="accountcurrencytype" class="col-lg-2 control-label">نسبة مصروفات الفيزا</label>
                        <div class="col-lg-4">
                            <input type="text" name="visaDisPer" id="visaDisPer" class="form-control positivefloat" placeholder="0" value=""/>
                        </div>
                    </div>


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


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

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

                        </div>
                    </div>

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




                    <div class="form-group">
                        <div class="col-lg-offset-2 col-lg-4">
                            <button name="saveIncBtn" type="button" id="saveIncBtn" 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", "real");
    var sprytextfield2 = new Spry.Widget.ValidationTextField("sprytextfield2");
    var sprytextfield3 = new Spry.Widget.ValidationTextField("sprytextfield3");
    var sprytextfield4 = new Spry.Widget.ValidationTextField("sprytextfield4");
    var spryselect1 = new Spry.Widget.ValidationSelect("spryselect1", {isRequired: false, invalidValue: "-1"});
    $('#visa').live('change', function () {
        if ($(this).attr('checked') == "checked") {
            $('#visaDisPerDiv').show();
        } else {
            $('#visaDisPerDiv').hide();
        }
    });
</script>

{/literal}

