diff --git a/src/main/java/automark/gui/GUI.java b/src/main/java/automark/gui/GUI.java index e2dd598..d47d76b 100644 --- a/src/main/java/automark/gui/GUI.java +++ b/src/main/java/automark/gui/GUI.java @@ -197,6 +197,8 @@ public String getDescription() { bodyProps.remove("moodleUsernameEnabled"); bodyProps.remove("moodlePasswordEnabled"); + bodyProps.remove("smtpUsernameEnabled"); + bodyProps.remove("smtpPasswordEnabled"); bodyProps.remove("formIsValid"); Set nullKeys = new HashSet<>(); diff --git a/src/main/resources/automark/gui/components/ConfigEditor.js b/src/main/resources/automark/gui/components/ConfigEditor.js index ae6927b..3b06975 100644 --- a/src/main/resources/automark/gui/components/ConfigEditor.js +++ b/src/main/resources/automark/gui/components/ConfigEditor.js @@ -29,6 +29,16 @@ export default class ConfigEditor extends Component { moodleUsername: null, moodlePasswordEnabled: false, moodlePassword: null, + emailStageEnabled: "true", + smtpHost: null, + smtpPort: "465", + smtpUsernameEnabled: true, + smtpUsername: null, + smtpPasswordEnabled: true, + smtpPassword: null, + smtpProtocol: "SMTPS", + smtpFromName: null, + smtpFromAddress: null, path: null, formIsValid: false, } @@ -140,6 +150,7 @@ export default class ConfigEditor extends Component { this.setState({ ...this.state, ...body, + emailStageEnabled: (`${body.emailStageEnabled}`).toLowerCase() === "true", }) } } @@ -175,6 +186,16 @@ export default class ConfigEditor extends Component { moodleUsername, moodlePasswordEnabled, moodlePassword, + emailStageEnabled, + smtpHost, + smtpPort, + smtpUsernameEnabled, + smtpUsername, + smtpPasswordEnabled, + smtpPassword, + smtpProtocol, + smtpFromName, + smtpFromAddress, path, formIsValid, } = this.state @@ -327,6 +348,94 @@ export default class ConfigEditor extends Component { onInput="${this.onInputChange.bind(this)}" required="${moodlePasswordEnabled}"/> `} + +
+ + +
+ + + + + + + +
+ + +
+ + +
+ + +
+ + + + + + +