@(js: String => String, signupForm: Form[User])(implicit request: play.api.mvc.Request[AnyContent]) @import helper._ @import helper.twitterBootstrap._ @title = { Sign Up Or edit an existing user } @main(Html("Sign Up"), nav = "signup") { @helper.form(action = routes.SignUp.submit, args = 'id -> "signupForm") {
Account informations @inputText( signupForm("username"), '_label -> "Username", '_help -> "Please choose a valid username.", '_error -> signupForm.globalError ) @inputText( signupForm("email"), '_label -> "Email", '_help -> "Enter a valid email address." ) @inputPassword( signupForm("password.main"), '_label -> "Password", '_help -> "A password must be at least 6 characters. " ) @inputPassword( signupForm("password.confirm"), '_label -> "Repeat password", '_help -> "Please repeat your password again.", '_error -> signupForm.error("password") )
Contact informations @select( signupForm("profile.country"), options = options(Countries.list), '_default -> "--- Choose a country ---", '_label -> "Country", '_error -> signupForm("profile.country").error.map(_.withMessage("Please select your country")) ) @textarea( signupForm("profile.address"), '_label -> "Address", 'cols -> 50 ) @inputText( signupForm("profile.age"), '_label -> "Age", 'class -> "mini", '_showConstraints -> false )
@checkbox( signupForm("accept"), '_label -> None, '_text -> "You agree to the Terms and Conditions", '_showConstraints -> false )
Cancel
} }