mirror of
https://github.com/igniterealtime/Spark.git
synced 2025-10-29 19:57:28 +00:00
Merge pull request #861 from stokito/fix_account_creation
spark-core: separate message when account registration is not allowed
This commit is contained in:
commit
686fc4a91b
@ -281,11 +281,15 @@ public class AccountCreationWizard extends JPanel {
|
||||
* @param condition the error code.
|
||||
*/
|
||||
private void accountCreationFailed( StanzaError.Condition condition ) {
|
||||
String message = Res.getString("message.create.account");
|
||||
String message;
|
||||
if (condition == StanzaError.Condition.conflict) {
|
||||
message = Res.getString("message.already.exists");
|
||||
usernameField.setText("");
|
||||
usernameField.requestFocus();
|
||||
} else if (condition == StanzaError.Condition.not_allowed || condition == StanzaError.Condition.forbidden) {
|
||||
message = Res.getString("message.create.account.not.allowed");
|
||||
} else {
|
||||
message = Res.getString("message.create.account");
|
||||
}
|
||||
UIManager.put("OptionPane.okButtonText", Res.getString("ok"));
|
||||
JOptionPane.showMessageDialog(this, message, Res.getString("title.create.problem"), JOptionPane.ERROR_MESSAGE);
|
||||
@ -293,7 +297,7 @@ public class AccountCreationWizard extends JPanel {
|
||||
}
|
||||
|
||||
/**
|
||||
* Called if the account was created succesfully.
|
||||
* Called if the account was created successfully.
|
||||
*/
|
||||
private void accountCreationSuccessful() {
|
||||
registered = true;
|
||||
|
||||
@ -480,6 +480,7 @@ message.add.to.roster = Add To roster
|
||||
message.add.user = Add user to your roster?
|
||||
message.alert.notify = Alert notification
|
||||
message.already.exists = Account already exists, please try a different username
|
||||
message.create.account.not.allowed = Account creation is not allowed on the server
|
||||
message.approve.subscription = Allow {0} to add you to their roster?
|
||||
message.authenticating = Authenticating
|
||||
message.away.idle = Away due to idle
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user