blob: 9c997687ec1c334172cf6aa87c78c667aeb352c2 [file] [log] [blame]
<%
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF 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.
*/
var privilegesInfo = sling.getService(Packages.org.apache.sling.jackrabbit.usermanager.AuthorizablePrivilegesInfo);
if (!privilegesInfo.canAddUser(currentSession)) {
//user can't create users.
response.sendError(403);
} else {
var rb = request.getResourceBundle("org.apache.sling.usermgr.Resources", null);
%>
<div class="ui-widget ui-widget-content ui-corner-all usermgmt-body" id="create-user-body" >
<h3 class="ui-widget-header ui-corner-all usermgmt-header"><%=rb.getString("page.title.create.user")%></h3>
<div class="info-msg-block" style="display:none;">
<div class="ui-state-highlight ui-corner-all">
<p>
<span class="ui-icon ui-icon-info"></span>
<span class="info-msg-text"></span>
</p>
</div>
</div>
<form id="create-user-form" accept-charset="UTF-8"
action="<%=request.contextPath%>/system/userManager/user.create.html"
method="post">
<fieldset>
<input type="hidden" value="UTF-8" name="_charset_" />
<input id="redirect" type="hidden" name=":redirect" value="<%=request.contextPath%>" />
<div class="prop-line ui-helper-clearfix">
<label for="userId" accesskey="u"><%=rb.getString("prop.label.userid")%>:</label>
<input id="userId" type="text" name=":name" />
</div>
<div class="prop-line ui-helper-clearfix">
<label for="displayName" accesskey="e"><%=rb.getString("prop.label.displayName")%>:</label>
<input id="displayName" type="text" name="displayName" />
</div>
<div class="prop-line ui-helper-clearfix">
<label for="email" accesskey="e"><%=rb.getString("prop.label.email")%>:</label>
<input id="email" type="text" name="email" />
</div>
<div class="prop-line ui-helper-clearfix">
<label for="pwd" accesskey="p"><%=rb.getString("prop.label.pwd")%>:</label>
<input id="pwd" type="password" name="pwd" />
</div>
<div class="prop-line ui-helper-clearfix">
<label for="pwdConfirm" accesskey="c"><%=rb.getString("prop.label.pwdConfirm")%>:</label>
<input id="pwdConfirm" type="password" name="pwdConfirm" />
</div>
<div class="ui-helper-clearfix">
<label>&#160;</label>
<button accesskey="r" id="createUserBtn" type="submit"><%=rb.getString("button.create")%></button>
</div>
</fieldset>
</form>
</div>
<% } /*endif (canAddUser) */ %>