Commit 5ad63174 authored by Gaston Dombiak's avatar Gaston Dombiak Committed by gaston

Modified form's variable names according to the new spec version.


git-svn-id: http://svn.igniterealtime.org/svn/repos/messenger/trunk@181 b35dd754-fafc-0310-a699-88a17e54d16e
parent a793974c
...@@ -76,38 +76,38 @@ public class IQMUCRegisterHandler extends IQHandler { ...@@ -76,38 +76,38 @@ public class IQMUCRegisterHandler extends IQHandler {
XFormFieldImpl field = new XFormFieldImpl("FORM_TYPE"); XFormFieldImpl field = new XFormFieldImpl("FORM_TYPE");
field.setType(FormField.TYPE_HIDDEN); field.setType(FormField.TYPE_HIDDEN);
field.addValue("http://jabber.org/protocol/muc#user"); field.addValue("http://jabber.org/protocol/muc#register");
registrationForm.addField(field); registrationForm.addField(field);
field = new XFormFieldImpl("muc#user_first"); field = new XFormFieldImpl("muc#register_first");
field.setType(FormField.TYPE_TEXT_SINGLE); field.setType(FormField.TYPE_TEXT_SINGLE);
field.setLabel(LocaleUtils.getLocalizedString("muc.form.reg.first-name")); field.setLabel(LocaleUtils.getLocalizedString("muc.form.reg.first-name"));
field.setRequired(true); field.setRequired(true);
registrationForm.addField(field); registrationForm.addField(field);
field = new XFormFieldImpl("muc#user_last"); field = new XFormFieldImpl("muc#register_last");
field.setType(FormField.TYPE_TEXT_SINGLE); field.setType(FormField.TYPE_TEXT_SINGLE);
field.setLabel(LocaleUtils.getLocalizedString("muc.form.reg.last-name")); field.setLabel(LocaleUtils.getLocalizedString("muc.form.reg.last-name"));
field.setRequired(true); field.setRequired(true);
registrationForm.addField(field); registrationForm.addField(field);
field = new XFormFieldImpl("muc#user_roomnick"); field = new XFormFieldImpl("muc#register_roomnick");
field.setType(FormField.TYPE_TEXT_SINGLE); field.setType(FormField.TYPE_TEXT_SINGLE);
field.setLabel(LocaleUtils.getLocalizedString("muc.form.reg.nickname")); field.setLabel(LocaleUtils.getLocalizedString("muc.form.reg.nickname"));
field.setRequired(true); field.setRequired(true);
registrationForm.addField(field); registrationForm.addField(field);
field = new XFormFieldImpl("muc#user_url"); field = new XFormFieldImpl("muc#register_url");
field.setType(FormField.TYPE_TEXT_SINGLE); field.setType(FormField.TYPE_TEXT_SINGLE);
field.setLabel(LocaleUtils.getLocalizedString("muc.form.reg.url")); field.setLabel(LocaleUtils.getLocalizedString("muc.form.reg.url"));
registrationForm.addField(field); registrationForm.addField(field);
field = new XFormFieldImpl("muc#user_email"); field = new XFormFieldImpl("muc#register_email");
field.setType(FormField.TYPE_TEXT_SINGLE); field.setType(FormField.TYPE_TEXT_SINGLE);
field.setLabel(LocaleUtils.getLocalizedString("muc.form.reg.email")); field.setLabel(LocaleUtils.getLocalizedString("muc.form.reg.email"));
registrationForm.addField(field); registrationForm.addField(field);
field = new XFormFieldImpl("muc#user_faqentry"); field = new XFormFieldImpl("muc#register_faqentry");
field.setType(FormField.TYPE_TEXT_MULTI); field.setType(FormField.TYPE_TEXT_MULTI);
field.setLabel(LocaleUtils.getLocalizedString("muc.form.reg.faqentry")); field.setLabel(LocaleUtils.getLocalizedString("muc.form.reg.faqentry"));
registrationForm.addField(field); registrationForm.addField(field);
...@@ -140,7 +140,7 @@ public class IQMUCRegisterHandler extends IQHandler { ...@@ -140,7 +140,7 @@ public class IQMUCRegisterHandler extends IQHandler {
currentRegistration.setProperty("query.registered", null); currentRegistration.setProperty("query.registered", null);
XDataFormImpl form = (XDataFormImpl) currentRegistration.getFragment("x", XDataFormImpl form = (XDataFormImpl) currentRegistration.getFragment("x",
"jabber:x:data"); "jabber:x:data");
form.getField("muc#user_roomnick").addValue(nickname); form.getField("muc#register_roomnick").addValue(nickname);
reply.setChildFragment(currentRegistration); reply.setChildFragment(currentRegistration);
} }
else { else {
...@@ -171,7 +171,8 @@ public class IQMUCRegisterHandler extends IQHandler { ...@@ -171,7 +171,8 @@ public class IQMUCRegisterHandler extends IQHandler {
XDataFormImpl registrationForm = new XDataFormImpl(); XDataFormImpl registrationForm = new XDataFormImpl();
registrationForm.parse(formElement); registrationForm.parse(formElement);
// Get the desired nickname sent in the form // Get the desired nickname sent in the form
Iterator values = registrationForm.getField("muc#user_roomnick").getValues(); Iterator values = registrationForm.getField("muc#register_roomnick")
.getValues();
String nickname = (values.hasNext() ? (String)values.next() : null); String nickname = (values.hasNext() ? (String)values.next() : null);
// TODO The rest of the fields of the form are ignored. If we have a // TODO The rest of the fields of the form are ignored. If we have a
......
...@@ -129,7 +129,9 @@ public class IQOwnerHandler { ...@@ -129,7 +129,9 @@ public class IQOwnerHandler {
MUCRole role; MUCRole role;
for (Iterator owners = room.getOwners(); owners.hasNext();) { for (Iterator owners = room.getOwners(); owners.hasNext();) {
jid = (String)owners.next(); jid = (String)owners.next();
ownerMetaData = new MetaDataFragment("http://jabber.org/protocol/muc#owner", "item"); ownerMetaData =
new MetaDataFragment("http://jabber.org/protocol/muc#owner",
"item");
ownerMetaData.setProperty("item:affiliation", "owner"); ownerMetaData.setProperty("item:affiliation", "owner");
ownerMetaData.setProperty("item:jid", jid); ownerMetaData.setProperty("item:jid", jid);
// Add role and nick to the metadata if the user is in the room // Add role and nick to the metadata if the user is in the room
...@@ -155,7 +157,9 @@ public class IQOwnerHandler { ...@@ -155,7 +157,9 @@ public class IQOwnerHandler {
MUCRole role; MUCRole role;
for (Iterator admins = room.getAdmins(); admins.hasNext();) { for (Iterator admins = room.getAdmins(); admins.hasNext();) {
jid = (String)admins.next(); jid = (String)admins.next();
adminMetaData = new MetaDataFragment("http://jabber.org/protocol/muc#owner", "item"); adminMetaData =
new MetaDataFragment("http://jabber.org/protocol/muc#owner",
"item");
adminMetaData.setProperty("item:affiliation", "admin"); adminMetaData.setProperty("item:affiliation", "admin");
adminMetaData.setProperty("item:jid", jid); adminMetaData.setProperty("item:jid", jid);
// Add role and nick to the metadata if the user is in the room // Add role and nick to the metadata if the user is in the room
...@@ -313,7 +317,7 @@ public class IQOwnerHandler { ...@@ -313,7 +317,7 @@ public class IQOwnerHandler {
FormField field; FormField field;
// Get the new list of admins // Get the new list of admins
field = completedForm.getField("muc#owner_roomadmins"); field = completedForm.getField("muc#roomconfig_roomadmins");
List admins = new ArrayList(); List admins = new ArrayList();
if (field != null) { if (field != null) {
values = field.getValues(); values = field.getValues();
...@@ -323,7 +327,7 @@ public class IQOwnerHandler { ...@@ -323,7 +327,7 @@ public class IQOwnerHandler {
} }
// Get the new list of owners // Get the new list of owners
field = completedForm.getField("muc#owner_roomowners"); field = completedForm.getField("muc#roomconfig_roomowners");
List owners = new ArrayList(); List owners = new ArrayList();
if (field != null) { if (field != null) {
values = field.getValues(); values = field.getValues();
...@@ -343,26 +347,26 @@ public class IQOwnerHandler { ...@@ -343,26 +347,26 @@ public class IQOwnerHandler {
room.lock.writeLock().lock(); room.lock.writeLock().lock();
try { try {
field = completedForm.getField("muc#owner_roomname"); field = completedForm.getField("muc#roomconfig_roomname");
if (field != null) { if (field != null) {
values = field.getValues(); values = field.getValues();
room.setName((values.hasNext() ? (String)values.next() : " ")); room.setName((values.hasNext() ? (String)values.next() : " "));
} }
field = completedForm.getField("muc#owner_roomdesc"); field = completedForm.getField("muc#roomconfig_roomdesc");
if (field != null) { if (field != null) {
values = field.getValues(); values = field.getValues();
room.setDescription((values.hasNext() ? (String)values.next() : " ")); room.setDescription((values.hasNext() ? (String)values.next() : " "));
} }
field = completedForm.getField("muc#owner_changesubject"); field = completedForm.getField("muc#roomconfig_changesubject");
if (field != null) { if (field != null) {
values = field.getValues(); values = field.getValues();
booleanValue = (values.hasNext() ? (String)values.next() : "1"); booleanValue = (values.hasNext() ? (String)values.next() : "1");
room.setCanOccupantsChangeSubject(("1".equals(booleanValue) ? true : false)); room.setCanOccupantsChangeSubject(("1".equals(booleanValue) ? true : false));
} }
field = completedForm.getField("muc#owner_maxusers"); field = completedForm.getField("muc#roomconfig_maxusers");
if (field != null) { if (field != null) {
values = field.getValues(); values = field.getValues();
room room
...@@ -370,7 +374,7 @@ public class IQOwnerHandler { ...@@ -370,7 +374,7 @@ public class IQOwnerHandler {
: 30)); : 30));
} }
field = completedForm.getField("muc#owner_presencebroadcast"); field = completedForm.getField("muc#roomconfig_presencebroadcast");
if (field != null) { if (field != null) {
values = field.getValues(); values = field.getValues();
list = new ArrayList(); list = new ArrayList();
...@@ -380,14 +384,14 @@ public class IQOwnerHandler { ...@@ -380,14 +384,14 @@ public class IQOwnerHandler {
room.setRolesToBroadcastPresence(list); room.setRolesToBroadcastPresence(list);
} }
field = completedForm.getField("muc#owner_publicroom"); field = completedForm.getField("muc#roomconfig_publicroom");
if (field != null) { if (field != null) {
values = field.getValues(); values = field.getValues();
booleanValue = (values.hasNext() ? (String)values.next() : "1"); booleanValue = (values.hasNext() ? (String)values.next() : "1");
room.setPublicRoom(("1".equals(booleanValue) ? true : false)); room.setPublicRoom(("1".equals(booleanValue) ? true : false));
} }
field = completedForm.getField("muc#owner_persistentroom"); field = completedForm.getField("muc#roomconfig_persistentroom");
if (field != null) { if (field != null) {
values = field.getValues(); values = field.getValues();
booleanValue = (values.hasNext() ? (String)values.next() : "1"); booleanValue = (values.hasNext() ? (String)values.next() : "1");
...@@ -399,37 +403,37 @@ public class IQOwnerHandler { ...@@ -399,37 +403,37 @@ public class IQOwnerHandler {
room.setPersistent(isPersistent); room.setPersistent(isPersistent);
} }
field = completedForm.getField("muc#owner_moderatedroom"); field = completedForm.getField("muc#roomconfig_moderatedroom");
if (field != null) { if (field != null) {
values = field.getValues(); values = field.getValues();
booleanValue = (values.hasNext() ? (String)values.next() : "1"); booleanValue = (values.hasNext() ? (String)values.next() : "1");
room.setModerated(("1".equals(booleanValue) ? true : false)); room.setModerated(("1".equals(booleanValue) ? true : false));
} }
field = completedForm.getField("muc#owner_inviteonly"); field = completedForm.getField("muc#roomconfig_inviteonly");
if (field != null) { if (field != null) {
values = field.getValues(); values = field.getValues();
booleanValue = (values.hasNext() ? (String)values.next() : "1"); booleanValue = (values.hasNext() ? (String)values.next() : "1");
room.setInvitationRequiredToEnter(("1".equals(booleanValue) ? true : false)); room.setInvitationRequiredToEnter(("1".equals(booleanValue) ? true : false));
} }
field = completedForm.getField("muc#owner_allowinvites"); field = completedForm.getField("muc#roomconfig_allowinvites");
if (field != null) { if (field != null) {
values = field.getValues(); values = field.getValues();
booleanValue = (values.hasNext() ? (String)values.next() : "1"); booleanValue = (values.hasNext() ? (String)values.next() : "1");
room.setCanOccupantsInvite(("1".equals(booleanValue) ? true : false)); room.setCanOccupantsInvite(("1".equals(booleanValue) ? true : false));
} }
field = completedForm.getField("muc#owner_passwordprotectedroom"); field = completedForm.getField("muc#roomconfig_passwordprotectedroom");
if (field != null) { if (field != null) {
values = field.getValues(); values = field.getValues();
booleanValue = (values.hasNext() ? (String)values.next() : "1"); booleanValue = (values.hasNext() ? (String)values.next() : "1");
boolean isPasswordProtected = "1".equals(booleanValue); boolean isPasswordProtected = "1".equals(booleanValue);
if (isPasswordProtected) { if (isPasswordProtected) {
// The room is password protected so set the new password // The room is password protected so set the new password
field = completedForm.getField("muc#owner_roomsecret"); field = completedForm.getField("muc#roomconfig_roomsecret");
if (field != null) { if (field != null) {
values = completedForm.getField("muc#owner_roomsecret").getValues(); values = completedForm.getField("muc#roomconfig_roomsecret").getValues();
room.setPassword((values.hasNext() ? (String)values.next() : null)); room.setPassword((values.hasNext() ? (String)values.next() : null));
} }
} }
...@@ -439,14 +443,14 @@ public class IQOwnerHandler { ...@@ -439,14 +443,14 @@ public class IQOwnerHandler {
} }
} }
field = completedForm.getField("muc#owner_whois"); field = completedForm.getField("muc#roomconfig_whois");
if (field != null) { if (field != null) {
values = field.getValues(); values = field.getValues();
booleanValue = (values.hasNext() ? (String)values.next() : "1"); booleanValue = (values.hasNext() ? (String)values.next() : "1");
room.setCanAnyoneDiscoverJID(("anyone".equals(booleanValue) ? true : false)); room.setCanAnyoneDiscoverJID(("anyone".equals(booleanValue) ? true : false));
} }
field = completedForm.getField("muc#owner_enablelogging"); field = completedForm.getField("muc#roomconfig_enablelogging");
if (field != null) { if (field != null) {
values = field.getValues(); values = field.getValues();
booleanValue = (values.hasNext() ? (String)values.next() : "1"); booleanValue = (values.hasNext() ? (String)values.next() : "1");
...@@ -501,71 +505,71 @@ public class IQOwnerHandler { ...@@ -501,71 +505,71 @@ public class IQOwnerHandler {
private void refreshConfigurationFormValues() { private void refreshConfigurationFormValues() {
room.lock.readLock().lock(); room.lock.readLock().lock();
try { try {
FormField field = configurationForm.getField("muc#owner_roomname"); FormField field = configurationForm.getField("muc#roomconfig_roomname");
field.clearValues(); field.clearValues();
field.addValue(room.getName()); field.addValue(room.getName());
field = configurationForm.getField("muc#owner_roomdesc"); field = configurationForm.getField("muc#roomconfig_roomdesc");
field.clearValues(); field.clearValues();
field.addValue(room.getDescription()); field.addValue(room.getDescription());
field = configurationForm.getField("muc#owner_changesubject"); field = configurationForm.getField("muc#roomconfig_changesubject");
field.clearValues(); field.clearValues();
field.addValue((room.canOccupantsChangeSubject() ? "1" : "0")); field.addValue((room.canOccupantsChangeSubject() ? "1" : "0"));
field = configurationForm.getField("muc#owner_maxusers"); field = configurationForm.getField("muc#roomconfig_maxusers");
field.clearValues(); field.clearValues();
field.addValue(Integer.toString(room.getMaxUsers())); field.addValue(Integer.toString(room.getMaxUsers()));
field = configurationForm.getField("muc#owner_presencebroadcast"); field = configurationForm.getField("muc#roomconfig_presencebroadcast");
field.clearValues(); field.clearValues();
for (Iterator it = room.getRolesToBroadcastPresence(); it.hasNext();) { for (Iterator it = room.getRolesToBroadcastPresence(); it.hasNext();) {
field.addValue((String)it.next()); field.addValue((String)it.next());
} }
field = configurationForm.getField("muc#owner_publicroom"); field = configurationForm.getField("muc#roomconfig_publicroom");
field.clearValues(); field.clearValues();
field.addValue((room.isPublicRoom() ? "1" : "0")); field.addValue((room.isPublicRoom() ? "1" : "0"));
field = configurationForm.getField("muc#owner_persistentroom"); field = configurationForm.getField("muc#roomconfig_persistentroom");
field.clearValues(); field.clearValues();
field.addValue((room.isPersistent() ? "1" : "0")); field.addValue((room.isPersistent() ? "1" : "0"));
field = configurationForm.getField("muc#owner_moderatedroom"); field = configurationForm.getField("muc#roomconfig_moderatedroom");
field.clearValues(); field.clearValues();
field.addValue((room.isModerated() ? "1" : "0")); field.addValue((room.isModerated() ? "1" : "0"));
field = configurationForm.getField("muc#owner_inviteonly"); field = configurationForm.getField("muc#roomconfig_inviteonly");
field.clearValues(); field.clearValues();
field.addValue((room.isInvitationRequiredToEnter() ? "1" : "0")); field.addValue((room.isInvitationRequiredToEnter() ? "1" : "0"));
field = configurationForm.getField("muc#owner_allowinvites"); field = configurationForm.getField("muc#roomconfig_allowinvites");
field.clearValues(); field.clearValues();
field.addValue((room.canOccupantsInvite() ? "1" : "0")); field.addValue((room.canOccupantsInvite() ? "1" : "0"));
field = configurationForm.getField("muc#owner_passwordprotectedroom"); field = configurationForm.getField("muc#roomconfig_passwordprotectedroom");
field.clearValues(); field.clearValues();
field.addValue((room.isPasswordProtected() ? "1" : "0")); field.addValue((room.isPasswordProtected() ? "1" : "0"));
field = configurationForm.getField("muc#owner_roomsecret"); field = configurationForm.getField("muc#roomconfig_roomsecret");
field.clearValues(); field.clearValues();
field.addValue(room.getPassword()); field.addValue(room.getPassword());
field = configurationForm.getField("muc#owner_whois"); field = configurationForm.getField("muc#roomconfig_whois");
field.clearValues(); field.clearValues();
field.addValue((room.canAnyoneDiscoverJID() ? "anyone" : "moderators")); field.addValue((room.canAnyoneDiscoverJID() ? "anyone" : "moderators"));
field = configurationForm.getField("muc#owner_enablelogging"); field = configurationForm.getField("muc#roomconfig_enablelogging");
field.clearValues(); field.clearValues();
field.addValue((room.isLogEnabled() ? "1" : "0")); field.addValue((room.isLogEnabled() ? "1" : "0"));
field = configurationForm.getField("muc#owner_roomadmins"); field = configurationForm.getField("muc#roomconfig_roomadmins");
field.clearValues(); field.clearValues();
for (Iterator it = room.getAdmins(); it.hasNext();) { for (Iterator it = room.getAdmins(); it.hasNext();) {
field.addValue((String)it.next()); field.addValue((String)it.next());
} }
field = configurationForm.getField("muc#owner_roomowners"); field = configurationForm.getField("muc#roomconfig_roomowners");
field.clearValues(); field.clearValues();
for (Iterator it = room.getOwners(); it.hasNext();) { for (Iterator it = room.getOwners(); it.hasNext();) {
field.addValue((String)it.next()); field.addValue((String)it.next());
...@@ -591,22 +595,22 @@ public class IQOwnerHandler { ...@@ -591,22 +595,22 @@ public class IQOwnerHandler {
field.addValue("http://jabber.org/protocol/muc#owner"); field.addValue("http://jabber.org/protocol/muc#owner");
configurationForm.addField(field); configurationForm.addField(field);
field = new XFormFieldImpl("muc#owner_roomname"); field = new XFormFieldImpl("muc#roomconfig_roomname");
field.setType(FormField.TYPE_TEXT_SINGLE); field.setType(FormField.TYPE_TEXT_SINGLE);
field.setLabel(LocaleUtils.getLocalizedString("muc.form.conf.owner_roomname")); field.setLabel(LocaleUtils.getLocalizedString("muc.form.conf.owner_roomname"));
configurationForm.addField(field); configurationForm.addField(field);
field = new XFormFieldImpl("muc#owner_roomdesc"); field = new XFormFieldImpl("muc#roomconfig_roomdesc");
field.setType(FormField.TYPE_TEXT_SINGLE); field.setType(FormField.TYPE_TEXT_SINGLE);
field.setLabel(LocaleUtils.getLocalizedString("muc.form.conf.owner_roomdesc")); field.setLabel(LocaleUtils.getLocalizedString("muc.form.conf.owner_roomdesc"));
configurationForm.addField(field); configurationForm.addField(field);
field = new XFormFieldImpl("muc#owner_changesubject"); field = new XFormFieldImpl("muc#roomconfig_changesubject");
field.setType(FormField.TYPE_BOOLEAN); field.setType(FormField.TYPE_BOOLEAN);
field.setLabel(LocaleUtils.getLocalizedString("muc.form.conf.owner_changesubject")); field.setLabel(LocaleUtils.getLocalizedString("muc.form.conf.owner_changesubject"));
configurationForm.addField(field); configurationForm.addField(field);
field = new XFormFieldImpl("muc#owner_maxusers"); field = new XFormFieldImpl("muc#roomconfig_maxusers");
field.setType(FormField.TYPE_LIST_SINGLE); field.setType(FormField.TYPE_LIST_SINGLE);
field.setLabel(LocaleUtils.getLocalizedString("muc.form.conf.owner_maxusers")); field.setLabel(LocaleUtils.getLocalizedString("muc.form.conf.owner_maxusers"));
field.addOption("10", "10"); field.addOption("10", "10");
...@@ -617,7 +621,7 @@ public class IQOwnerHandler { ...@@ -617,7 +621,7 @@ public class IQOwnerHandler {
field.addOption(LocaleUtils.getLocalizedString("muc.form.conf.none"), "0"); field.addOption(LocaleUtils.getLocalizedString("muc.form.conf.none"), "0");
configurationForm.addField(field); configurationForm.addField(field);
field = new XFormFieldImpl("muc#owner_presencebroadcast"); field = new XFormFieldImpl("muc#roomconfig_presencebroadcast");
field.setType(FormField.TYPE_LIST_MULTI); field.setType(FormField.TYPE_LIST_MULTI);
field.setLabel(LocaleUtils.getLocalizedString("muc.form.conf.owner_presencebroadcast")); field.setLabel(LocaleUtils.getLocalizedString("muc.form.conf.owner_presencebroadcast"));
field.addOption(LocaleUtils.getLocalizedString("muc.form.conf.moderator"), "moderator"); field.addOption(LocaleUtils.getLocalizedString("muc.form.conf.moderator"), "moderator");
...@@ -625,22 +629,22 @@ public class IQOwnerHandler { ...@@ -625,22 +629,22 @@ public class IQOwnerHandler {
field.addOption(LocaleUtils.getLocalizedString("muc.form.conf.visitor"), "visitor"); field.addOption(LocaleUtils.getLocalizedString("muc.form.conf.visitor"), "visitor");
configurationForm.addField(field); configurationForm.addField(field);
field = new XFormFieldImpl("muc#owner_publicroom"); field = new XFormFieldImpl("muc#roomconfig_publicroom");
field.setType(FormField.TYPE_BOOLEAN); field.setType(FormField.TYPE_BOOLEAN);
field.setLabel(LocaleUtils.getLocalizedString("muc.form.conf.owner_publicroom")); field.setLabel(LocaleUtils.getLocalizedString("muc.form.conf.owner_publicroom"));
configurationForm.addField(field); configurationForm.addField(field);
field = new XFormFieldImpl("muc#owner_persistentroom"); field = new XFormFieldImpl("muc#roomconfig_persistentroom");
field.setType(FormField.TYPE_BOOLEAN); field.setType(FormField.TYPE_BOOLEAN);
field.setLabel(LocaleUtils.getLocalizedString("muc.form.conf.owner_persistentroom")); field.setLabel(LocaleUtils.getLocalizedString("muc.form.conf.owner_persistentroom"));
configurationForm.addField(field); configurationForm.addField(field);
field = new XFormFieldImpl("muc#owner_moderatedroom"); field = new XFormFieldImpl("muc#roomconfig_moderatedroom");
field.setType(FormField.TYPE_BOOLEAN); field.setType(FormField.TYPE_BOOLEAN);
field.setLabel(LocaleUtils.getLocalizedString("muc.form.conf.owner_moderatedroom")); field.setLabel(LocaleUtils.getLocalizedString("muc.form.conf.owner_moderatedroom"));
configurationForm.addField(field); configurationForm.addField(field);
field = new XFormFieldImpl("muc#owner_inviteonly"); field = new XFormFieldImpl("muc#roomconfig_inviteonly");
field.setType(FormField.TYPE_BOOLEAN); field.setType(FormField.TYPE_BOOLEAN);
field.setLabel(LocaleUtils.getLocalizedString("muc.form.conf.owner_inviteonly")); field.setLabel(LocaleUtils.getLocalizedString("muc.form.conf.owner_inviteonly"));
configurationForm.addField(field); configurationForm.addField(field);
...@@ -650,12 +654,12 @@ public class IQOwnerHandler { ...@@ -650,12 +654,12 @@ public class IQOwnerHandler {
field.addValue(LocaleUtils.getLocalizedString("muc.form.conf.allowinvitesfixed")); field.addValue(LocaleUtils.getLocalizedString("muc.form.conf.allowinvitesfixed"));
configurationForm.addField(field); configurationForm.addField(field);
field = new XFormFieldImpl("muc#owner_allowinvites"); field = new XFormFieldImpl("muc#roomconfig_allowinvites");
field.setType(FormField.TYPE_BOOLEAN); field.setType(FormField.TYPE_BOOLEAN);
field.setLabel(LocaleUtils.getLocalizedString("muc.form.conf.owner_allowinvites")); field.setLabel(LocaleUtils.getLocalizedString("muc.form.conf.owner_allowinvites"));
configurationForm.addField(field); configurationForm.addField(field);
field = new XFormFieldImpl("muc#owner_passwordprotectedroom"); field = new XFormFieldImpl("muc#roomconfig_passwordprotectedroom");
field.setType(FormField.TYPE_BOOLEAN); field.setType(FormField.TYPE_BOOLEAN);
field.setLabel(LocaleUtils.getLocalizedString("muc.form.conf.owner_passwordprotectedroom")); field.setLabel(LocaleUtils.getLocalizedString("muc.form.conf.owner_passwordprotectedroom"));
configurationForm.addField(field); configurationForm.addField(field);
...@@ -665,19 +669,19 @@ public class IQOwnerHandler { ...@@ -665,19 +669,19 @@ public class IQOwnerHandler {
field.addValue(LocaleUtils.getLocalizedString("muc.form.conf.roomsecretfixed")); field.addValue(LocaleUtils.getLocalizedString("muc.form.conf.roomsecretfixed"));
configurationForm.addField(field); configurationForm.addField(field);
field = new XFormFieldImpl("muc#owner_roomsecret"); field = new XFormFieldImpl("muc#roomconfig_roomsecret");
field.setType(FormField.TYPE_TEXT_PRIVATE); field.setType(FormField.TYPE_TEXT_PRIVATE);
field.setLabel(LocaleUtils.getLocalizedString("muc.form.conf.owner_roomsecret")); field.setLabel(LocaleUtils.getLocalizedString("muc.form.conf.owner_roomsecret"));
configurationForm.addField(field); configurationForm.addField(field);
field = new XFormFieldImpl("muc#owner_whois"); field = new XFormFieldImpl("muc#roomconfig_whois");
field.setType(FormField.TYPE_LIST_SINGLE); field.setType(FormField.TYPE_LIST_SINGLE);
field.setLabel(LocaleUtils.getLocalizedString("muc.form.conf.owner_whois")); field.setLabel(LocaleUtils.getLocalizedString("muc.form.conf.owner_whois"));
field.addOption(LocaleUtils.getLocalizedString("muc.form.conf.moderator"), "moderators"); field.addOption(LocaleUtils.getLocalizedString("muc.form.conf.moderator"), "moderators");
field.addOption(LocaleUtils.getLocalizedString("muc.form.conf.anyone"), "anyone"); field.addOption(LocaleUtils.getLocalizedString("muc.form.conf.anyone"), "anyone");
configurationForm.addField(field); configurationForm.addField(field);
field = new XFormFieldImpl("muc#owner_enablelogging"); field = new XFormFieldImpl("muc#roomconfig_enablelogging");
field.setType(FormField.TYPE_BOOLEAN); field.setType(FormField.TYPE_BOOLEAN);
field.setLabel(LocaleUtils.getLocalizedString("muc.form.conf.owner_enablelogging")); field.setLabel(LocaleUtils.getLocalizedString("muc.form.conf.owner_enablelogging"));
configurationForm.addField(field); configurationForm.addField(field);
...@@ -687,7 +691,7 @@ public class IQOwnerHandler { ...@@ -687,7 +691,7 @@ public class IQOwnerHandler {
field.addValue(LocaleUtils.getLocalizedString("muc.form.conf.roomadminsfixed")); field.addValue(LocaleUtils.getLocalizedString("muc.form.conf.roomadminsfixed"));
configurationForm.addField(field); configurationForm.addField(field);
field = new XFormFieldImpl("muc#owner_roomadmins"); field = new XFormFieldImpl("muc#roomconfig_roomadmins");
field.setType(FormField.TYPE_JID_MULTI); field.setType(FormField.TYPE_JID_MULTI);
field.setLabel(LocaleUtils.getLocalizedString("muc.form.conf.owner_roomadmins")); field.setLabel(LocaleUtils.getLocalizedString("muc.form.conf.owner_roomadmins"));
configurationForm.addField(field); configurationForm.addField(field);
...@@ -697,7 +701,7 @@ public class IQOwnerHandler { ...@@ -697,7 +701,7 @@ public class IQOwnerHandler {
field.addValue(LocaleUtils.getLocalizedString("muc.form.conf.roomownersfixed")); field.addValue(LocaleUtils.getLocalizedString("muc.form.conf.roomownersfixed"));
configurationForm.addField(field); configurationForm.addField(field);
field = new XFormFieldImpl("muc#owner_roomowners"); field = new XFormFieldImpl("muc#roomconfig_roomowners");
field.setType(FormField.TYPE_JID_MULTI); field.setType(FormField.TYPE_JID_MULTI);
field.setLabel(LocaleUtils.getLocalizedString("muc.form.conf.owner_roomowners")); field.setLabel(LocaleUtils.getLocalizedString("muc.form.conf.owner_roomowners"));
configurationForm.addField(field); configurationForm.addField(field);
......
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