
<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"> {literal}
                <form class="nameToBeChecked form-horizontal" action="expensesController.php?do=update"  method="post" onsubmit="if (Spry.Widget.Form.validate(this)) {
                    checkNameWithId(event, 'expenses', 'expensesname', 'expenseid');
                    return true;
                } else {
                    return false;
                }">
                    <!--validate the form before checking name-->
                    {/literal}

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

                    <form  action="expensesController.php?do=add"  method="post" class=" form-horizontal" id="myExpenseForm" name="myExpenseForm" >
                        <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" value="{$Expensealldata->expensesname}" class="form-control"/>
                            </div>
                        </div>
                        <div class="form-group">
                            <label for="inputEmail1" class="col-lg-2 control-label">قيمة المصروف</label>
                            <div class="col-lg-4"> <span id="name">
                                    <input type="text" value="{$Expensealldata->expensesValue}" name="expensevalue" readonly="readonly" class="form-control numberinput"/>
                                    <input name="expenseid" id="expenseid" type="hidden" value="{$Expensealldata->expensesid}" />
                                    <span class="textfieldInvalidFormatMsg">يجب ادخال قيمه المصروف رقم.....</span></span> </div>
                        </div>
                        <div class="form-group">
                            <label for="inputEmail1" class="col-lg-2 control-label">نوع المصروف</label>
                            <div class="col-lg-4">
                                <select name="expensetype" data-placeholder="" class="select2 wdt100">
                                    {foreach $alldata as $data}
                                    <option  {if {$Expensealldata->expensestypeid} eq {$data->expensestypeid}}  selected="selected" {/if} value="{$data->expensestypeid}">{$data->expensestypename}</option>
                                    {/foreach}
                                </select>
                            </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">{$Expensealldata->expensesdetails}</textarea>
                            </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 name="conditions" type="radio" value="1" {if {$Expensealldata->
                                        conditions} eq 1} checked="checked" {/if} />
                                        نعم </label>
                                </div>
                                <div class="radio-inline">
                                    <label>
                                        <input name="conditions" type="radio" {if {$Expensealldata->
                                        conditions} eq 0} checked="checked" {/if} value="0" />
                                        لا </label>
                                </div>
                            </div>
                        </div>

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

                        <div class="form-group">
                            <div class="col-lg-offset-2 col-lg-4">
                                <button type="submit" 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", "currency");
</script>
{/literal}