minor bug fixes
This commit is contained in:
parent
1e679317ee
commit
ddc3a1ea17
4 changed files with 24 additions and 1 deletions
|
@ -16,10 +16,12 @@ import com.fasterxml.jackson.annotation.JsonCreator;
|
||||||
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
|
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
|
||||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||||
|
|
||||||
|
import ch.ethz.seb.sebserver.gbl.Constants;
|
||||||
import ch.ethz.seb.sebserver.gbl.api.EntityType;
|
import ch.ethz.seb.sebserver.gbl.api.EntityType;
|
||||||
import ch.ethz.seb.sebserver.gbl.api.POSTMapper;
|
import ch.ethz.seb.sebserver.gbl.api.POSTMapper;
|
||||||
import ch.ethz.seb.sebserver.gbl.model.Activatable;
|
import ch.ethz.seb.sebserver.gbl.model.Activatable;
|
||||||
import ch.ethz.seb.sebserver.gbl.model.Domain.INSTITUTION;
|
import ch.ethz.seb.sebserver.gbl.model.Domain.INSTITUTION;
|
||||||
|
import ch.ethz.seb.sebserver.gbl.model.Entity;
|
||||||
import ch.ethz.seb.sebserver.gbl.model.GrantEntity;
|
import ch.ethz.seb.sebserver.gbl.model.GrantEntity;
|
||||||
|
|
||||||
@JsonIgnoreProperties(ignoreUnknown = true)
|
@JsonIgnoreProperties(ignoreUnknown = true)
|
||||||
|
@ -115,6 +117,17 @@ public final class Institution implements GrantEntity, Activatable {
|
||||||
return this.active;
|
return this.active;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Entity printSecureCopy() {
|
||||||
|
return new Institution(
|
||||||
|
this.id,
|
||||||
|
this.name,
|
||||||
|
this.urlSuffix,
|
||||||
|
Constants.EMPTY_NOTE,
|
||||||
|
this.themeName,
|
||||||
|
this.active);
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String toString() {
|
public String toString() {
|
||||||
final StringBuilder builder = new StringBuilder();
|
final StringBuilder builder = new StringBuilder();
|
||||||
|
|
|
@ -422,6 +422,11 @@ public final class Form implements FormBinding {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (errorMessage == null) {
|
||||||
|
resetError();
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
if (!this.hasError) {
|
if (!this.hasError) {
|
||||||
this.control.setData(RWT.CUSTOM_VARIANT, CustomVariant.ERROR.key);
|
this.control.setData(RWT.CUSTOM_VARIANT, CustomVariant.ERROR.key);
|
||||||
this.errorLabel.setText("- " + errorMessage);
|
this.errorLabel.setText("- " + errorMessage);
|
||||||
|
|
|
@ -292,6 +292,11 @@ public class OAuth2AuthorizationContextHolder implements AuthorizationContextHol
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean hasError(final ClientHttpResponse response) throws IOException {
|
public boolean hasError(final ClientHttpResponse response) throws IOException {
|
||||||
|
final boolean hasError = super.hasError(response);
|
||||||
|
if (hasError) {
|
||||||
|
return hasError;
|
||||||
|
}
|
||||||
|
|
||||||
final HttpStatus statusCode = HttpStatus.resolve(response.getRawStatusCode());
|
final HttpStatus statusCode = HttpStatus.resolve(response.getRawStatusCode());
|
||||||
return (statusCode != null && statusCode.series() == HttpStatus.Series.SERVER_ERROR);
|
return (statusCode != null && statusCode.series() == HttpStatus.Series.SERVER_ERROR);
|
||||||
}
|
}
|
||||||
|
|
|
@ -181,7 +181,7 @@ public final class ImageUpload extends Composite {
|
||||||
context.layout();
|
context.layout();
|
||||||
imageUpload.layout();
|
imageUpload.layout();
|
||||||
imageUpload.loadNewImage = false;
|
imageUpload.loadNewImage = false;
|
||||||
imageUpload.errorHandler.accept("");
|
imageUpload.errorHandler.accept(null);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue