<!-- 
 Copyright 2013 The MITRE Corporation 
   and the MIT Kerberos and Internet Trust Consortium
 
 Licensed 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.
-->
<!-- whitelist -->

<script type="text/html" id="tmpl-whitelist">
	<td>
		<% if (client.dynamicallyRegistered) { %>
			<span class="label label-inverse dynamically-registered"><i class="icon-globe icon-white"></i></span>
		<% } %>
	</td>

    <td>
        <%=whiteList.clientId%>
		<% if (client.clientDescription) { %>
        <blockquote><small><%=client.clientDescription%></small></blockquote>
		<% } %>
		<div class="scope-list"></div>
    </td>

    <td>
        <%=client.clientName%>
        <!--expandable future information-->
    </td>

    <td>
        <button class="btn btn-edit"><i class="icon-edit"></i> Edit</button> &nbsp; 
		<button class="btn btn-danger btn-delete pull-right"><i class="icon-trash icon-white"></i> Delete</button>
    </td>

</script>

<script type="text/html" id="tmpl-whitelist-table">
    <div class="well well-small">
		<button class="btn btn-small refresh-table"><i class="icon-refresh"></i> Refresh</button>
    </div>

	<div id="whitelist-table-empty" class="alert alert-info">
		There are no whitelisted sites. Use the <strong>whitelist</strong> button on the client management page to create one.
	</div>

    <table id="whitelist-table" class="table table-hover table-striped">
        <thead>
        <tr>
			<th></th>
            <th>ID</th>
            <th>Name</th>
            <th></th>
        </tr>
        </thead>
        <tbody>
        </tbody>
    </table>

    <div class="well well-small">
		<button class="btn btn-small refresh-table"><i class="icon-refresh"></i> Refresh</button>
    </div>

</script>

<script type="text/html" id="tmpl-whitelist-form">

    <h1><%=(whiteList.id == null ? 'New' : 'Edit')%> Whitelisted Site</h1>


    <form class="form-horizontal">
        <fieldset>
            <div class="well well-small">
                <button class="btn btn-small btn-save btn-success"><i class="icon-ok-circle icon-white"></i> Save</button> &nbsp; 
				<button class="btn btn-small btn-cancel"><i class="icon-ban-circle"></i> Cancel</button>
            </div>

			<div class="control-group" id="clientId">
				<label class="control-label">Client</label>
				<div class="controls">
					<input type="hidden" name="clientId" value="<%= client.clientId %>" />
					<%= client.clientName != null ? client.clientName : client.clientId %>
				</div>
			</div>

            <div class="control-group" id="scope">
                <label class="control-label">Allowed Scopes</label>
                <div class="controls">
                </div>
            </div>

            <div class="well well-small">
                <button class="btn btn-small btn-save btn-success"><i class="icon-ok-circle icon-white"></i> Save</button> &nbsp; 
				<button class="btn btn-small btn-cancel"><i class="icon-ban-circle"></i> Cancel</button>
            </div>

        </fieldset>
    </form>

</script>
