InvitationForm.java (apache-openmeetings-6.1.0-src) | : | InvitationForm.java (apache-openmeetings-6.2.0-src) | ||
---|---|---|---|---|
skipping to change at line 84 | skipping to change at line 84 | |||
private final PasswordTextField passwd = new PasswordTextField("password" ); | private final PasswordTextField passwd = new PasswordTextField("password" ); | |||
private final DropDownChoice<String> timeZoneId = new DropDownChoice<>("t imeZoneId", Model.of((String)null), AVAILABLE_TIMEZONES); | private final DropDownChoice<String> timeZoneId = new DropDownChoice<>("t imeZoneId", Model.of((String)null), AVAILABLE_TIMEZONES); | |||
private final OmDateTimePicker from = new OmDateTimePicker("from", Model. of(LocalDateTime.now())); | private final OmDateTimePicker from = new OmDateTimePicker("from", Model. of(LocalDateTime.now())); | |||
private final OmDateTimePicker to = new OmDateTimePicker("to", Model.of(L ocalDateTime.now())); | private final OmDateTimePicker to = new OmDateTimePicker("to", Model.of(L ocalDateTime.now())); | |||
private final LanguageDropDown lang = new LanguageDropDown("language", Mo del.of((Long)null)); | private final LanguageDropDown lang = new LanguageDropDown("language", Mo del.of((Long)null)); | |||
protected final TextField<String> subject = new TextField<>("subject", Mo del.of((String)null)); | protected final TextField<String> subject = new TextField<>("subject", Mo del.of((String)null)); | |||
protected final TextArea<String> message = new TextArea<>("message", Mode l.of((String)null)); | protected final TextArea<String> message = new TextArea<>("message", Mode l.of((String)null)); | |||
protected final TextField<String> url = new TextField<>("url", Model.of(( String)null)); | protected final TextField<String> url = new TextField<>("url", Model.of(( String)null)); | |||
protected final UserMultiChoice recipients = new UserMultiChoice("recipie nts", new CollectionModel<>(new ArrayList<>())); | protected final UserMultiChoice recipients = new UserMultiChoice("recipie nts", new CollectionModel<>(new ArrayList<>())); | |||
protected InvitationDialog dialog; | protected InvitationDialog dialog; | |||
protected String dropDownParentId; | ||||
@SpringBean | @SpringBean | |||
private InvitationDao inviteDao; | private InvitationDao inviteDao; | |||
@SpringBean | @SpringBean | |||
private UserDao userDao; | private UserDao userDao; | |||
@SpringBean | @SpringBean | |||
private InvitationManager inviteManager; | private InvitationManager inviteManager; | |||
public enum Action { | public enum Action { | |||
GENERATE | GENERATE | |||
, SEND | , SEND | |||
} | } | |||
protected InvitationForm(String id) { | protected InvitationForm(String id, String dropDownParentId) { | |||
super(id, new CompoundPropertyModel<>(new Invitation())); | super(id, new CompoundPropertyModel<>(new Invitation())); | |||
this.dropDownParentId = dropDownParentId; | ||||
setOutputMarkupId(true); | setOutputMarkupId(true); | |||
} | } | |||
@Override | @Override | |||
protected void onInitialize() { | protected void onInitialize() { | |||
add(subject, message); | add(subject, message); | |||
recipients.setLabel(new ResourceModel("216")).setRequired(true).a dd(AjaxFormComponentUpdatingBehavior.onUpdate(EVT_CHANGE, target -> { | recipients.setLabel(new ResourceModel("216")).setRequired(true).a dd(AjaxFormComponentUpdatingBehavior.onUpdate(EVT_CHANGE, target -> { | |||
url.setModelObject(null); | url.setModelObject(null); | |||
updateButtons(target); | updateButtons(target); | |||
})).setOutputMarkupId(true); | })).setOutputMarkupId(true); | |||
if (dropDownParentId != null) { | ||||
recipients.getSettings().setDropdownParent(dropDownParent | ||||
Id); | ||||
} | ||||
add(new AjaxCheckBox("passwordProtected") { | add(new AjaxCheckBox("passwordProtected") { | |||
private static final long serialVersionUID = 1L; | private static final long serialVersionUID = 1L; | |||
@Override | @Override | |||
protected void onUpdate(AjaxRequestTarget target) { | protected void onUpdate(AjaxRequestTarget target) { | |||
InvitationForm.this.getModelObject().setPasswordP rotected(getConvertedInput()); | InvitationForm.this.getModelObject().setPasswordP rotected(getConvertedInput()); | |||
passwd.setEnabled(getConvertedInput()); | passwd.setEnabled(getConvertedInput()); | |||
target.add(passwd); | target.add(passwd); | |||
} | } | |||
}); | }); | |||
End of changes. 4 change blocks. | ||||
1 lines changed or deleted | 8 lines changed or added |