mirror of
https://github.com/hrfee/jfa-go.git
synced 2024-12-22 17:10:10 +00:00
include code in invite form instead of getting from url
potentially solves #34?
This commit is contained in:
parent
3c799b8783
commit
a102199d5a
@ -4,6 +4,7 @@
|
|||||||
window.validationStrings = JSON.parse({{ .lang.validationStrings }});
|
window.validationStrings = JSON.parse({{ .lang.validationStrings }});
|
||||||
window.invalidPassword = "{{ .lang.reEnterPasswordInvalid }}";
|
window.invalidPassword = "{{ .lang.reEnterPasswordInvalid }}";
|
||||||
window.URLBase = "{{ .urlBase }}";
|
window.URLBase = "{{ .urlBase }}";
|
||||||
|
window.code = "{{ .code }}";
|
||||||
</script>
|
</script>
|
||||||
<script src="js/form.js" type="module"></script>
|
<script src="js/form.js" type="module"></script>
|
||||||
{{ end }}
|
{{ end }}
|
||||||
|
@ -5,6 +5,7 @@ interface formWindow extends Window {
|
|||||||
validationStrings: pwValStrings;
|
validationStrings: pwValStrings;
|
||||||
invalidPassword: string;
|
invalidPassword: string;
|
||||||
modal: Modal;
|
modal: Modal;
|
||||||
|
code: string;
|
||||||
}
|
}
|
||||||
|
|
||||||
interface pwValString {
|
interface pwValString {
|
||||||
@ -103,7 +104,7 @@ const create = (event: SubmitEvent) => {
|
|||||||
event.preventDefault();
|
event.preventDefault();
|
||||||
toggleLoader(submitSpan);
|
toggleLoader(submitSpan);
|
||||||
let send: sendDTO = {
|
let send: sendDTO = {
|
||||||
code: window.location.href.split('/').pop(),
|
code: window.code,
|
||||||
username: usernameField.value,
|
username: usernameField.value,
|
||||||
email: emailField.value,
|
email: emailField.value,
|
||||||
password: passwordField.value
|
password: passwordField.value
|
||||||
|
1
views.go
1
views.go
@ -56,6 +56,7 @@ func (app *appContext) InviteProxy(gc *gin.Context) {
|
|||||||
"email": email,
|
"email": email,
|
||||||
"username": !app.config.Section("email").Key("no_username").MustBool(false),
|
"username": !app.config.Section("email").Key("no_username").MustBool(false),
|
||||||
"lang": app.storage.lang.Form[lang]["strings"],
|
"lang": app.storage.lang.Form[lang]["strings"],
|
||||||
|
"code": code,
|
||||||
})
|
})
|
||||||
} else {
|
} else {
|
||||||
gcHTML(gc, 404, "invalidCode.html", gin.H{
|
gcHTML(gc, 404, "invalidCode.html", gin.H{
|
||||||
|
Loading…
Reference in New Issue
Block a user