edit.jsp 4.26 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

<html>
<head>
<title><spring:message code="oauth-client.page.profile.title" arguments="${clientDetails.clientId}" /></title>
</head>
<body>
Matija Obreza's avatar
Matija Obreza committed
10
	<form role="form" class="form-horizontal validate" action="<c:url value="/admin/oauth-clients/save-client" />" method="post">
11
		<c:if test="${clientDetails.id gt 0}">
Matija Obreza's avatar
Matija Obreza committed
12
13
14
15
16
17
18
19
20
21
22
23
24
25
		<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">
26
				<input type="text" name="client_secret" class="form-control" value="<c:out value="${clientDetails.clientSecret}" />" />
Matija Obreza's avatar
Matija Obreza committed
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
			</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">
Matija Obreza's avatar
Matija Obreza committed
44
                <textarea id="redirectUri" name="redirect" class="form-control"><c:out value="${clientDetails.redirect}" /></textarea>
45
		            <p class="help-block">oob,urn:ietf:wg:oauth:2.0:oob</p>
Matija Obreza's avatar
Matija Obreza committed
46
47
48
49
50
            </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">
Matija Obreza's avatar
Matija Obreza committed
51
                <input type="text" name="accessTokenValidity" class="form-control" placeholder="<spring:message code="oauth-client.access-token.defaultDuration" />" value="<c:out value="${clientDetails.accessTokenValidity}" />" />
Matija Obreza's avatar
Matija Obreza committed
52
53
54
55
56
            </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">
Matija Obreza's avatar
Matija Obreza committed
57
                <input type="text" name="refreshTokenValidity" class="form-control" placeholder="<spring:message code="oauth-client.access-token.defaultDuration" />" value="<c:out value="${clientDetails.refreshTokenValidity}" />" />
Matija Obreza's avatar
Matija Obreza committed
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
            </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
76
				<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
77
78
79
80
81
82
83
				</a>
			</div>
		</div>
        <!-- CSRF protection -->
        <input type="hidden" name="${_csrf.parameterName}" value="${_csrf.token}"/>
	</form>
</body>
Matija Obreza's avatar
Matija Obreza committed
84
</html>