Commit 4f9549fc authored by Daniel Henninger's avatar Daniel Henninger Committed by dhenninger

[GATE-135] Adjusted registration methods to display actual reason for failures.

[GATE-147] Implemented AJAX based handling for registrations page.

git-svn-id: http://svn.igniterealtime.org/svn/repos/wildfire/trunk/src/plugins/gateway@7281 b35dd754-fafc-0310-a699-88a17e54d16e
parent 21b41a7c
...@@ -175,12 +175,19 @@ ...@@ -175,12 +175,19 @@
## Added key: 'gateway.msn.disconnect' ## Added key: 'gateway.msn.disconnect'
## Added key: 'gateway.msn.wink' ## Added key: 'gateway.msn.wink'
## Added key: 'gateway.msn.nudge' ## Added key: 'gateway.msn.nudge'
## Added key: 'gateway.web.registrations.deletesuccess'
## Added key: 'gateway.web.registrations.updatesuccess'
## Added key: 'gateway.web.registrations.addsuccess'
## Removed key: 'gateway.web.registrations.regsuccess'
## Removed key: 'gateway.web.registrations.regfailure'
## Added key: 'global.delete'
# Temporary Tags Until Fixed Properly # Temporary Tags Until Fixed Properly
login.title=Admin Console login.title=Admin Console
global.add=Add global.add=Add
global.edit=Edit global.edit=Edit
global.delete=Delete
global.cancel=Cancel global.cancel=Cancel
global.save_changes=Save Changes global.save_changes=Save Changes
...@@ -317,8 +324,6 @@ gateway.web.registrations.jid=user (JID) ...@@ -317,8 +324,6 @@ gateway.web.registrations.jid=user (JID)
gateway.web.registrations.gateway=gateway gateway.web.registrations.gateway=gateway
gateway.web.registrations.signedon=Signed on only gateway.web.registrations.signedon=Signed on only
gateway.web.registrations.update=Update gateway.web.registrations.update=Update
gateway.web.registrations.regsuccess=Registration successfully updated.
gateway.web.registrations.regfailure=Registration update failed.
gateway.web.registrations.next=Next gateway.web.registrations.next=Next
gateway.web.registrations.prev=Prev gateway.web.registrations.prev=Prev
gateway.web.registrations.remove=Remove gateway.web.registrations.remove=Remove
...@@ -334,3 +339,6 @@ gateway.web.registrations.regnotfound=Unable to find registration. ...@@ -334,3 +339,6 @@ gateway.web.registrations.regnotfound=Unable to find registration.
gateway.web.registrations.notenabled=Transport is not enabled. Please enable before attempting operation. gateway.web.registrations.notenabled=Transport is not enabled. Please enable before attempting operation.
gateway.web.registrations.illegaldomain=XMPP user account domain is not on this server. gateway.web.registrations.illegaldomain=XMPP user account domain is not on this server.
gateway.web.registrations.invaliduser=Invalid username specified for legacy service. gateway.web.registrations.invaliduser=Invalid username specified for legacy service.
gateway.web.registrations.deletesuccess=Registration successfully deleted.
gateway.web.registrations.updatesuccess=Registration successfully updated.
gateway.web.registrations.addsuccess=Registration successfully added.
...@@ -123,8 +123,8 @@ gateway.web.registrations.jid=Benutzer (JID) ...@@ -123,8 +123,8 @@ gateway.web.registrations.jid=Benutzer (JID)
gateway.web.registrations.gateway=Gateway gateway.web.registrations.gateway=Gateway
gateway.web.registrations.signedon=Nur Angemeldet gateway.web.registrations.signedon=Nur Angemeldet
gateway.web.registrations.update=Aktualisieren gateway.web.registrations.update=Aktualisieren
gateway.web.registrations.regsuccess=Registrierung erfolgreich aktualisiert. gateway.web.registrations.regsuccess=
gateway.web.registrations.regfailure=Aktualisierung fehlgeschlagen. gateway.web.registrations.regfailure=
gateway.web.registrations.next=Weiter gateway.web.registrations.next=Weiter
gateway.web.registrations.prev=Zur\u00fcck gateway.web.registrations.prev=Zur\u00fcck
gateway.web.registrations.remove=Entfernen gateway.web.registrations.remove=Entfernen
...@@ -157,4 +157,8 @@ gateway.web.registrations.xmppnotfound=Unable to find XMPP user account. ...@@ -157,4 +157,8 @@ gateway.web.registrations.xmppnotfound=Unable to find XMPP user account.
gateway.web.registrations.regnotfound=Unable to find registration. gateway.web.registrations.regnotfound=Unable to find registration.
gateway.web.registrations.notenabled=Transport is not enabled. Please enable before attempting operation. gateway.web.registrations.notenabled=Transport is not enabled. Please enable before attempting operation.
gateway.web.registrations.illegaldomain=XMPP user account domain is not on this server. gateway.web.registrations.illegaldomain=XMPP user account domain is not on this server.
gateway.web.registrations.invaliduser=Invalid username specified for legacy service. gateway.web.registrations.invaliduser=Invalid username specified for legacy service.
\ No newline at end of file gateway.web.registrations.deletesuccess=Registration successfully deleted.
gateway.web.registrations.updatesuccess=Registration successfully updated.
gateway.web.registrations.addsuccess=Registration successfully added.
global.delete=Delete
\ No newline at end of file
...@@ -123,8 +123,8 @@ gateway.web.registrations.jid=usuario (JID) ...@@ -123,8 +123,8 @@ gateway.web.registrations.jid=usuario (JID)
gateway.web.registrations.gateway=gateway gateway.web.registrations.gateway=gateway
gateway.web.registrations.signedon=Autenticado unicamente gateway.web.registrations.signedon=Autenticado unicamente
gateway.web.registrations.update=Actualizar gateway.web.registrations.update=Actualizar
gateway.web.registrations.regsuccess=La inscripcion ha sido actualizada exitosamente. gateway.web.registrations.regsuccess=
gateway.web.registrations.regfailure=La inscripcion no pudo ser actualizada. gateway.web.registrations.regfailure=
gateway.web.registrations.next=Siguiente gateway.web.registrations.next=Siguiente
gateway.web.registrations.prev=Anterior gateway.web.registrations.prev=Anterior
gateway.web.registrations.remove=Remover gateway.web.registrations.remove=Remover
...@@ -157,4 +157,8 @@ gateway.web.registrations.xmppnotfound=Unable to find XMPP user account. ...@@ -157,4 +157,8 @@ gateway.web.registrations.xmppnotfound=Unable to find XMPP user account.
gateway.web.registrations.regnotfound=Unable to find registration. gateway.web.registrations.regnotfound=Unable to find registration.
gateway.web.registrations.notenabled=Transport is not enabled. Please enable before attempting operation. gateway.web.registrations.notenabled=Transport is not enabled. Please enable before attempting operation.
gateway.web.registrations.illegaldomain=XMPP user account domain is not on this server. gateway.web.registrations.illegaldomain=XMPP user account domain is not on this server.
gateway.web.registrations.invaliduser=Invalid username specified for legacy service. gateway.web.registrations.invaliduser=Invalid username specified for legacy service.
\ No newline at end of file gateway.web.registrations.deletesuccess=Registration successfully deleted.
gateway.web.registrations.updatesuccess=Registration successfully updated.
gateway.web.registrations.addsuccess=Registration successfully added.
global.delete=Delete
\ No newline at end of file
...@@ -129,8 +129,8 @@ gateway.web.registrations.jid=user (JID) ...@@ -129,8 +129,8 @@ gateway.web.registrations.jid=user (JID)
gateway.web.registrations.gateway=gateway gateway.web.registrations.gateway=gateway
gateway.web.registrations.signedon=Enregistr\u00c8 seulement gateway.web.registrations.signedon=Enregistr\u00c8 seulement
gateway.web.registrations.update=Mise \u2021 jour gateway.web.registrations.update=Mise \u2021 jour
gateway.web.registrations.regsuccess=Enregistrement mis \u2021 jour avec succ\u00cbs. gateway.web.registrations.regsuccess=
gateway.web.registrations.regfailure=Echec de la mise \u2021 jour de l'enregistrement. gateway.web.registrations.regfailure=
gateway.web.registrations.next=Suivant gateway.web.registrations.next=Suivant
gateway.web.registrations.prev=Pr\u00c8c\u00c8dent gateway.web.registrations.prev=Pr\u00c8c\u00c8dent
gateway.web.registrations.remove=Supprimer gateway.web.registrations.remove=Supprimer
...@@ -157,4 +157,8 @@ gateway.web.registrations.xmppnotfound=Unable to find XMPP user account. ...@@ -157,4 +157,8 @@ gateway.web.registrations.xmppnotfound=Unable to find XMPP user account.
gateway.web.registrations.regnotfound=Unable to find registration. gateway.web.registrations.regnotfound=Unable to find registration.
gateway.web.registrations.notenabled=Transport is not enabled. Please enable before attempting operation. gateway.web.registrations.notenabled=Transport is not enabled. Please enable before attempting operation.
gateway.web.registrations.illegaldomain=XMPP user account domain is not on this server. gateway.web.registrations.illegaldomain=XMPP user account domain is not on this server.
gateway.web.registrations.invaliduser=Invalid username specified for legacy service. gateway.web.registrations.invaliduser=Invalid username specified for legacy service.
\ No newline at end of file gateway.web.registrations.deletesuccess=Registration successfully deleted.
gateway.web.registrations.updatesuccess=Registration successfully updated.
gateway.web.registrations.addsuccess=Registration successfully added.
global.delete=Delete
\ No newline at end of file
...@@ -123,8 +123,8 @@ gateway.web.registrations.jid=usu ...@@ -123,8 +123,8 @@ gateway.web.registrations.jid=usu
gateway.web.registrations.gateway=gateway gateway.web.registrations.gateway=gateway
gateway.web.registrations.signedon=Somente os marcados gateway.web.registrations.signedon=Somente os marcados
gateway.web.registrations.update=Atualizar gateway.web.registrations.update=Atualizar
gateway.web.registrations.regsuccess=Registro atualizado com sucesso. gateway.web.registrations.regsuccess=
gateway.web.registrations.regfailure=Falha ao atualizar o registro. gateway.web.registrations.regfailure=
gateway.web.registrations.next=Prximo gateway.web.registrations.next=Prximo
gateway.web.registrations.prev=Anterior gateway.web.registrations.prev=Anterior
gateway.web.registrations.remove=Remover gateway.web.registrations.remove=Remover
...@@ -157,4 +157,8 @@ gateway.web.registrations.xmppnotfound=Unable to find XMPP user account. ...@@ -157,4 +157,8 @@ gateway.web.registrations.xmppnotfound=Unable to find XMPP user account.
gateway.web.registrations.regnotfound=Unable to find registration. gateway.web.registrations.regnotfound=Unable to find registration.
gateway.web.registrations.notenabled=Transport is not enabled. Please enable before attempting operation. gateway.web.registrations.notenabled=Transport is not enabled. Please enable before attempting operation.
gateway.web.registrations.illegaldomain=XMPP user account domain is not on this server. gateway.web.registrations.illegaldomain=XMPP user account domain is not on this server.
gateway.web.registrations.invaliduser=Invalid username specified for legacy service. gateway.web.registrations.invaliduser=Invalid username specified for legacy service.
\ No newline at end of file gateway.web.registrations.deletesuccess=Registration successfully deleted.
gateway.web.registrations.updatesuccess=Registration successfully updated.
gateway.web.registrations.addsuccess=Registration successfully added.
global.delete=Delete
\ No newline at end of file
...@@ -280,8 +280,13 @@ public class ConfigManager { ...@@ -280,8 +280,13 @@ public class ConfigManager {
* @return Error message or null on success. * @return Error message or null on success.
*/ */
public String updateRegistration(Integer registrationID, String legacyUsername, String legacyPassword, String legacyNickname) { public String updateRegistration(Integer registrationID, String legacyUsername, String legacyPassword, String legacyNickname) {
PluginManager pluginManager = XMPPServer.getInstance().getPluginManager();
GatewayPlugin plugin = (GatewayPlugin)pluginManager.getPlugin("gateway");
try { try {
Registration reg = new Registration(registrationID); Registration reg = new Registration(registrationID);
if (!plugin.getTransportInstance(reg.getTransportType().toString()).isEnabled()) {
return LocaleUtils.getLocalizedString("gateway.web.registrations.notenabled", "gateway");
}
reg.setUsername(legacyUsername); reg.setUsername(legacyUsername);
if (legacyPassword != null) { if (legacyPassword != null) {
reg.setPassword(legacyPassword); reg.setPassword(legacyPassword);
......
<%@ page import="org.jivesoftware.util.Log, <%@ page import="org.jivesoftware.util.ParamUtils,
org.jivesoftware.util.NotFoundException,
org.jivesoftware.util.ParamUtils,
org.jivesoftware.wildfire.SessionManager, org.jivesoftware.wildfire.SessionManager,
org.jivesoftware.wildfire.XMPPServer, org.jivesoftware.wildfire.XMPPServer,
org.jivesoftware.wildfire.gateway.GatewayPlugin, org.jivesoftware.wildfire.gateway.GatewayPlugin,
org.jivesoftware.wildfire.gateway.Registration, org.jivesoftware.wildfire.gateway.Registration,
org.jivesoftware.wildfire.gateway.RegistrationManager, org.jivesoftware.wildfire.gateway.RegistrationManager,
org.jivesoftware.wildfire.session.ClientSession, org.jivesoftware.wildfire.session.ClientSession,
org.jivesoftware.wildfire.user.UserNotFoundException,
org.xmpp.packet.JID" org.xmpp.packet.JID"
errorPage="error.jsp" errorPage="error.jsp"
%> %>
...@@ -33,96 +30,9 @@ ...@@ -33,96 +30,9 @@
trEnabled.put("yahoo", plugin.getTransportInstance("yahoo").isEnabled()); trEnabled.put("yahoo", plugin.getTransportInstance("yahoo").isEnabled());
trEnabled.put("sip", plugin.getTransportInstance("sip").isEnabled()); trEnabled.put("sip", plugin.getTransportInstance("sip").isEnabled());
String success = request.getParameter("success");
webManager.init(request, response, session, application, out); webManager.init(request, response, session, application, out);
RegistrationManager registrationManager = new RegistrationManager(); RegistrationManager registrationManager = new RegistrationManager();
String action = ParamUtils.getParameter(request, "action");
if (action != null) {
if (action.equals("delete")) {
long regId = ParamUtils.getLongParameter(request, "deleteid", -1);
try {
Registration reg = new Registration(regId);
if (!trEnabled.get(reg.getTransportType().toString())) {
response.sendRedirect("gateway-registrations.jsp?success=false");
}
plugin.getTransportInstance(reg.getTransportType().toString()).getTransport().deleteRegistration(reg.getJID());
response.sendRedirect("gateway-registrations.jsp?success=true");
return;
}
catch (NotFoundException e) {
// Ok, nevermind.
Log.error("Not found while deleting id "+regId, e);
response.sendRedirect("gateway-registrations.jsp?success=false");
return;
}
catch (UserNotFoundException e) {
// Ok, nevermind.
Log.error("Not found while deleting id "+regId, e);
response.sendRedirect("gateway-registrations.jsp?success=false");
return;
}
}
else if (action.equals("edit")) {
long regId = ParamUtils.getLongParameter(request, "editid", -1);
try {
Registration reg = new Registration(regId);
reg.setUsername(ParamUtils.getParameter(request, "gatewayUsername"));
if (!ParamUtils.getParameter(request, "gatewayPassword").equals("********")) {
reg.setPassword(ParamUtils.getParameter(request, "gatewayPassword"));
}
reg.setNickname(ParamUtils.getParameter(request, "gatewayNickname"));
response.sendRedirect("gateway-registrations.jsp?success=true");
return;
}
catch (NotFoundException e) {
// Ok, nevermind.
Log.error("Not found while editing id "+regId, e);
response.sendRedirect("gateway-registrations.jsp?success=false");
return;
}
}
else if (action.equals("add")) {
JID jid;
String jidStr = ParamUtils.getParameter(request, "gatewayJID");
if (jidStr.contains("@")) {
jid = new JID(jidStr);
}
else {
jid = new JID(jidStr, XMPPServer.getInstance().getServerInfo().getName(), null);
}
String typeStr = ParamUtils.getParameter(request, "gatewayType");
String username = ParamUtils.getParameter(request, "gatewayUser");
String password = ParamUtils.getParameter(request, "gatewayPass");
String nickname = ParamUtils.getParameter(request, "gatewayNick");
if (!trEnabled.get(typeStr)) {
response.sendRedirect("gateway-registrations.jsp?success=false");
return;
}
try {
plugin.getTransportInstance(typeStr).getTransport().addNewRegistration(jid, username, password, nickname, false);
response.sendRedirect("gateway-registrations.jsp?success=true");
return;
}
catch (UserNotFoundException e) {
Log.error("Not found while adding account for "+jid.toString());
response.sendRedirect("gateway-registrations.jsp?success=false");
return;
}
catch (IllegalAccessException e) {
Log.error("Domain of JID specified for registration is not on this server: "+jid.toString());
response.sendRedirect("gateway-registrations.jsp?success=false");
return;
}
catch (IllegalArgumentException e) {
Log.error("Username specified for registration is not valid.");
response.sendRedirect("gateway-registrations.jsp?success=false");
return;
}
}
}
Collection<Registration> registrations = registrationManager.getRegistrations(); Collection<Registration> registrations = registrationManager.getRegistrations();
// Get the user manager // Get the user manager
...@@ -265,6 +175,7 @@ ...@@ -265,6 +175,7 @@
</style> </style>
<script src="dwr/engine.js" type="text/javascript"></script> <script src="dwr/engine.js" type="text/javascript"></script>
<script src="dwr/util.js" type="text/javascript"></script> <script src="dwr/util.js" type="text/javascript"></script>
<script src="dwr/interface/ConfigManager.js" type="text/javascript"></script>
<script src="dwr/interface/ConnectionTester.js" type="text/javascript"></script> <script src="dwr/interface/ConnectionTester.js" type="text/javascript"></script>
<script language="JavaScript" type="text/javascript" src="scripts/gateways.js"></script> <script language="JavaScript" type="text/javascript" src="scripts/gateways.js"></script>
<script type="text/javascript" > <script type="text/javascript" >
...@@ -275,6 +186,75 @@ ...@@ -275,6 +186,75 @@
// swallow errors // swallow errors
} }
var lastRegistrationID;
function deleteRegistration(registrationID) {
lastRegistrationID = registrationID;
ConfigManager.deleteRegistration(registrationID, cb_deleteRegistration);
}
function cb_deleteRegistration(statusMsg) {
Effect.Fade("jiveRegistration"+lastRegistrationID);
document.getElementById("regStatusMsg").style.display = "";
if (statusMsg == null) {
document.getElementById("regStatusMsg").innerHTML = "<div class='jive-success'><img src='images/success-16x16.gif' align='absmiddle' /><fmt:message key='gateway.web.registrations.deletesuccess' /></div>";
}
else {
document.getElementById("regStatusMsg").innerHTML = "<div class='jive-error'><img src='images/error-16x16.gif' align='absmiddle' />"+statusMsg+"</div>";
}
setTimeout("to_statusMessage()", 5000);
}
function updateRegistration(registrationID) {
var usernameEntry = DWRUtil.getValue("gatewayUsername"+registrationID);
var passwordEntry = DWRUtil.getValue("gatewayPassword"+registrationID);
if (passwordEntry == "********") {
passwordEntry = null;
}
var nicknameEntry = DWRUtil.getValue("gatewayNickname"+registrationID);
lastRegistrationID = registrationID;
ConfigManager.updateRegistration(registrationID, usernameEntry, passwordEntry, nicknameEntry, cb_updateRegistration);
}
function cb_updateRegistration(statusMsg) {
toggleEdit(lastRegistrationID);
var usernameEntry = DWRUtil.getValue("gatewayUsername"+lastRegistrationID);
document.getElementById("registrationUsername"+lastRegistrationID).innerHTML = usernameEntry;
document.getElementById("regStatusMsg").style.display = "";
if (statusMsg == null) {
document.getElementById("regStatusMsg").innerHTML = "<div class='jive-success'><img src='images/success-16x16.gif' align='absmiddle' /><fmt:message key='gateway.web.registrations.updatesuccess' /></div>";
}
else {
document.getElementById("regStatusMsg").innerHTML = "<div class='jive-error'><img src='images/error-16x16.gif' align='absmiddle' />"+statusMsg+"</div>";
}
setTimeout("to_statusMessage()", 5000);
}
function addRegistration() {
var userEntry = DWRUtil.getValue("newRegistrationUser");
var typeEntry = DWRUtil.getValue("newRegistrationType");
var legacyUsernameEntry = DWRUtil.getValue("newRegistrationLegacyUsername");
var legacyPasswordEntry = DWRUtil.getValue("newRegistrationLegacyPassword");
var legacyNicknameEntry = DWRUtil.getValue("newRegistrationLegacyNickname");
ConfigManager.addRegistration(userEntry, typeEntry, legacyUsernameEntry, legacyPasswordEntry, legacyNicknameEntry, cb_addRegistration);
}
function cb_addRegistration(statusMsg) {
toggleAdd();
document.getElementById("regStatusMsg").style.display = "";
if (statusMsg == null) {
document.getElementById("regStatusMsg").innerHTML = "<div class='jive-success'><img src='images/success-16x16.gif' align='absmiddle' /><fmt:message key='gateway.web.registrations.addsuccess' /></div>";
}
else {
document.getElementById("regStatusMsg").innerHTML = "<div class='jive-error'><img src='images/error-16x16.gif' align='absmiddle' />"+statusMsg+"</div>";
}
setTimeout("to_statusMessage()", 5000);
}
function to_statusMessage() {
Effect.Fade("regStatusMsg");
}
function pingSession() { function pingSession() {
ConnectionTester.pingSession(); ConnectionTester.pingSession();
setTimeout("pingSession()", 60000); // Every minute setTimeout("pingSession()", 60000); // Every minute
...@@ -287,44 +267,7 @@ ...@@ -287,44 +267,7 @@
<body> <body>
<p><fmt:message key="gateway.web.registrations.instructions" /></p> <p><fmt:message key="gateway.web.registrations.instructions" /></p>
<% <div id="regStatusMsg" style="display: none"></div>
if (success != null) {
if (success.equals("true")) {
%>
<div class="jive-success">
<table cellpadding="0" cellspacing="0" border="0">
<tbody>
<tr><td class="jive-icon"><img src="images/success-16x16.gif" width="16"
height="16" border="0" alt=""></td>
<td class="jive-icon-label">
<fmt:message key="gateway.web.registrations.regsuccess" />
</td></tr>
</tbody>
</table>
</div><br>
<%
}
else {
%>
<div class="jive-error">
<table cellpadding="0" cellspacing="0" border="0">
<tbody>
<tr><td class="jive-icon"><img src="images/error-16x16.gif" width="16"
height="16" border="0" alt=""></td>
<td class="jive-icon-label">
<fmt:message key="gateway.web.registrations.regfailure" />
</td></tr>
</tbody>
</table>
</div><br>
<%
}
}
%>
<!-- BEGIN add registration --> <!-- BEGIN add registration -->
<div class="jive-gateway-addregBtn" id="jiveAddRegButton"> <div class="jive-gateway-addregBtn" id="jiveAddRegButton">
...@@ -332,14 +275,14 @@ ...@@ -332,14 +275,14 @@
</div> </div>
<div class="jive-gateway-addreg" id="jiveAddRegPanel" style="display: none;"> <div class="jive-gateway-addreg" id="jiveAddRegPanel" style="display: none;">
<div class="jive-gateway-addregPad"> <div class="jive-gateway-addregPad">
<form action="gateway-registrations.jsp" name="jive-addRegistration"> <form action="" name="jive-addRegistration" onSubmit="return false">
<input type="hidden" name="action" value="add" /> <input type="hidden" name="action" value="add" />
<div class="jive-registrations-addJid"> <div class="jive-registrations-addJid">
<input type="text" name="gatewayJID" size="12" maxlength="50" value=""><br> <input type="text" name="newRegistrationUser" id="newRegistrationUser" size="12" maxlength="50" value=""><br>
<strong><fmt:message key="gateway.web.registrations.jid" /></strong> <strong><fmt:message key="gateway.web.registrations.jid" /></strong>
</div> </div>
<div class="jive-registrations-addGateway"> <div class="jive-registrations-addGateway">
<select name="gatewayType" size="1"> <select name="newRegistrationType" id="newRegistrationType" size="1">
<option value="0" SELECTED> -- select -- </option> <option value="0" SELECTED> -- select -- </option>
<% if (trEnabled.get("aim")) { %> <option value="aim"><fmt:message key="gateway.aim.shortservice" /></option> <% } %> <% if (trEnabled.get("aim")) { %> <option value="aim"><fmt:message key="gateway.aim.shortservice" /></option> <% } %>
<% if (trEnabled.get("icq")) { %> <option value="icq"><fmt:message key="gateway.icq.shortservice" /></option> <% } %> <% if (trEnabled.get("icq")) { %> <option value="icq"><fmt:message key="gateway.icq.shortservice" /></option> <% } %>
...@@ -351,19 +294,19 @@ ...@@ -351,19 +294,19 @@
<strong><fmt:message key="gateway.web.registrations.gateway" /></strong> <strong><fmt:message key="gateway.web.registrations.gateway" /></strong>
</div> </div>
<div class="jive-registrations-addUsername"> <div class="jive-registrations-addUsername">
<input type="text" name="gatewayUser" size="12" maxlength="50" value=""><br> <input type="text" name="newRegistrationLegacyUsername" id="newRegistrationLegacyUsername" size="12" maxlength="50" value=""><br>
<strong><fmt:message key="gateway.web.registrations.username" /></strong> <strong><fmt:message key="gateway.web.registrations.username" /></strong>
</div> </div>
<div class="jive-registrations-addPassword"> <div class="jive-registrations-addPassword">
<input type="password" name="gatewayPass" size="12" maxlength="50" value=""><br> <input type="password" name="newRegistrationLegacyPassword" id="newRegistrationLegacyPassword" size="12" maxlength="50" value=""><br>
<strong><fmt:message key="gateway.web.registrations.password" /></strong> <strong><fmt:message key="gateway.web.registrations.password" /></strong>
</div> </div>
<div class="jive-registrations-addNickname"> <div class="jive-registrations-addNickname">
<input type="text" name="gatewayNick" size="12" maxlength="50" value=""><br> <input type="text" name="newRegistrationLegacyNickname" id="newRegistrationLegacyNickname" size="12" maxlength="50" value=""><br>
<strong><fmt:message key="gateway.web.registrations.nickname" /></strong> <strong><fmt:message key="gateway.web.registrations.nickname" /></strong>
</div> </div>
<div class="jive-registrations-addButtons"> <div class="jive-registrations-addButtons">
<input type="submit" name="Submit" value="<fmt:message key="global.add" />" class="savechanges"> &nbsp; <input type="submit" name="Submit" value="<fmt:message key="global.add" />" class="savechanges" onClick="addRegistration(); return false"> &nbsp;
<input type="reset" name="reset" value="<fmt:message key="global.cancel" />" class="cancel" onClick="toggleAdd();"> <input type="reset" name="reset" value="<fmt:message key="global.cancel" />" class="cancel" onClick="toggleAdd();">
</div> </div>
</form> </form>
...@@ -501,31 +444,31 @@ ...@@ -501,31 +444,31 @@
<td align="center"> <td align="center">
<img src="images/im_<%= result.status %>.gif" alt="<%= result.linestatus %>" border="0"></td> <img src="images/im_<%= result.status %>.gif" alt="<%= result.linestatus %>" border="0"></td>
<td><%= result.jid %></td> <td><%= result.jid %></td>
<td><span class="jive-gateway-<%= result.linestatus %> jive-gateway-<%= result.type.toUpperCase() %><%= ((result.sessionActive) ? "on" : "off") %>"><%= result.username %></span></td> <td><span class="jive-gateway-<%= result.linestatus %> jive-gateway-<%= result.type.toUpperCase() %><%= ((result.sessionActive) ? "on" : "off") %>"><span id="registrationUsername<%= result.id %>"><%= result.username %></span></span></td>
<td><%= result.lastLogin %></td> <td><%= result.lastLogin %></td>
<td align="center"><a href="" onClick="<% if (!trEnabled.get(result.type)) { %>alert('You must enable this transport to modify registrations.'); return false;<% } else { %>toggleEdit(<%= result.id %>); return false<% } %>"><img src="images/edit-16x16.gif" alt="" border="0"></a></td> <td align="center"><a href="javascript:noop()" onClick="<% if (!trEnabled.get(result.type)) { %>alert('You must enable this transport to modify registrations.'); return false;<% } else { %>toggleEdit(<%= result.id %>); return false<% } %>"><img src="images/edit-16x16.gif" alt="<fmt:message key="global.edit" />" border="0"></a></td>
<td align="center"><form method="post" id="deleteRegistration<%= result.id %>" name="deleteRegistration<%= result.id %>" action="gateway-registrations.jsp"><input type="hidden" name="action" value="delete" /><input type="hidden" name="deleteid" value="<%= result.id %>" /><a href="" onClick="<% if (!trEnabled.get(result.type)) { %>alert('You must enable this transport to modify registrations.'); return false;<% } else { %>if (confirm('<fmt:message key="gateway.web.registrations.confirmdelete" />')) { document.getElementById('deleteRegistration<%= result.id %>').submit(); return false; } else { return false; }<% } %>"><img src="images/delete-16x16.gif" alt="" border="0"></a></form></td> <td align="center"><a href="javascript:noop()" onClick="<% if (!trEnabled.get(result.type)) { %>alert('You must enable this transport to delete registrations.'); return false;<% } else { %>if (confirm('<fmt:message key="gateway.web.registrations.confirmdelete" />')) { deleteRegistration('<%= result.id %>'); return false; } else { return false; }<% } %>"><img src="images/delete-16x16.gif" alt="<fmt:message key="global.delete" />" border="0"></a></td>
</tr> </tr>
<tr id="jiveRegistrationEdit<%= result.id %>" style="display: none;"> <tr id="jiveRegistrationEdit<%= result.id %>" style="display: none">
<td align="center"><img src="images/im_<%= result.status %>.gif" alt="<%= result.status %>" border="0"></td> <td align="center"><img src="images/im_<%= result.status %>.gif" alt="<%= result.status %>" border="0"></td>
<td><%= result.jid %></td> <td><%= result.jid %></td>
<td colspan="4"><form method="post" id="editRegistration<%= result.id %>" name="editRegistration<%= result.id %>" action="gateway-registrations.jsp"><input type="hidden" name="action" value="edit" /><input type="hidden" name="editid" value="<%= result.id %>" /> <td colspan="4"><form method="post" id="editRegistration<%= result.id %>" name="editRegistration<%= result.id %>" action="" onSubmit="return false">
<span class="jive-gateway-<%= result.linestatus %> jive-gateway-<%= result.type.toUpperCase() %>on"> <span class="jive-gateway-<%= result.linestatus %> jive-gateway-<%= result.type.toUpperCase() %>on">
<div class="jive-registrations-editUsername"> <div class="jive-registrations-editUsername">
<input type="text" name="gatewayUsername" size="12" maxlength="50" value="<%= result.username %>"><br> <input type="text" name="gatewayUsername<%= result.id %>" id="gatewayUsername<%= result.id %>"size="12" maxlength="50" value="<%= result.username %>"><br>
<strong><fmt:message key="gateway.web.registrations.username" /></strong> <strong><fmt:message key="gateway.web.registrations.username" /></strong>
</div> </div>
<div class="jive-registrations-editPassword"> <div class="jive-registrations-editPassword">
<input type="password" name="gatewayPassword" size="12" maxlength="50" value="********"><br> <input type="password" name="gatewayPassword<%= result.id %>" id="gatewayPassword<%= result.id %>"size="12" maxlength="50" value="********"><br>
<strong><fmt:message key="gateway.web.registrations.password" /></strong> <strong><fmt:message key="gateway.web.registrations.password" /></strong>
</div> </div>
<div class="jive-registrations-editNickname"> <div class="jive-registrations-editNickname">
<input type="text" name="gatewayNickname" size="12" maxlength="50" value="<%= result.nickname %>"><br> <input type="text" name="gatewayNickname<%= result.id %>%>" id="gatewayNickname<%= result.id %>" size="12" maxlength="50" value="<%= result.nickname %>"><br>
<strong><fmt:message key="gateway.web.registrations.nickname" /></strong> <strong><fmt:message key="gateway.web.registrations.nickname" /></strong>
</div> </div>
<div class="jive-registrations-editButtons"> <div class="jive-registrations-editButtons">
<input type="submit" name="Submit" value="<fmt:message key="global.save_changes" />" class="savechanges" onClick="document.getElementById.submit()"> &nbsp; <input type="submit" name="Submit" value="<fmt:message key="global.save_changes" />" class="savechanges" onClick="updateRegistration('<%= result.id %>'); return false" /> &nbsp;
<input type="reset" name="reset" value="<fmt:message key="global.cancel" />" class="cancel" onClick="toggleEdit(<%= result.id %>);"> <input type="reset" name="reset" value="<fmt:message key="global.cancel" />" class="cancel" onClick="toggleEdit(<%= result.id %>);" />
</div> </div>
</span> </span>
</form></td> </form></td>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment