

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

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

                    {/literal}

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


                            <input type="text" name="savename" id="savename"   placeholder="اسم الخزنة" class="form-control" />


                            <div id="saveerror"></div>


                            <div id="nameError" style="display:none">

                            </div>


                        </div>
                    </div>
                    <!-- =================================================   -->



                    <div class="form-group">
                        <label class="col-lg-2 control-label">عملة الخزنة</label>
                        <div class="col-lg-4">
                            <span id="spryselect1">
                                <select class="select2" name="currencyId" id="currencyId">
                                    {foreach $allCurrency as $data}
                                    <option value="{$data->id}">{$data->name}</option>
                                    {/foreach}
                                </select>
                                <span class="selectRequiredMsg">*</span></span>
                        </div>
                    </div>
                    <!-- =================================================   -->



                    <div class="form-group">
                        <label for="savecurrentvalue" class="col-lg-2 control-label">القيمة الحالية</label>
                        <div class="col-lg-4">


                            <div class="input-group">

                                <span id="sprytextfield1">
                                    <input type="text" name="savecurrentvalue" id="savecurrentvalue"  class="form-control positivefloat" placeholder="قيمة الخزنة الحالية" />

                                    <span class="textfieldRequiredMsg">*</span><span class="textfieldInvalidFormatMsg">ادخل القيمة صحيحة</span></span>

                                <span class="input-group-addon" id="currencyText">{$currency}</span>
                            </div>

                        </div>
                    </div>

                    <div class="form-group">
                        <label for="sortby" class="col-lg-2 control-label">الترتيب</label>
                        <div class="col-lg-4">
                            <input type="text" name="sortby" id="sortby"  class="form-control positivefloat" placeholder="الترتيب" />
                        </div>
                    </div>


                    <div class="form-group">
                        <label class="col-lg-2 control-label">نوع الخزنة فى الشجرة</label>
                        <div class="col-lg-4">
                            <div class="radio-inline">
                                <label>
                                    <input value="0" class="radioR" name="saveTreeParentType" type="radio" checked="">

                                    خزنة </label>
                            </div>
                            <div class="radio-inline">
                                <label>
                                    <input value="1" class="noradioR" name="saveTreeParentType" type="radio">
                                    عهدة </label>
                            </div>

                        </div>
                    </div>
                    <!-- =================================================   -->



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

                            <textarea  class="form-control" rows="3" name="savedetails"></textarea>

                        </div>
                    </div>

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

                    <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 name = new Spry.Widget.ValidationTextField("name");
    var sprytextfield1 = new Spry.Widget.ValidationTextField("sprytextfield1", "real");
    var spryselect1 = new Spry.Widget.ValidationSelect("spryselect1");
</script>

{/literal}

