This is an automated email from the ASF dual-hosted git repository. solomax pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/openmeetings.git
The following commit(s) were added to refs/heads/master by this push: new 551ce3f [OPENMEETINGS-2490] display name is used instead of first/last name concatenation 551ce3f is described below commit 551ce3f11e2f290d8a7d45b108c89c9cd889770b Author: Maxim Solodovnik <solomax...@gmail.com> AuthorDate: Sun Oct 25 15:17:40 2020 +0700 [OPENMEETINGS-2490] display name is used instead of first/last name concatenation --- .../service/mail/template/RequestContactConfirmTemplate.html | 4 ++-- .../service/mail/template/RequestContactConfirmTemplate.java | 6 ++---- .../openmeetings/service/mail/template/RequestContactTemplate.html | 4 ++-- .../openmeetings/service/mail/template/RequestContactTemplate.java | 6 ++---- .../apache/openmeetings/web/user/profile/MessagesContactsPanel.java | 2 +- .../main/java/org/apache/openmeetings/web/util/ContactsHelper.java | 4 ++-- 6 files changed, 11 insertions(+), 15 deletions(-) diff --git a/openmeetings-service/src/main/java/org/apache/openmeetings/service/mail/template/RequestContactConfirmTemplate.html b/openmeetings-service/src/main/java/org/apache/openmeetings/service/mail/template/RequestContactConfirmTemplate.html index 585cc24..fe156c6 100644 --- a/openmeetings-service/src/main/java/org/apache/openmeetings/service/mail/template/RequestContactConfirmTemplate.html +++ b/openmeetings-service/src/main/java/org/apache/openmeetings/service/mail/template/RequestContactConfirmTemplate.html @@ -21,8 +21,8 @@ <!DOCTYPE html> <html xmlns:wicket="http://wicket.apache.org"> <wicket:extend> - <span wicket:id="hi"></span> <span wicket:id="firstName"></span> <span wicket:id="lastName"></span><br/> + <span wicket:id="hi"></span> <span wicket:id="displayName"></span><br/> <br/> - <span wicket:id="addedFirstName"></span> <span wicket:id="addedLastName"></span> <span wicket:id="confirmed"></span><br/> + <span wicket:id="addedName"></span> <span wicket:id="confirmed"></span><br/> </wicket:extend> </html> diff --git a/openmeetings-service/src/main/java/org/apache/openmeetings/service/mail/template/RequestContactConfirmTemplate.java b/openmeetings-service/src/main/java/org/apache/openmeetings/service/mail/template/RequestContactConfirmTemplate.java index 6f64dc4..d81b5ea 100644 --- a/openmeetings-service/src/main/java/org/apache/openmeetings/service/mail/template/RequestContactConfirmTemplate.java +++ b/openmeetings-service/src/main/java/org/apache/openmeetings/service/mail/template/RequestContactConfirmTemplate.java @@ -29,10 +29,8 @@ public class RequestContactConfirmTemplate extends AbstractTemplatePanel { private RequestContactConfirmTemplate(UserContact contact) { super(LocaleHelper.getLocale(contact.getOwner())); add(new Label("hi", getString("1192", locale))); - add(new Label("firstName", contact.getOwner().getFirstname())); - add(new Label("lastName", contact.getOwner().getLastname())); - add(new Label("addedFirstName", contact.getContact().getFirstname())); - add(new Label("addedLastName", contact.getContact().getLastname())); + add(new Label("displayName", contact.getOwner().getDisplayName())); + add(new Label("addedName", contact.getContact().getDisplayName())); add(new Label("confirmed", getString("1198", locale))); } diff --git a/openmeetings-service/src/main/java/org/apache/openmeetings/service/mail/template/RequestContactTemplate.html b/openmeetings-service/src/main/java/org/apache/openmeetings/service/mail/template/RequestContactTemplate.html index b5c53b3..a3a5aad 100644 --- a/openmeetings-service/src/main/java/org/apache/openmeetings/service/mail/template/RequestContactTemplate.html +++ b/openmeetings-service/src/main/java/org/apache/openmeetings/service/mail/template/RequestContactTemplate.html @@ -21,9 +21,9 @@ <!DOCTYPE html> <html xmlns:wicket="http://wicket.apache.org"> <wicket:extend> - <span wicket:id="hi"></span> <span wicket:id="addedFirstName"></span> <span wicket:id="addedLastName"></span><br/> + <span wicket:id="hi"></span> <span wicket:id="addedName"></span><br/> <br/> - <span wicket:id="firstName"></span> <span wicket:id="lastName"></span> <span wicket:id="likeToAdd"></span><br/> + <span wicket:id="displayName"></span> <span wicket:id="likeToAdd"></span><br/> <span wicket:id="check"></span><br/> <br/> <br/> diff --git a/openmeetings-service/src/main/java/org/apache/openmeetings/service/mail/template/RequestContactTemplate.java b/openmeetings-service/src/main/java/org/apache/openmeetings/service/mail/template/RequestContactTemplate.java index 1781f53..207e013 100644 --- a/openmeetings-service/src/main/java/org/apache/openmeetings/service/mail/template/RequestContactTemplate.java +++ b/openmeetings-service/src/main/java/org/apache/openmeetings/service/mail/template/RequestContactTemplate.java @@ -30,10 +30,8 @@ public class RequestContactTemplate extends AbstractTemplatePanel { private RequestContactTemplate(User userToAdd, User user) { super(LocaleHelper.getLocale(userToAdd)); add(new Label("hi", getString("1192", locale))); - add(new Label("addedFirstName", userToAdd.getFirstname())); - add(new Label("addedLastName", userToAdd.getLastname())); - add(new Label("firstName", user.getFirstname())); - add(new Label("lastName", user.getLastname())); + add(new Label("addedName", userToAdd.getDisplayName())); + add(new Label("displayName", user.getDisplayName())); add(new Label("likeToAdd", getString("1193", locale))); add(new Label("check", getString("1194", locale))); add(new ExternalLink("link", app.getOmContactsLink()).add(new Label("contactList", getString("1196", locale)))); diff --git a/openmeetings-web/src/main/java/org/apache/openmeetings/web/user/profile/MessagesContactsPanel.java b/openmeetings-web/src/main/java/org/apache/openmeetings/web/user/profile/MessagesContactsPanel.java index 285b5de..d1622d9 100644 --- a/openmeetings-web/src/main/java/org/apache/openmeetings/web/user/profile/MessagesContactsPanel.java +++ b/openmeetings-web/src/main/java/org/apache/openmeetings/web/user/profile/MessagesContactsPanel.java @@ -449,7 +449,7 @@ public class MessagesContactsPanel extends UserBasePanel { private static final long serialVersionUID = 1L; private String getName(UserContact uc) { - return uc.getOwner().getFirstname() + " " + uc.getOwner().getLastname(); + return uc.getOwner().getDisplayName(); } @Override diff --git a/openmeetings-web/src/main/java/org/apache/openmeetings/web/util/ContactsHelper.java b/openmeetings-web/src/main/java/org/apache/openmeetings/web/util/ContactsHelper.java index 05cb280..d667781 100644 --- a/openmeetings-web/src/main/java/org/apache/openmeetings/web/util/ContactsHelper.java +++ b/openmeetings-web/src/main/java/org/apache/openmeetings/web/util/ContactsHelper.java @@ -44,7 +44,7 @@ public class ContactsHelper { User user = contact.getOwner(); User userToAdd = contact.getContact(); - String subj = user.getFirstname() + " " + user.getLastname() + " " + Application.getString("1193"); + String subj = user.getDisplayName() + " " + Application.getString("1193"); String message = RequestContactTemplate.getEmail(userToAdd, user); get().getBean(PrivateMessageDao.class).addPrivateMessage( @@ -79,7 +79,7 @@ public class ContactsHelper { if (user.getAddress() != null) { String message = RequestContactConfirmTemplate.getEmail(contact); - String subj = contact.getContact().getFirstname() + " " + contact.getContact().getLastname() + " " + Application.getString("1198"); + String subj = contact.getContact().getDisplayName() + " " + Application.getString("1198"); get().getBean(PrivateMessageDao.class).addPrivateMessage( subj, message, contact.getContact(), user, user, false, 0L);