50
50
import pl .edu .icm .unity .types .basic .Group ;
51
51
import pl .edu .icm .unity .types .basic .GroupDelegationConfiguration ;
52
52
import pl .edu .icm .unity .webui .common .AbstractDialog ;
53
- import pl .edu .icm .unity .webui .common .CompactFormLayout ;
54
53
import pl .edu .icm .unity .webui .common .Images ;
55
54
import pl .edu .icm .unity .webui .common .NotificationPopup ;
56
55
import pl .edu .icm .unity .webui .common .Styles ;
@@ -177,7 +176,7 @@ public NewInvitationDialog(MessageSource msg,
177
176
Consumer <List <ProjectInvitationParam >> selectionConsumer ) {
178
177
super (msg , msg .getMessage ("NewInvitationDialog.caption" ));
179
178
this .selectionConsumer = selectionConsumer ;
180
- setSizeEm (45 , 24 );
179
+ setSizeEm (45 , 28 );
181
180
}
182
181
183
182
@ Override
@@ -199,9 +198,10 @@ protected FormLayout getContents() {
199
198
} catch (ControllerException e ) {
200
199
NotificationPopup .showError (e );
201
200
}
202
- email .setWidth (25 , Unit .EM );
201
+ email .setWidth (20 , Unit .EM );
202
+ email .setHeight (6 , Unit .EM );
203
203
email .setDescription (msg .getMessage ("NewInvitationDialog.emailsDesc" ));
204
-
204
+ email . setPlaceholder ( msg . getMessage ( "NewInvitationDialog.emailsPrompt" ));
205
205
206
206
allowModifyGroups = new CheckBox (msg .getMessage ("NewInvitationDialog.allowModifyGroups" ));
207
207
allowModifyGroups .setValue (false );
@@ -233,8 +233,8 @@ protected FormLayout getContents() {
233
233
234
234
binder = new Binder <>(ProjectInvitationParams .class );
235
235
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 )
238
238
return false ;
239
239
}
240
240
return true ;
@@ -255,8 +255,10 @@ protected FormLayout getContents() {
255
255
.toInstant ());
256
256
binder .setBean (bean );
257
257
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 );
260
262
main .setSizeFull ();
261
263
return main ;
262
264
}
@@ -271,7 +273,7 @@ protected void onConfirm() {
271
273
List <String > selectedGroups = groups .getSelectedItems ().stream ().map (g -> g .toString ())
272
274
.collect (Collectors .toList ());
273
275
274
- Stream .of (binder .getBean ().getContactAddress ().split (", " )).map (String ::trim )
276
+ Stream .of (binder .getBean ().getContactAddress ().split ("\n " )).map (String ::trim )
275
277
.forEach (email -> params .add (new ProjectInvitationParam (project .path , email ,
276
278
selectedGroups , allowModifyGroups .getValue (), inv .getExpiration ())));
277
279
0 commit comments