{{!
  Copyright (c) 2016, WSO2 Inc. (http://www.wso2.org) All Rights Reserved.

  WSO2 Inc. licenses this file to you under the Apache License,
  Version 2.0 (the "License"); you may not use this file except
  in compliance with the License.
  You may obtain a copy of the License at

  http://www.apache.org/licenses/LICENSE-2.0

  Unless required by applicable law or agreed to in writing,
  software distributed under the License is distributed on an
  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
  KIND, either express or implied. See the License for the
  specific language governing permissions and limitations
  under the License.
}}
<!-- content/body -->

{{unit "cdmf.unit.ui.modal"}}

<div class="row">
    <div class="col-md-12">
        <!-- content -->
        <div id="role-create-form" class="container col-centered wr-content">
            <div class="wr-form">
                <div id="permission-add-error-msg" class="alert alert-danger hidden" role="alert">
                    <i class="icon fw fw-error"></i><span></span>
                </div>
                <p class="page-sub-title">Change Role permissions</p>
                <p>Please note that * sign represents required fields of data.</p>
                <div class="wr-steps hidden" id="role_wizard_header">
                    <hr />
                    <div class="col-md-4 col-xs-6">
                        <div class="itm-wiz" data-step="policy-platform">
                            <div class="wiz-no">1</div>
                            <div class="wiz-lbl hidden-xs"><span>Add a role</span></div>
                        </div>
                        <br class="c-both" />
                    </div>
                    <div class="col-md-4 col-xs-6">
                        <div class="itm-wiz itm-wiz-current" data-step="policy-profile">
                            <div class="wiz-no">2</div>
                            <div class="wiz-lbl hidden-xs"><span>Assign permissions</span></div>
                        </div>
                        <br class="c-both" />
                    </div>
                    <br /><br />
                </div>
                <hr />
                <div class="row">
                    <div class="col-lg-8">
                        <div id="role-create-error-msg" class="alert alert-danger hidden" role="alert">
                            <i class="icon fw fw-error"></i><span></span>
                        </div>
                        <div id="permissionList" class="well" data-currentrole="{{roleName}}">
                            <div id="loading-content" class="col-centered">
                                <i class="fw fw-settings fw-spin fw-2x"></i>
                                Loading permissions list . . .
                                <br>
                            </div>
                        </div>
                    </div>
                </div>
                <br>
                <button id="update-permissions-btn" class="wr-btn">Update Role Permissions</button>
            </div>
        </div>
        <div id="role-created-msg" class="container col-centered wr-content hidden">
            <div class="wr-form">
                <p class="page-sub-title">Permissions were assigned to the role successfully.</p>
                <br>You will be redirected to Roles Listing Page in a moment.
                <hr />
            </div>
        </div>
        <!-- /content -->
    </div>
</div>
<!-- /content/body -->
{{#zone "bottomJs"}}
    <script id="list-partial" src="{{@unit.publicUri}}/templates/list-partial.hbs"
            type="text/x-handlebars-template"></script>
    <script id="tree-template" src="{{@unit.publicUri}}/templates/tree-template.hbs"
            type="text/x-handlebars-template"></script>
    {{js "js/bottomJs.js"}}
{{/zone}}

