
<div class="row">
    <div class="container">
        <ol class="breadcrumb">
            <li><a href="#">المصروفات والإيرادات</a></li>
            <li><a href="#">المصروفات</a></li>
            <li class="active">إضافة مصروف</li>
        </ol>
        <div class="panel panel-default panel-m">
            <!-- Default panel contents -->
            <div class="panel-heading">
                <h3 class="panel-title">إضافة مصروف</h3>
            </div>
            <div class="panel-body">
                <div class="col-lg-4 ">
                    <div class="row">
                        <div class="container">
                            <div class="panel panel-default panel-m">
                                <div class="panel-heading">
                                    <div class="caption"><i class="icon-comments"></i>شجرة المصروفات</div>
                                    <div class="actions"> <a href="javascript:;" id="tree_expense_collapse" class="btn btn-success"> اغلاق الكل</a> <a href="javascript:;" id="tree_expense_expand" class="btn btn-warning"> فتح الكل</a> </div>
                                </div>
                                <div class="panel-body" style="overflow-x:auto;  overflow-y:auto; height:400px;">
                                    <div class=" portlet-body fuelux">
                                        <ul class="tree" id="tree_expense">
                                            <li> <a href="#" data-role="branch" class="tree-toggle" data-toggle="branch" data-value="التصنيفات"> التصنيفات </a>
                                                <ul class="branch in">
                                                    {$treeHTML}
                                                </ul>
                                            </li>
                                        </ul>
                                    </div>
                                    <!---- portlet-body----->
                                </div>
                                <!---- panel-body----->
                            </div>
                            <!----panel----->

                        </div>
                        <!----container-->
                    </div><!----row-->
                </div><!----col-lg-4-->

                <div class="col-lg-8">
                    <input name="selectedId" id="selectedId" type="hidden" value="" />
                    <input name="selectedClass" id="selectedClass" type="hidden" value="" />
                    <input name="addParent" id="addParent" type="button"  onclick="addParent();" style="display:none;" class="btn btn-primary conformdel"  value="إضافة نوع مصروف"/>&nbsp;&nbsp;
                    <input name="addExpense" id="addExpense" type="button" onclick="addExpense();" style="display:none;" class="btn btn-primary" value="إضافة مصروف"  />
                    <!------------    Start  expensesTypeformDiv  --------------------------->
                    <div id="expensesTypeformDiv" style="display:none">

                    </div>
                    <!------------    End  expensesTypeformDiv  --------------------------->

                    <div class="clearfix"></div>

                    <div id="expensesEdit"></div>
                    <div class="clearfix"></div>

                    <!------------    Start  expensesformDiv  --------------------------->
                    <div id="expensesformDiv" style="display:none">
                        <form  action="expensesController.php?do=add"  method="post" class=" form-horizontal" id="myExpenseForm" name="myExpenseForm" >
                            <div style="display:none;">
                                <label>نوع المصروف</label>
                                <input name="expensetype" id="expensetype" type="hidden" />
                            </div>

                            <div class="form-group">
                                <label for="inputEmail1" class="col-lg-2 control-label">إسم المصروف</label>
                                <div class="col-lg-4">
                                    <input type="text" name="expensesname" id="expensesname" required="required"  onchange="checkExpenseName(this.value);"class="form-control" placeholder="إسم المصروف">
                                </div>
                            </div>

                            <div class="form-group">
                                <label for="inputEmail1" class="col-lg-2 control-label">قيمة المصروف</label>
                                <div class="col-lg-4">
                                    <input type="text" name="expensevalue" id="expensevalue" required="required"  class="form-control numberinput"  placeholder="قيمة المصروف">
                                </div>
                            </div>


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

                            <div class="form-group">
                                <div class="col-lg-offset-2 col-lg-4">
                                    <input type="submit" id="ss" name="ss" class="btn btn-primary pull-left" value="حفظ"/>
                                </div>
                            </div>
                        </form>
                    </div>
                    <!------------    End  expensesformDiv  --------------------------->
                    <div class="clearfix"></div>

                </div><!----col-lg-8-->
                <div class="clearfix"></div>


                <!-- Modal -->
                <div class="modal fade" id="catModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
                    <div class="modal-dialog">
                        <div class="modal-content">
                            <div class="modal-header">
                                <button type="button" class="close pull-left" data-dismiss="modal" aria-hidden="true">&times;</button>
                                <h4 class="modal-title">إضافة نوع</h4>
                            </div>
                            <div class="modal-body">

                                <form class="nameToBeChecked2 form-horizontal" action="expensesControllerajex.php?do=addCat"  id="catForm" name="catForm" method="post"  >


                                    <input name="parent" id="parent" type="hidden" value="" />
                                    <div class="form-group">
                                        <label class="col-lg-2 control-label">إسم نوع المصروف</label>
                                        <div class="col-lg-4">
                                            <input type="text" name="name" id="name" required="required" class="form-control" />
                                            <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 class="col-lg-2 control-label">تفاصيل أخرى</label>
                                        <div class="col-lg-4">

                                            <textarea   name="descripe" id="descripe" class="form-control" cols="45" rows="5" ></textarea>
                                        </div>
                                    </div>

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

                                    <div class="form-group">
                                        <div class="col-lg-offset-2 col-lg-4">
                                            {literal}
                                            <input type="button"  id="ww" name="ww" class="btn btn-primary pull-left" value="إضافة" onclick="if (Spry.Widget.Form.validate(this)) {
                              checkCatName(event, 'expensestype', 'name');
                              return true;
                          } else {
                              return false;
                          }"/>
                                            {/literal}
                                            <!--validate the form before checking name-->
                                        </div>
                                    </div>
                                </form>
                            </div>
                        </div>
                        <div class="modal-footer">
                            <!--              <button type="reset" class="btn btn-default" data-dismiss="modal">اغلاق</button>
                            -->              <!--<button type="submit" class="btn btn-primary savemodel">حفظ</button>-->
                        </div>
                    </div><!-- /.modal-content -->
                </div><!-- /.modal-dialog -->
            </div><!-- /.modal -->
            <!--------=====================================================================---->

        </div>
        <div class="clearfix"></div>
    </div>
</div>
</div>
>>>>>>>>>>>>>>>