edit.jsp 4.4 KB
Newer Older
Matija Obreza's avatar
Matija Obreza committed
1
2
<!DOCTYPE html>

3
<%@ include file="/WEB-INF/jsp/init.jsp" %>
Matija Obreza's avatar
Matija Obreza committed
4
5
6
7
8
9
10
11
12
13

<html>
<head>
<title><spring:message code="oauth-client.page.profile.title" arguments="${clientDetails.clientId}" /></title>
</head>
<body>
	<h1>
		<spring:message code="oauth-client.page.profile.title" arguments="${clientDetails.clientId}" />
	</h1>

Matija Obreza's avatar
Matija Obreza committed
14
	<form role="form" class="form-horizontal validate" action="<c:url value="/admin/oauth-clients/save-client" />" method="post">
15
		<c:if test="${clientDetails.id gt 0}">
Matija Obreza's avatar
Matija Obreza committed
16
17
18
19
20
21
22
23
24
25
26
27
28
29
		<input type="hidden" name="id" value="${clientDetails.id}" />
		</c:if>
		<c:if test="${clientDetails == null}">
		<input type="hidden" name="newClient" value="new" />
		</c:if>
		<div class="form-group">
			<label for="clientId" class="col-lg-2 control-label"><spring:message code="oauth-client.id" /></label>
			<div class="col-lg-10">
				<span class="form-control"><c:out value="${clientDetails.clientId}" /></span>
			</div>
		</div>
		<div class="form-group">
			<label for="secret" class="col-lg-2 control-label"><spring:message code="oauth-client.secret" /></label>
			<div class="col-lg-10">
30
				<input type="text" name="client_secret" class="form-control" value="<c:out value="${clientDetails.clientSecret}" />" />
Matija Obreza's avatar
Matija Obreza committed
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
			</div>
		</div>
        <div class="form-group">
            <label for="redirectUri" class="col-lg-2 control-label"><spring:message code="oauth-client.title" /></label>
            <div class="col-lg-10">
                <input type="text" name="title" class="form-control" value="<c:out value="${clientDetails.title}" />" />
            </div>
        </div>
        <div class="form-group">
            <label for="redirectUri" class="col-lg-2 control-label"><spring:message code="oauth-client.description" /></label>
            <div class="col-lg-10">
                <textarea name="description" class="form-control"><c:out value="${clientDetails.description}" /></textarea>
            </div>
        </div>
        <div class="form-group">
            <label for="redirectUri" class="col-lg-2 control-label"><spring:message code="oauth-client.redirect.uri" /></label>
            <div class="col-lg-10">
                <textarea id="redirectUri" name="redirectUris" class="form-control"><c:out value="${clientDetails.redirectUris}" /></textarea>
49
		            <p class="help-block">oob,urn:ietf:wg:oauth:2.0:oob</p>
Matija Obreza's avatar
Matija Obreza committed
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
            </div>
        </div>
        <div class="form-group">
            <label for="redirectUri" class="col-lg-2 control-label"><spring:message code="oauth-client.access-token.accessTokenValiditySeconds" /></label>
            <div class="col-lg-10">
                <input type="text" name="accessTokenValiditySeconds" class="form-control" placeholder="<spring:message code="oauth-client.access-token.defaultDuration" />" value="<c:out value="${clientDetails.accessTokenValiditySeconds}" />" />
            </div>
        </div>
         <div class="form-group">
            <label for="redirectUri" class="col-lg-2 control-label"><spring:message code="oauth-client.access-token.refreshTokenValiditySeconds" /></label>
            <div class="col-lg-10">
                <input type="text" name="refreshTokenValiditySeconds" class="form-control" placeholder="<spring:message code="oauth-client.access-token.defaultDuration" />" value="<c:out value="${clientDetails.refreshTokenValiditySeconds}" />" />
            </div>
        </div>
        <%--
        <div class="form-group">
            <label for="redirectUri" class="col-lg-2 control-label"><spring:message code="oauth-client.clientType" /></label>
            <div class="col-lg-10">
                <select id="clientType" name="clientType" class="form-control">
                	<option value="WEBAPP">Web application</option>
                	<option value="SERVICE">Service</option>
                	<option value="PACKAGED">Packaged</option>
                </select>
            </div>
        </div>
        --%>
		<div class="form-group">
			<div class="col-lg-offset-2 col-lg-10">
				<input type="submit" name="action-save" value="<spring:message code="save"/>" class="btn btn-primary" />
				<input type="submit" name="action-delete" value="<spring:message code="delete"/>" class="btn btn-default" />
Matija Obreza's avatar
Matija Obreza committed
80
				<a class="btn btn-default" href="<c:url value="/admin/oauth-clients/" />" class="btn"> <spring:message code="cancel" />
Matija Obreza's avatar
Matija Obreza committed
81
82
83
84
85
86
87
88
				</a>
			</div>
		</div>
        <!-- CSRF protection -->
        <input type="hidden" name="${_csrf.parameterName}" value="${_csrf.token}"/>
	</form>
</body>
</html>