Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

[enhance] loginbox widget: customizable login text in congif

  • Loading branch information...
commit 5a677848dcd985a4dbce8a3b39c6155885b845b5 1 parent c1b7a95
@Aqua-Ye Aqua-Ye authored
Showing with 3 additions and 1 deletion.
  1. +3 −1 stdlib/widgets/loginbox/loginbox.opa
View
4 stdlib/widgets/loginbox/loginbox.opa
@@ -24,6 +24,7 @@ import stdlib.widgets.core
import stdlib.widgets.button
type WLoginbox.config = {
+ login_text : string
login_label : option(string)
password_label : option(string)
login_placeholder : option(string)
@@ -74,6 +75,7 @@ WLoginbox =
else void
default_config = {
+ login_text = "Login"
login_label = none
password_label = none
login_placeholder = some("username")
@@ -140,7 +142,7 @@ WLoginbox =
{some=s} -> <label for={password_id}>{s}</label>
{none} -> <></>}
<input id={password_id} type="password" autocomplete="on" name="{password_id}" placeholder="{init_password}" onready={place_holder(password_id,init_password,true)} />
- <input type="submit" value="Login" />
+ <input type="submit" value="{config.login_text}" />
</span>
</form>
;
Please sign in to comment.
Something went wrong with that request. Please try again.