Compare commits

...

3 Commits

5 changed files with 52 additions and 52 deletions

View File

@ -4,15 +4,17 @@
All notable changes to this project will be documented in this file.
This project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
## [v3.7.3] - 2022-01-03
- Make the motivation mandatory when someone asks to join a VRE
## [v3.7.2] - 2021-04-30
Removed a forgotten sysout in the code :(
- Removed a forgotten sysout in the code :(
## [v3.7.1] - 2020-10-16
Enhacements
No need to retrieve the user membership request status if the VRE Access policy is Open
- No need to retrieve the user membership request status if the VRE Access policy is Open
## [v3.7.0] - 2020-06-03

View File

@ -2,7 +2,6 @@
Join VRE Portlet is the Explore portlet of the Gateway when the user is not logged in. When logged in it allows the user to register to VREs.
## Structure of the project
* The source code is present in the src folder.
@ -22,11 +21,11 @@ See [Releases](https://code-repo.d4science.org/gCubeSystem/join-vre/releases).
## Authors
* **Massimiliano Assante** - [ISTI-CNR Infrascience Group](http://nemis.isti.cnr.it/groups/infrascience)
* **Massimiliano Assante** - [ISTI-CNR Infrascience Group](https://www.isti.cnr.it/People/M.Assante)
## Maintainers
* **Massimiliano Assante** - [ISTI-CNR Infrascience Group](http://nemis.isti.cnr.it/groups/infrascience)
* **Massimiliano Assante** - [ISTI-CNR Infrascience Group](https://www.isti.cnr.it/People/M.Assante)
## License
@ -35,16 +34,8 @@ This project is licensed under the EUPL V.1.1 License - see the [LICENSE.md](LIC
## About the gCube Framework
This software is part of the [gCubeFramework](https://www.gcube-system.org/ "gCubeFramework"): an
open-source software toolkit used for building and operating Hybrid Data
open-source software toolkit used for building and operating Data
Infrastructures enabling the dynamic deployment of Virtual Research Environments
by favouring the realisation of reuse oriented policies.
The projects leading to this software have received funding from a series of European Union programmes including:
- the Sixth Framework Programme for Research and Technological Development
- DILIGENT (grant no. 004260);
- the Seventh Framework Programme for research, technological development and demonstration
- D4Science (grant no. 212488), D4Science-II (grant no.239019), ENVRI (grant no. 283465), EUBrazilOpenBio (grant no. 288754), iMarine(grant no. 283644);
- the H2020 research and innovation programme
- BlueBRIDGE (grant no. 675680), EGIEngage (grant no. 654142), ENVRIplus (grant no. 654182), Parthenos (grant no. 654119), SoBigData (grant no. 654024),DESIRA (grant no. 818194), ARIADNEplus (grant no. 823914), RISIS2 (grant no. 824091), PerformFish (grant no. 727610), AGINFRAplus (grant no. 731001);
The projects leading to this software have received funding from a series of European Union programmes see [FUNDING.md](FUNDING.md)

View File

@ -3,18 +3,19 @@
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<parent>
<artifactId>maven-parent</artifactId>
<groupId>org.gcube.tools</groupId>
<version>1.1.0</version>
<relativePath />
</parent>
<modelVersion>4.0.0</modelVersion>
<groupId>org.gcube.portlets.user</groupId>
<artifactId>join-vre</artifactId>
<packaging>war</packaging>
<version>3.7.2</version>
<version>3.7.3</version>
<name>gCube Join VRE Portlet</name>
<description>Display the available VRE to Join</description>
<scm>

View File

@ -17,6 +17,7 @@ import com.google.gwt.event.dom.client.ClickHandler;
import com.google.gwt.uibinder.client.UiBinder;
import com.google.gwt.uibinder.client.UiField;
import com.google.gwt.uibinder.client.UiHandler;
import com.google.gwt.user.client.Window;
import com.google.gwt.user.client.Window.Location;
import com.google.gwt.user.client.rpc.AsyncCallback;
import com.google.gwt.user.client.ui.Composite;
@ -24,11 +25,11 @@ import com.google.gwt.user.client.ui.HTML;
import com.google.gwt.user.client.ui.Widget;
public class RequestMembershipDialog extends Composite {
private static final String OPTIONAL_COMMENT_TEXT = "You can add an optional comment here, it will be attached to your request and read by this VRE Moderators.";
private static final String MANDATORY_MOTIVATION_TEXT = "Please state your motivation here, it will be attached to your request and read by this VRE Moderators (Mandatory field).";
private final JoinServiceAsync joinService = GWT.create(JoinService.class);
private static RequestAccessModalUiBinder uiBinder = GWT
.create(RequestAccessModalUiBinder.class);
@ -38,12 +39,12 @@ public class RequestMembershipDialog extends Composite {
@UiField Modal m;
@UiField Button close;
@UiField Button confirmRequest;
@UiField TextArea optionalText;
@UiField TextArea mandatoryMotivation;
@UiField HelpBlock helpBlock;
@UiField Icon loading;
private VRE myVRE = null;
private ResponsivePanel responsivePanel;
@UiField HelpBlock touGatewayBlock;
@UiField HTML touText;
@ -51,8 +52,8 @@ public class RequestMembershipDialog extends Composite {
initWidget(uiBinder.createAndBindUi(this));
this.myVRE = myVRE;
this.responsivePanel = responsivePanel;
optionalText.setWidth("95%");
optionalText.setPlaceholder(OPTIONAL_COMMENT_TEXT);
mandatoryMotivation.setWidth("95%");
mandatoryMotivation.setPlaceholder(MANDATORY_MOTIVATION_TEXT);
}
public void show() {
@ -85,12 +86,12 @@ public class RequestMembershipDialog extends Composite {
((Element)m.getElement().getChildNodes().getItem(1)).addClassName("modal-body-custom");
touText.setHTML(result);
}
m.show();
}
});
m.show();
}
@ -100,27 +101,32 @@ public class RequestMembershipDialog extends Composite {
}
@UiHandler("confirmRequest")
void confirm(ClickEvent e) {
String text = optionalText.getText();
confirmRequest.setEnabled(false);
joinService.addMembershipRequest(myVRE, text, new AsyncCallback<Void>() {
@Override
public void onSuccess(Void result) {
confirmRequest.removeFromParent();
optionalText.removeFromParent();
m.setTitle("Thank you, your request has been sent successfully");
helpBlock.setText("You will receive an email as soon as your request will be processed.");
responsivePanel.setPending(myVRE);
confirmRequest.setEnabled(false);
touText.removeFromParent();
}
@Override
public void onFailure(Throwable caught) {
confirmRequest.removeFromParent();
optionalText.removeFromParent();
m.setTitle("An error occurred! Your request has not been sent");
helpBlock.setText("An email with the cause of the error has been sent to the support team, we'll be back to you shortly.");
touText.removeFromParent();
}
});
String text = mandatoryMotivation.getText();
if (text.isEmpty() || text.length() < 8) {
Window.alert("The motivation is mandatory, please state your motivation appropriately.");
}
else {
confirmRequest.setEnabled(false);
joinService.addMembershipRequest(myVRE, text, new AsyncCallback<Void>() {
@Override
public void onSuccess(Void result) {
confirmRequest.removeFromParent();
mandatoryMotivation.removeFromParent();
m.setTitle("Thank you, your request has been sent successfully");
helpBlock.setText("You will receive an email as soon as your request will be processed.");
responsivePanel.setPending(myVRE);
confirmRequest.setEnabled(false);
touText.removeFromParent();
}
@Override
public void onFailure(Throwable caught) {
confirmRequest.removeFromParent();
mandatoryMotivation.removeFromParent();
m.setTitle("An error occurred! Your request has not been sent");
helpBlock.setText("An email with the cause of the error has been sent to the support team, we'll be back to you shortly.");
touText.removeFromParent();
}
});
}
}
}

View File

@ -8,7 +8,7 @@
visible="false" />
<b:ControlGroup>
<b:Controls>
<b:TextArea ui:field="optionalText" alternateSize="XLARGE" />
<b:TextArea ui:field="mandatoryMotivation" alternateSize="XLARGE" />
<b:HelpBlock ui:field="helpBlock">Your request will be reviewed by this VRE moderators, you will be notified via email about the result as soon as possible (tipically within a few hours).</b:HelpBlock>
<b:HelpBlock ui:field="touGatewayBlock" visible="false">
By asking access to this VRE you agree to the terms indicated in