<!-- BEGIN CONTENT -->
<div class="page-content-wrapper">
    <div class="page-content">
        <!-- BEGIN PAGE HEADER-->
        <h3 class="page-title">
            {$shcontrollname}
        </h3>
        <div class="page-bar">
            <ul class="page-breadcrumb">
                {$breadcrumbs}
            </ul>
        </div>
        <!-- END PAGE HEADER-->
        <!-- BEGIN PAGE CONTENT-->
        <div class="row all">
            <div class="col-md-12">
                <div class="portlet light bg-inverse">
                    <div class="portlet-title">
                        <div class="caption">
                            <i class="icon-equalizer font-red-sunglo"></i>
                            <span class="caption-subject font-red-sunglo bold uppercase">Edit in {$shcontrollname}</span>
                        </div>
                        <div class="actions">
                            <a class="btn default btn-xs blue tooltips" href="{$hosturl}/controllers/{$controllname}.php?ac=show" data-container="body" data-placement="top" data-original-title="Show">
                                <i class="icon-list"></i>
                                Show items
                            </a>
                        </div>
                    </div>
                    <div class="portlet-body form">
                        <!-- BEGIN FORM-->
                        <form action="{$hosturl}/controllers/{$controllname}.php?ac=updateit" method="post" class="form-horizontal" id="menu_form" enctype="multipart/form-data">
                            <div class="form-body">
                                <div class="alert alert-danger display-hide">
                                    <button class="close" data-close="alert"></button>
                                    You have errors, see it again.
                                </div>
                                <div class="alert alert-success display-hide">
                                    <button class="close" data-close="alert"></button>
                                    You are good, GO ON.
                                </div>


                                <div class="form-group form-md-line-input has-info">
                                    <div class="input-group">
                                        <span class="input-group-addon">
                                            <i class="fa fa-users"></i>
                                        </span>
                                        <input type="text" class="form-control" placeholder="Title" name="label" value="{$menu->label}">
                                        <label for="form_control_1">Title</label>
                                    </div>
                                </div>
                                <div class="form-group form-md-line-input has-info">
                                    <div class="input-group">
                                        <span class="input-group-addon">
                                            <i class="fa fa-envelope"></i>
                                        </span>
                                        <input type="text" class="form-control" placeholder="Link" name="link" value="{$menu->link}">
                                        <label for="form_control_1">Link</label>
                                    </div>
                                    <div class="alert alert-warning display-hide" id="showerroremail">
                                        <button class="close" data-close="alert"></button>
                                        link must be like : 'page/show'
                                    </div>
                                </div>

                                <div class="form-group form-md-line-input has-info">
                                    <div class="input-group">
                                        <span class="input-group-addon">
                                            <i class="fa fa-users"></i>
                                        </span>
                                        <select class="form-control input-xlarge select2me input-sm select2-offscreen noborder" data-placeholder="Choose one" name="parent">
                                            <option value=""></option>
                                            <option value="0" {if {$menu->parent} eq 0} selected {/if}>No parent</option>
                                            {foreach $menus as $single}
                                            <option value="{$single->id}" {if {$menu->parent} eq {$single->id}} selected {/if}>{$single->label}</option>
                                            {/foreach}
                                        </select>
                                        <label for="form_control_1">Parent</label>
                                    </div>
                                </div>

                                <div class="form-group form-md-line-input has-info">
                                    <div class="input-group">
                                        <span class="input-group-addon">
                                            <i class="fa fa-envelope"></i>
                                        </span>
                                        <input type="text" class="form-control" placeholder="Active name" name="activename" value="{$menu->active_name}">
                                        <label for="form_control_1">Active name</label>
                                    </div>
                                    <div class="alert alert-warning display-hide" id="showerroremail">
                                        <button class="close" data-close="alert"></button>
                                        to show that link is highlighted
                                    </div>
                                </div>
                                
                                 <div class="form-group form-md-line-input">
                                    <label class="col-md-2" for="form_control_1">Show In</label>
                                    <div class="col-md-10">
                                        <div class="md-radio-inline">
                                            
                                            <div class="md-radio">
                                                <input type="radio" id="form0" value="0" name="form" class="md-radiobtn" {if $menu->form == 0} checked="" {/if} >
                                                <label for="form0">
                                                    <span></span>
                                                    <span class="check"></span>
                                                    <span class="box"></span>
                                                    Complete Form  </label>
                                            </div>
                                            
                                            
                                            <div class="md-radio">
                                                <input type="radio" id="form1" value="1" name="form" class="md-radiobtn" {if $menu->form == 1} checked="" {/if}>
                                                <label for="form1">
                                                    <span></span>
                                                    <span class="check"></span>
                                                    <span class="box"></span>
                                                    Simple Form  </label>
                                            </div>
                                            
                                            
                                             <div class="md-radio">
                                                <input type="radio" id="form2" value="2" name="form" class="md-radiobtn" {if $menu->form == 2} checked="" {/if}>
                                                <label for="form2">
                                                    <span></span>
                                                    <span class="check"></span>
                                                    <span class="box"></span>
                                                   Both  </label>
                                            </div>
                                            
                                        </div>
                                    </div>
                                </div>
                                
                                
                                <div class="form-group form-md-line-input">
                                    <label class="col-md-2" for="form_control_1">Display Option</label>
                                    <div class="col-md-10">
                                        <div class="md-radio-inline">
                                            <div class="md-radio">
                                                <input type="radio" id="icon" value="icon" name="display" class="md-radiobtn displayOption" {if $menu->display == "icon"} checked="" {/if}>
                                                <label for="icon">
                                                    <span></span>
                                                    <span class="check"></span>
                                                    <span class="box"></span>
                                                    Icon </label>
                                            </div>
                                            <div class="md-radio">
                                                <input type="radio" id="image" value="image" name="display" class="md-radiobtn displayOption" {if $menu->display == "image"} checked="" {/if}>
                                                <label for="image">
                                                    <span></span>
                                                    <span class="check"></span>
                                                    <span class="box"></span>
                                                    Image </label>
                                            </div>
                                            
                                        </div>
                                    </div>
                                </div>
                                


                                <div class="form-group form-md-line-input" id="iconDiv" {if $menu->display == "image"} style="display: none;" {/if}> 
                                    <label class="col-md-12">Icon</label>
                                    <div class="col-md-12">

                                        <input type="hidden" id="menuiconvalue" value="{$menu->icon}" />
                                        <div class="radio-list magtolft" id="menuradioicon">
                                            <div class="radio-inline fsmglft">
                                                <input type="radio" name="menuicon" value="icon-home" checked/>
                                                <i class="icon-home"></i> </div>

                                            <div class="radio-inline">
                                                <input type="radio" name="menuicon" value="icon-action-redo" />
                                                <i class="icon-action-redo"></i> </div>

                                            <div class="radio-inline">
                                                <input type="radio" name="menuicon" value="icon-bulb"/>
                                                <i class="icon-bulb"></i> </div>

                                            <div class="radio-inline">
                                                <input type="radio" name="menuicon" value="icon-graph" />
                                                <i class="icon-graph"></i> </div>

                                            <div class="radio-inline">
                                                <input type="radio" name="menuicon" value="icon-basket"/>
                                                <i class="icon-basket"></i> </div>

                                            <div class="radio-inline">
                                                <input type="radio" name="menuicon" value="icon-tag" />
                                                <i class="icon-tag"></i> </div>

                                            <div class="radio-inline">
                                                <input type="radio" name="menuicon" value="icon-handbag"/>
                                                <i class="icon-handbag"></i> </div>

                                            <div class="radio-inline">
                                                <input type="radio" name="menuicon" value="icon-pencil" />
                                                <i class="icon-pencil"></i> </div>

                                            <div class="radio-inline">
                                                <input type="radio" name="menuicon" value="icon-rocket"/>
                                                <i class="icon-rocket"></i> </div>

                                            <div class="radio-inline">
                                                <input type="radio" name="menuicon" value="icon-diamond" />
                                                <i class="icon-diamond"></i> </div>

                                            <div class="radio-inline">
                                                <input type="radio" name="menuicon" value="icon-puzzle"/>
                                                <i class="icon-puzzle"></i> </div>

                                            <div class="radio-inline">
                                                <input type="radio" name="menuicon" value="icon-paper-plane" />
                                                <i class="icon-paper-plane"></i> </div>

                                            <div class="radio-inline">
                                                <input type="radio" name="menuicon" value="icon-settings" />
                                                <i class="icon-settings"></i> </div>

                                            <div class="radio-inline">
                                                <input type="radio" name="menuicon" value="icon-briefcase"/>
                                                <i class="icon-briefcase"></i> </div>

                                            <div class="radio-inline">
                                                <input type="radio" name="menuicon" value="icon-wallet" />
                                                <i class="icon-wallet"></i> </div>

                                            <div class="radio-inline">
                                                <input type="radio" name="menuicon" value="icon-bar-chart"/>
                                                <i class="icon-bar-chart"></i> </div>

                                            <div class="radio-inline">
                                                <input type="radio" name="menuicon" value="icon-docs" />
                                                <i class="icon-docs"></i> </div>

                                            <div class="radio-inline">
                                                <input type="radio" name="menuicon" value="icon-check"/>
                                                <i class="icon-check"></i> </div>

                                            <div class="radio-inline">
                                                <input type="radio" name="menuicon" value="icon-envelope" />
                                                <i class="icon-envelope"></i> </div>

                                            <div class="radio-inline">
                                                <input type="radio" name="menuicon" value="icon-user-following"/>
                                                <i class="icon-user-following"></i> </div>

                                            <div class="radio-inline">
                                                <input type="radio" name="menuicon" value="icon-user" />
                                                <i class="icon-user"></i> </div>

                                            <div class="radio-inline">
                                                <input type="radio" name="menuicon" value="icon-users"/>
                                                <i class="icon-users"></i> </div>

                                            <div class="radio-inline">
                                                <input type="radio" name="menuicon" value="icon-question" />
                                                <i class="icon-question"></i> </div>

                                            <div class="radio-inline">
                                                <input type="radio" name="menuicon" value="icon-calendar"/>
                                                <i class="icon-calendar"></i> </div>

                                            <div class="radio-inline">
                                                <input type="radio" name="menuicon" value="icon-clock" />
                                                <i class="icon-clock"></i> </div>

                                            <div class="radio-inline">
                                                <input type="radio" name="menuicon" value="icon-flag"/>
                                                <i class="icon-flag"></i> </div>

                                            <div class="radio-inline">
                                                <input type="radio" name="menuicon" value="icon-speech" />
                                                <i class="icon-speech"></i> </div>

                                            <div class="radio-inline">
                                                <input type="radio" name="menuicon" value="icon-link"/>
                                                <i class="icon-link"></i> </div>

                                            <div class="radio-inline">
                                                <input type="radio" name="menuicon" value="icon-eye" />
                                                <i class="icon-eye"></i> </div>

                                            <div class="radio-inline">
                                                <input type="radio" name="menuicon" value="icon-bell" />
                                                <i class="icon-bell"></i> </div>

                                            <div class="radio-inline">
                                                <input type="radio" name="menuicon" value="icon-present"/>
                                                <i class="icon-present"></i> </div>

                                            <div class="radio-inline">
                                                <input type="radio" name="menuicon" value="icon-folder" />
                                                <i class="icon-folder"></i> </div>

                                            <div class="radio-inline">
                                                <input type="radio" name="menuicon" value="icon-globe"/>
                                                <i class="icon-globe"></i> </div>

                                            <div class="radio-inline">
                                                <input type="radio" name="menuicon" value="icon-camera" />
                                                <i class="icon-camera"></i> </div>

                                            <div class="radio-inline">
                                                <input type="radio" name="menuicon" value="icon-pointer"/>
                                                <i class="icon-pointer"></i> </div>

                                            <div class="radio-inline">
                                                <input type="radio" name="menuicon" value="icon-power" />
                                                <i class="icon-power"></i> </div>

                                            <div class="radio-inline">
                                                <input type="radio" name="menuicon" value="icon-star" />
                                                <i class="icon-star"></i> </div>

                                            <div class="radio-inline">
                                                <input type="radio" name="menuicon" value="icon-logout"/>
                                                <i class="icon-logout"></i> </div>

                                            <div class="radio-inline">
                                                <input type="radio" name="menuicon" value="icon-envelope-open" />
                                                <i class="icon-envelope-open"></i> </div>
                                        </div>
                                    </div>
                                </div>
                                
                                   <div class="form-group form-md-line-input" id="imageDiv" {if $menu->display == "icon"} style="display: none;" {/if} >
                                    <label class="col-md-2" for="form_control_1">Image</label>
                                    <div class="col-md-10">
                      
                            <div class="fileinput fileinput-new" data-provides="fileinput">
                                <div class="fileinput-preview thumbnail" data-trigger="fileinput" style="width: 200px; height: 150px;"> 
                                     <img src="{$hosturl}/../upload/menu/{$menu.image}"/>
                                </div>
                                <input type="hidden" id="imageurl" name="imageurl" value="{$menu->image}" />
                                <div> 
                                    <span class="btn default btn-file"> 
                                        <span class="fileinput-new"> Select image </span> 
                                        <span class="fileinput-exists"> Change </span>
                                        <input type="file" name="menuImage" id="menuImage"  class=" form-control">
                                    </span> <a href="#" class="btn red fileinput-exists" data-dismiss="fileinput"> Remove </a> </div>
                           </div>
              
                                    </div>
                                </div>

                                <input type="hidden" id="id" name="id" value="{$menu->id}" />


                            </div>
                            <div class="form-actions">
                                <div class="row">
                                    <div class="col-md-offset-3 col-md-4">
                                        <button type="submit" class="btn green">Update</button>
                                        <button type="button" class="btn default rtnshow" data-controll="{$controllname}">Cancel</button>
                                    </div>
                                </div>
                            </div>
                        </form>
                        <!-- END FORM-->
                    </div>
                </div>
            </div>
        </div>
        <!-- END PAGE CONTENT-->
    </div>
</div>
<!-- END CONTENT -->