feat: add terms on register and register org (#699)

* feat: add terms on register and register org

* feat: add terms on register and register org

* update form_submit.js to handle checkboxes correctly

* feat: free tier on org reg

Co-authored-by: Livio Amstutz <[email protected]>
This commit is contained in:
Fabi
2020-09-07 14:52:49 +02:00
committed by GitHub
co-authored by Livio Amstutz
parent cca92874ab
commit 4bc1eff373
16 changed files with 196 additions and 40 deletions
+9 -10
View File
@@ -1,9 +1,8 @@
package handler
import (
"net/http"
"golang.org/x/text/language"
"net/http"
"github.com/caos/zitadel/internal/auth_request/model"
caos_errs "github.com/caos/zitadel/internal/errors"
@@ -18,13 +17,14 @@ const (
)
type registerFormData struct {
Email string `schema:"email"`
Firstname string `schema:"firstname"`
Lastname string `schema:"lastname"`
Language string `schema:"language"`
Gender int32 `schema:"gender"`
Password string `schema:"register-password"`
Password2 string `schema:"register-password-confirmation"`
Email string `schema:"email"`
Firstname string `schema:"firstname"`
Lastname string `schema:"lastname"`
Language string `schema:"language"`
Gender int32 `schema:"gender"`
Password string `schema:"register-password"`
Password2 string `schema:"register-password-confirmation"`
TermsConfirm bool `schema:"terms-confirm"`
}
type registerData struct {
@@ -94,7 +94,6 @@ func (l *Login) renderRegister(w http.ResponseWriter, r *http.Request, authReque
if formData.Language == "" {
formData.Language = l.renderer.Lang(r).String()
}
data := registerData{
baseData: l.getBaseData(r, authRequest, "Register", errType, errMessage),
registerFormData: *formData,