<script src="{$path}/SpryAssets/SpryValidationSelect.js" type="text/javascript"></script>
<link href="{$path}/SpryAssets/SpryValidationSelect.css" rel="stylesheet" type="text/css" />

<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_SHOW}</li>
        </ol>
        <div class="panel panel-default panel-m">
            <!-- Default panel contents -->
            <div class="panel-heading" style="padding:5px 15px 15px">
                <h3 class="panel-title" style="display: inline-block;">{$smarty.const.INCOME_TYPE_SHOW}</h3>
                <a href="{$youtubes[101]->url}" target="_blank" class="hidden-print"><img src="../views/default/assets/img/youtube.png" class="pull-left" alt="Youtube" style="width: 2%;"></a>
                <a href="incomeTypeController.php" class="hidden-print"><input type="button" style="margin-left: 12px" id="submit"  class="btn btn-primary pull-left " value="{$smarty.const.INCOME_TYPE_ADD_NEW}"/></a>
            </div>

            <div class="panel-body">

                <!---------- start outputString alert ----------->
                <div id="outputString" class="alert alert-block alert-success fade in" style="display:none">
                    <button type="button" class="close pull-left" data-dismiss="alert" aria-hidden="true">&times;</button>
                    <p id="outputStringValue">{$outputString}</p>
                    <div class="clearfix"></div>
                </div>
                <!---------  end outputString alert ------------>

                {literal}
                <form id="form1" name="form1" method="post" action="../expensesTypeview - Copy/expensesTypeController.php?do=executeOperation" onsubmit="if (Spry.Widget.Form.validate(this)) {
                            return countChoosenProducts('expensesTypeController');
                        } else {
                            return false;
                        }
                      " enctype="multipart/form-data">
                    {/literal}


                    <!-- Table -->
                    <table class="table table-black">
                        <thead>
                            <tr>

                                <th>#</th>
                                <th>{$smarty.const.INCOME_TYPE_NAME}</th>
                                <th class="hidden-print" >{$smarty.const.INCOME_TYPE_EDIT}</th>
                                <th class="hidden-print" >{$smarty.const.INCOME_TYPE_DELETE}</th>
                            </tr>
                        </thead>
                        <tbody>
                            {assign var=i value=1}
                            {foreach $incomedata as $myincomedata}
                            <tr>

                                <!--{$myincomedata->incomeTypeId} -->
                                <td> {$i}</td>
                                <td>{$myincomedata->incomeTypeName}</td>
                                <td class="hidden-print"><a href="incomeTypeController.php?do=edit&id={$myincomedata->incomeTypeId}" type="button" class="btn btn-default btn-lg editicon"></a></td>
                                <td class="hidden-print"><a id="delinctype" href="#" type="button" class="btn btn-default btn-lg deleteicon"></a></td>
                            </tr>

                            {capture assign=i}{$i+1}{/capture}
                            {/foreach}
                        </tbody>

                    </table>




                    <!-----------  start noElementsError alert ------------->
                    <div class="clearfix"></div>
                    <div id="noElementsError" class="alert alert-danger fade in" style="display:none;">
                        <button type="button" class="close pull-left" data-dismiss="alert" aria-hidden="true">×</button>
                        <p>{$smarty.const.INCOME_TYPE_SELECTED_FIRST}</p>
                        <div class="clearfix"></div>
                    </div>
                    <!----------  end noElementsError alert -------------->



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

            <!-- Modal -->
            <div class="hidden-print">
                <div class="modal fade " id="myModal1" 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">{$smarty.const.INCOME_TYPE_CONFIRM_DELETION_RESOURCE}</h4>
                            </div>
                            <div class="modal-body">  {$smarty.const.INCOME_TYPE_DELETE_TYPE_BANKER}</div>
                            <form id="delIncTypeForm" action="incomeTypeController.php?do=delete&id={$myincomedata->incomeTypeId}" method="post" >
                                <div class="modal-footer">
                                    <button type="button" id="modalIncYes" class="btn btn-primary savemodel1">{$smarty.const.INCOME_TYPE_YES}</button>
                                    <button type="button" class="btn btn-default" data-dismiss="modal">{$smarty.const.INCOME_TYPE_NO}</button>
                                </div>
                            </form>
                        </div>
                        <!-- /.modal-content -->
                    </div>
                    <!-- /.modal-dialog -->
                </div>
            </div>
            <!-- /.modal -->

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

            <div  class="hidden-print">
                <div class="col-lg-12">
                    <div class="form-group">
                        <div class="col-lg-4">
                            <button type="button" onclick="print_Custom('mycustomheader');" class="btn btn-success pull-right">{$smarty.const.INCOME_TYPE_PRINT}</button>
                        </div>
                    </div>
                </div>
                <div class="clearfix"></div>
            </div>
        </div>
    </div>
    {literal}
    <script type="text/javascript">
        var spryselect2 = new Spry.Widget.ValidationSelect("spryselect2", {invalidValue: "-1", isRequired: false});
    </script>
    {/literal}
