
<div class="row">
    <div class="container">
        <ol class="breadcrumb">
            <li><a href="#">{$smarty.const.EXPENSES_REVENUE}</a></li>
            <li><a href="#">{$smarty.const.INCOME_TYPE}</a></li>
            <li class="active">{$smarty.const.INCOME_TYPE_ADD}</li>
        </ol>
        <div class="panel panel-default panel-m">
            <!-- Default panel contents -->
            <div class="panel-heading">
                <h3 class="panel-title">{$smarty.const.INCOME_TYPE_ADD}</h3>
            </div>
            <div class="panel-body">
                {literal}
                <form id="incform" class="form-horizontal" action="incomeTypeController.php?do=add" method="post" >
                    <!--validate the form before checking name-->
                    {/literal}
                    <div class="form-group">
                        <label class="col-lg-2 control-label">{$smarty.const.INCOME_TYPE_MAIN_CLASSIFICATION}</label>
                        <div class="col-lg-4">
                            <select name="parent" id="parent" class="select2 wdt100">
                                <option value="0" selected="selected">{$smarty.const.INCOME_TYPE_NO_MAIN_CLASSIFICATION}</option>
                                {foreach $allParents as $parent}
                                <option value="{$parent->incomeTypeId}">{$parent->incomeTypeName}</option>
                                {/foreach}
                            </select>
                            <div id="parentError" style="display:none;"></div>
                        </div>
                    </div>

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

                    <div class="form-group">
                        <label class="col-lg-2 control-label">{$smarty.const.INCOME_TYPE_NAME}</label>
                        <div class="col-lg-4">
                            <input type="text" name="name" id="name" class="form-control"/>
                            <div id="nameError" style="display:none;"></div>
                        </div>
                    </div>

                    <!--==============================-->
                    <div class="form-group">
                        <label class="col-lg-2 control-label"> {$smarty.const.INCOME_TYPE_DEFAULT_VALUE}</label>
                        <div class="col-lg-4">
                            <input name="defaultValue"  id="defaultValue" type="text" class="form-control numberinput"/>
                            <div id="valueError" style="display:none;"></div>
                        </div>
                    </div>
                    <!--==============================-->
                    <div class="form-group">
                        <label class="col-lg-2 control-label">{$smarty.const.INCOME_TYPE_OTHER_DETAILS}</label>
                        <div class="col-lg-4">
                            <textarea cols="20" rows="5" name="descripe" id="descripe" class="form-control"></textarea>
                        </div>
                    </div>

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

                    <div class="form-group">
                        <div class="col-lg-offset-2 col-lg-4">
                            <button type="button" id="saveIncBtn" class="btn btn-primary pull-left">{$smarty.const.INCOME_TYPE_SAVE}</button>
                        </div>
                    </div>
                </form>
            </div>
        </div>
    </div>
</div>
{literal}
<script type="text/javascript">
    var sprytextfield1 = new Spry.Widget.ValidationTextField("sprytextfield1");
    var spryselect1 = new Spry.Widget.ValidationSelect("spryselect1");
</script> {/literal}