Skip to content

Commit c4165ad

Browse files
committed
UY-1138 QA fixes
1 parent e32334d commit c4165ad

File tree

2 files changed

+15
-12
lines changed

2 files changed

+15
-12
lines changed

web-upman/src/main/java/io/imunity/upman/invitations/ProjectInvitationsView.java

Lines changed: 11 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,6 @@
5050
import pl.edu.icm.unity.types.basic.Group;
5151
import pl.edu.icm.unity.types.basic.GroupDelegationConfiguration;
5252
import pl.edu.icm.unity.webui.common.AbstractDialog;
53-
import pl.edu.icm.unity.webui.common.CompactFormLayout;
5453
import pl.edu.icm.unity.webui.common.Images;
5554
import pl.edu.icm.unity.webui.common.NotificationPopup;
5655
import pl.edu.icm.unity.webui.common.Styles;
@@ -177,7 +176,7 @@ public NewInvitationDialog(MessageSource msg,
177176
Consumer<List<ProjectInvitationParam>> selectionConsumer) {
178177
super(msg, msg.getMessage("NewInvitationDialog.caption"));
179178
this.selectionConsumer = selectionConsumer;
180-
setSizeEm(45, 24);
179+
setSizeEm(45, 28);
181180
}
182181

183182
@Override
@@ -199,9 +198,10 @@ protected FormLayout getContents() {
199198
} catch (ControllerException e) {
200199
NotificationPopup.showError(e);
201200
}
202-
email.setWidth(25, Unit.EM);
201+
email.setWidth(20, Unit.EM);
202+
email.setHeight(6, Unit.EM);
203203
email.setDescription(msg.getMessage("NewInvitationDialog.emailsDesc"));
204-
204+
email.setPlaceholder(msg.getMessage("NewInvitationDialog.emailsPrompt"));
205205

206206
allowModifyGroups = new CheckBox(msg.getMessage("NewInvitationDialog.allowModifyGroups"));
207207
allowModifyGroups.setValue(false);
@@ -233,8 +233,8 @@ protected FormLayout getContents() {
233233

234234
binder = new Binder<>(ProjectInvitationParams.class);
235235
binder.forField(email).asRequired(msg.getMessage("fieldRequired")).withValidator(v -> {
236-
for (String email : v.split(",")) {
237-
if (EmailUtils.validate(email) != null)
236+
for (String email : v.split("\n")) {
237+
if (EmailUtils.validate(email.trim()) != null)
238238
return false;
239239
}
240240
return true;
@@ -255,8 +255,10 @@ protected FormLayout getContents() {
255255
.toInstant());
256256
binder.setBean(bean);
257257

258-
FormLayout main = new CompactFormLayout();
259-
main.addComponents(email, allowModifyGroups, groups, lifeTime);
258+
FormLayout main = new FormLayout();
259+
main.setSpacing(true);
260+
main.setMargin(false);
261+
main.addComponents(email, groups, allowModifyGroups, lifeTime);
260262
main.setSizeFull();
261263
return main;
262264
}
@@ -271,7 +273,7 @@ protected void onConfirm() {
271273
List<String> selectedGroups = groups.getSelectedItems().stream().map(g -> g.toString())
272274
.collect(Collectors.toList());
273275

274-
Stream.of(binder.getBean().getContactAddress().split(",")).map(String::trim)
276+
Stream.of(binder.getBean().getContactAddress().split("\n")).map(String::trim)
275277
.forEach(email -> params.add(new ProjectInvitationParam(project.path, email,
276278
selectedGroups, allowModifyGroups.getValue(), inv.getExpiration())));
277279

web-upman/src/main/resources/messages/upman/messages.properties

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -110,9 +110,10 @@ NewInvitationDialog.groups=Groups:
110110
NewInvitationDialog.groupsDesc=If left empty then the user will be only added to the project's root.
111111
NewInvitationDialog.allowModifyGroups=Allow user to modify groups when registering
112112
NewInvitationDialog.emails=Email(s):
113-
NewInvitationDialog.emailsDesc=Comma separated email addresses
114-
NewInvitationDialog.invitationLivetime=Invitation lifetime:
115-
NewInvitationDialog.invalidLifeTime=Invalid life time
113+
NewInvitationDialog.emailsPrompt=Emails of invited persons, one per line
114+
NewInvitationDialog.emailsDesc=Emails of invited persons, one per line
115+
NewInvitationDialog.invitationLivetime=Invitation valid until:
116+
NewInvitationDialog.invalidLifeTime=Invalid time
116117
NewInvitationDialog.incorrectEmail=Incorrect email(s)
117118
118119
InvitationsController.resendInvitationError=Can not send invitation

0 commit comments

Comments
 (0)