Documentation ¶
Index ¶
- Constants
- Variables
- func New(pb *presets.Builder) *login.Builder
- type ViewCommon
- func (vc *ViewCommon) ErrNotice(msg string) HTMLComponent
- func (vc *ViewCommon) ErrorBody(msg string) HTMLComponent
- func (vc *ViewCommon) FormSubmitBtn(label string) *v.VBtnBuilder
- func (vc *ViewCommon) InfoNotice(msg string) HTMLComponent
- func (vc *ViewCommon) InjectRecaptchaAssets(ctx *web.EventContext, formID string, tokenFieldID string)
- func (vc *ViewCommon) InjectZxcvbn(ctx *web.EventContext)
- func (vc *ViewCommon) Input(id string, placeholder string, val string) *v.VTextFieldBuilder
- func (vc *ViewCommon) Notice(vh *login.ViewHelper, msgr *login.Messages, w http.ResponseWriter, ...) HTMLComponent
- func (vc *ViewCommon) PasswordInput(id string, placeholder string, val string, canReveal bool) *v.VTextFieldBuilder
- func (vc *ViewCommon) PasswordInputWithStrengthMeter(in *v.VTextFieldBuilder, id string, val string) HTMLComponent
- func (vc *ViewCommon) WarnNotice(msg string) HTMLComponent
Constants ¶
View Source
const (
OpenChangePasswordDialogEvent = "login_openChangePasswordDialog"
)
Variables ¶
View Source
var DefaultViewCommon = &ViewCommon{
WrapperClass: "d-flex pt-16 flex-column mx-auto",
WrapperStyle: "max-width: 28rem;",
TitleClass: "text-h5 mb-6 font-weight-bold",
LabelClass: "d-block mb-1 grey--text text--darken-2 text-sm-body-2",
}
Functions ¶
Types ¶
type ViewCommon ¶
type ViewCommon struct { WrapperClass string WrapperStyle string TitleClass string LabelClass string }
func (*ViewCommon) ErrNotice ¶
func (vc *ViewCommon) ErrNotice(msg string) HTMLComponent
func (*ViewCommon) ErrorBody ¶
func (vc *ViewCommon) ErrorBody(msg string) HTMLComponent
func (*ViewCommon) FormSubmitBtn ¶
func (vc *ViewCommon) FormSubmitBtn( label string, ) *v.VBtnBuilder
func (*ViewCommon) InfoNotice ¶
func (vc *ViewCommon) InfoNotice(msg string) HTMLComponent
func (*ViewCommon) InjectRecaptchaAssets ¶
func (vc *ViewCommon) InjectRecaptchaAssets(ctx *web.EventContext, formID string, tokenFieldID string)
requirements: - submit button
- add class `g-recaptcha`
- add attr `data-sitekey=<key>`
- add attr `data-callback=onSubmit`
- add token field like `Input("token").Id("token").Type("hidden")`
func (*ViewCommon) InjectZxcvbn ¶
func (vc *ViewCommon) InjectZxcvbn(ctx *web.EventContext)
func (*ViewCommon) Input ¶
func (vc *ViewCommon) Input( id string, placeholder string, val string, ) *v.VTextFieldBuilder
func (*ViewCommon) Notice ¶
func (vc *ViewCommon) Notice(vh *login.ViewHelper, msgr *login.Messages, w http.ResponseWriter, r *http.Request) HTMLComponent
func (*ViewCommon) PasswordInput ¶
func (vc *ViewCommon) PasswordInput( id string, placeholder string, val string, canReveal bool, ) *v.VTextFieldBuilder
func (*ViewCommon) PasswordInputWithStrengthMeter ¶
func (vc *ViewCommon) PasswordInputWithStrengthMeter(in *v.VTextFieldBuilder, id string, val string) HTMLComponent
need to import zxcvbn.js
func (*ViewCommon) WarnNotice ¶
func (vc *ViewCommon) WarnNotice(msg string) HTMLComponent
Click to show internal directories.
Click to hide internal directories.