<!-- 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">
            <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="" id="controll_form">
                            <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-success">
                                    <input type="text" class="form-control" id="form_control_1" name="label" placeholder="Display name" value="{$awcontroll->label}">
                                    <label for="form_control_1">Display name</label>
                                </div>

                                <div class="form-group form-md-line-input">
                                    <input type="text" class="form-control" id="form_control_2" id="name" name="name" placeholder="Enter Control name" value="{$awcontroll->name}">
                                    <label for="form_control_2">Control name</label>
                                    <span class="help-block">Enter control name like 'page'</span>
                                </div>


                                <div class="col-md-12">
                                    <h5 class="pull-left">Services in control</h5>
                                    <button type="button" class="btn blue-madison pull-right myplusbtn" id="myplusbtn">Add service</button>
                                </div>
                                <div class="clearfix"></div>
                                <br/>


                                <ul class="list-group plusitemprop" id="plusitemprop">
                                    {assign var=count value=1}
                                    {foreach $awcontrollprops as $single}
                                    <li class="list-group-item row nomargin">

                                        <div class="form-group col-md-7">
                                            <label class="col-md-3 control-label">Service name</label>
                                            <div class="col-md-4">
                                                <div class="input-icon right">
                                                    <i class="fa fa-font"></i>
                                                    <input type="text" class="form-control" placeholder="Service name" name="proplabel{$count}" value="{$single->proplabel}" required>
                                                    <input type="hidden" id="propid{$count}" name="propid{$count}" value="{$single->id}" />
                                                </div>
                                            </div>
                                        </div>

                                        <div class="form-group col-md-4">
                                            <label class="col-md-3 control-label">Access:</label>
                                            <div class="radio-list">
                                                <label class="radio-inline">
                                                    <input type="radio" name="checkval{$count}" id="checkval{$count}" value="1" {if $single->checkval eq 1 } checked{/if}> Access </label>
                                                <label class="radio-inline">
                                                    <input type="radio" name="checkval{$count}" id="checkval{$count}" value="0" {if $single->checkval eq 0 } checked{/if}> Deny </label>
                                            </div>
                                        </div>
                                        {if $count neq 1}
                                        <div class="col-md-1 pull-right">
                                            <button type="button" class="btn spinner-down red minsprop" data-edit="0" data-id="{$single->id}">
                                                <i class="fa fa-minus"></i>
                                            </button>
                                        </div>
                                        {/if}
                                    </li>
                                    {capture assign=count}{$count+1}{/capture}
                                    {/foreach}
                                </ul>
                                <input type="hidden" id="propitr" name="propitr" value="{$awcontrollprops|@count}" />
                                <input type="hidden" id="id" name="id" value="{$awcontroll->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 -->
