Commit 548552a8 by Anton Sudak

Use play-bootstrap for bootstrap4

parent 6fb40798
Pipeline #12520 passed with stages
in 20 minutes 32 seconds
......@@ -86,7 +86,7 @@ object Settings {
"io.vavr" % "vavr" % versions.vavr,
"org.mapstruct" % "mapstruct-jdk8" % versions.mapStruct,
"org.mapstruct" % "mapstruct-processor" % versions.mapStruct,
"com.adrianhurt" %% "play-bootstrap" % "1.2-P26-B3",
"com.adrianhurt" %% "play-bootstrap" % "1.4-P26-B4",
"org.springframework.data" % "spring-data-commons" % "2.0.10.RELEASE",
"org.mockito" % "mockito-all" % "1.9.5" % Test
))
......
......@@ -13,7 +13,7 @@
<div class="col-md-3">
@views.html.account.partials.sidebar.render(user)
</div>
<div class="col-md-6">
<div class="col-md-9">
<h3>
<i class="glyphicon glyphicon-user"></i>
@Messages("account.dashboard.details.profile.title")
......
@import ch.insign.cms.models.StandalonePage
@import ch.insign.cms.views.html.main
@import play.data.Form
@import b3.vertical.fieldConstructor
@import data.form.EditPasswordForm
@import party.User
@(page: StandalonePage, form: Form[EditPasswordForm], user: User)
@implicitFieldConstructor = @{ b4.vertical.fieldConstructor() }
@main(page) {
<div class="container">
......@@ -13,7 +13,7 @@
<div class="col-md-3">
@views.html.account.partials.sidebar.render(user)
</div>
<div class="col-md-6">
<div class="col-md-9">
<div class="section-header">
<h3 class="section-title">
<i class="glyphicon glyphicon-lock"></i> @Messages("account.dashboard.editPassword")
......@@ -22,20 +22,20 @@
</div>
@helper.form(controller.routes.AccountController.doEditPassword) {
@b3.password(
@b4.password(
form("oldPassword"),
'_label -> Messages("account.dashboard.editPassword.old"),
'_required -> true
)
@b3.password(
@b4.password(
form("password"),
'_label -> Messages("user.register.password"),
'_required -> true,
'_help -> Messages("auth.login.password.pattern.help")
)
@b3.password(
@b4.password(
form("passwordRepeat"),
'_label -> Messages("user.register.passwordRepeat"),
'_required -> true
......
......@@ -2,7 +2,6 @@
@import ch.insign.cms.views.html.main
@import party.User
@import play.data.Form
@import b3.vertical.fieldConstructor
@import ch.insign.cms.models.CMS
@import data.form.UserProfileForm
@import ch.insign.playauth.party.ISOGender
......@@ -11,6 +10,7 @@
@(page: StandalonePage, form: Form[UserProfileForm], user: User)
@implicitFieldConstructor = @{ b4.vertical.fieldConstructor() }
@languages = @{
CMS.getConfig().frontendLanguages().toSeq.map(v => (v, v))
}
......@@ -26,46 +26,46 @@
<div class="col-md-3">
@views.html.account.partials.sidebar.render(user)
</div>
<div class="col-md-6">
<div class="col-md-9">
<div class="section-header">
<h3 class="section-title"> <i class="glyphicon glyphicon-cog"></i> @Messages("account.dashboard.editProfile")</h3>
<div class="spacer spacer-xs"></div>
</div>
@helper.form(controller.routes.AccountController.doEditProfile, 'autocomplete -> "off") {
@b3.radio(
@b4.radio(
form("gender"),
Seq(ISOGender.MALE, ISOGender.FEMALE).map(v => (v.name(), Messages("user.gender." + v.name()))),
'_inline -> true,
'_required -> true
)
@b3.text(
@b4.text(
form("firstName"),
'_label -> Messages("user.register.firstName"),
'_required -> true
)
@b3.text(
@b4.text(
form("lastName"),
'_label -> Messages("user.register.lastName"),
'_required -> true
)
@b3.email(
@b4.email(
form("email"),
'_label -> Messages("user.register.email"),
'_required -> true
)
@b3.tel(
@b4.tel(
form("phone"),
'_label -> Messages("user.register.phone"),
'_maxlength -> "11"
)
@b3.select(
@b4.select(
form("language"),
options = languages,
'_label -> Messages("user.register.language"),
'_default -> Messages("user.register.language.select")
)
@b3.password(
@b4.password(
form("password"),
'_label -> Messages("account.dashboard.editProfile.password.enter"),
'_required -> true,
......
......@@ -4,6 +4,9 @@
@import java.io.File
@(user: User)
@active(call: Call) = {
@if(call.url.equals(request.path)) { active }
}
<div class="profile-sidebar">
<h1>@Messages("account.dashboard.title")</h1>
......@@ -32,9 +35,9 @@
<div class="profile-userpic fileinput-button dz-clickable">
<span class="preview" id="hint" data-hint="@Messages("account.dashboard.image.hint")" data-success="@Messages("account.dashboard.image.success")">
@if(StringUtils.isBlank(user.getImage)){
<img data-dz-thumbnail src="@routes.Assets.versioned("images/avatar.png")" class="img-responsive" alt="" id="dropzoneForUserAvatar">
<img data-dz-thumbnail src="@routes.Assets.versioned("images/avatar.png")" class="img-responsive" id="dropzoneForUserAvatar">
} else{
<img data-dz-thumbnail src="@CMS.getConfig().imageUploadWWWRoot()@File.separator@user.getImage" class="img-responsive" alt="" id="dropzoneForUserAvatar">
<img data-dz-thumbnail src="@CMS.getConfig().imageUploadWWWRoot()@File.separator@user.getImage" class="img-responsive" id="dropzoneForUserAvatar">
}
</span>
</div>
......@@ -64,17 +67,17 @@
</li>
}
<li class="nav-item">
<a href="@controller.routes.AccountController.dashboard" class="nav-link">
<a href="@controller.routes.AccountController.dashboard" class="nav-link @active(controller.routes.AccountController.dashboard)">
<i class="glyphicon glyphicon-user"></i>
@Messages("account.dashboard.overview") </a>
</li>
<li class="nav-item">
<a href="@controller.routes.AccountController.editProfile" class="nav-link">
<a href="@controller.routes.AccountController.editProfile" class="nav-link @active(controller.routes.AccountController.editProfile)">
<i class="glyphicon glyphicon-cog"></i>
@Messages("account.dashboard.editProfile") </a>
</li>
<li class="nav-item">
<a href="@controller.routes.AccountController.editPassword" class="nav-link">
<a href="@controller.routes.AccountController.editPassword" class="nav-link @active(controller.routes.AccountController.editPassword)">
<i class="glyphicon glyphicon-lock"></i>
@Messages("account.dashboard.editPassword") </a>
</li>
......
......@@ -2,65 +2,64 @@
@import data.form.RegisterUserForm
@import ch.insign.cms.views.html.main
@import play.data.Form
@import b3.vertical.fieldConstructor
@import ch.insign.playauth.party.ISOGender
@import ch.insign.cms.models.CMS
@(page: StandalonePage, form: Form[RegisterUserForm])
@implicitFieldConstructor = @{ b4.vertical.fieldConstructor() }
@languages = @{
CMS.getConfig().frontendLanguages().toSeq.map(v => (v, v))
}
@main(page) {
<div class="row section">
<div class="col-md-6 col-md-offset-3">
<div class="container">
<div class="section">
<div class="section-header">
<h3 class="section-title text-center">@Messages("user.register.new.title")</h3>
<div class="spacer spacer-xs"></div>
</div>
@helper.form(controller.routes.UserController.doRegister, 'id -> "registerNewUser", 'autocomplete -> "off") {
@b3.radio(
@b4.radio(
form("gender"),
Seq(ISOGender.MALE, ISOGender.FEMALE).map(v => (v.name(), Messages("user.gender." + v.name()))),
'_inline -> true,
'_required -> true
)
@b3.text(
@b4.text(
form("firstName"),
'_label -> Messages("user.register.firstName"),
'_required -> true
)
@b3.text(
@b4.text(
form("lastName"),
'_label -> Messages("user.register.lastName"),
'_required -> true
)
@b3.email(
@b4.email(
form("email"),
'_label -> Messages("user.register.email"),
'_required -> true
)
@b3.tel(
@b4.tel(
form("phone"),
'_label -> Messages("user.register.phone"),
'_maxlength -> "11"
)
@b3.select(
@b4.select(
form("language"),
options = languages,
'_label -> Messages("user.register.language"),
'_default -> Messages("user.register.language.select")
)
@b3.password(
@b4.password(
form("password"),
'_label -> Messages("user.register.password"),
'_required -> true,
'_help -> Messages("auth.login.password.pattern.help")
)
@b3.password(
@b4.password(
form("passwordRepeat"),
'_label -> Messages("user.register.passwordRepeat"),
'_required -> true,
......@@ -71,14 +70,14 @@
</div>
}
</div>
</div>
<div class="row">
<div class="col-md-8 col-md-offset-2">
<div class="center-block feedback-section">
<div class="spacer spacer-md"></div>
<h2 class="text-center h5">@Html(Messages("user.register.support"))</h2>
<div class="spacer spacer-md"></div>
<div class="row">
<div class="col-md-8 col-md-offset-2">
<div class="center-block feedback-section">
<div class="spacer spacer-md"></div>
<h2 class="text-center h5">@Html(Messages("user.register.support"))</h2>
<div class="spacer spacer-md"></div>
</div>
</div>
</div>
</div>
......
@import ch.insign.cms.models.StandalonePage
@import ch.insign.cms.views.html.main
@import play.data.Form
@import b3.vertical.fieldConstructor
@import ch.insign.cms.forms.MyIdentity
@(page: StandalonePage,form: Form[MyIdentity])
@implicitFieldConstructor = @{ b4.vertical.fieldConstructor() }
@main(page) {
<div class="row section">
<div class="col-md-4 col-md-offset-4">
<div class="container">
<div class="section">
<div class="section-header">
<h3 class="section-title text-center">@Messages("user.password_reset.title")</h3>
<div class="spacer spacer-xs"></div>
......@@ -18,7 +17,7 @@
<div class="panel panel-default">
<div class="panel-body">
@helper.form(controller.routes.UserController.sendResetPasswordConfirmation()) {
@b3.email(
@b4.email(
form("email"),
'_label -> Messages("password.reset.email"),
'_required -> true
......
......@@ -5,37 +5,37 @@
@(page: StandalonePage, resetPasswordForm: Form[ResetPasswordForm])
@implicitFieldConstructor = @{ b3.horizontal.fieldConstructor("col-md-3", "col-md-9") }
@implicitFieldConstructor = @{ b4.horizontal.fieldConstructor("col-md-3", "col-md-9") }
@main(page) {
<h1>@Messages("user.password_reset.confirmation.title")</h1>
@b3.form(controller.routes.UserController.doResetPassword) {
@b4.form(controller.routes.UserController.doResetPassword) {
@if(resetPasswordForm.hasGlobalErrors) {
@b3.static() {
@b4.static() {
<div class="error alert alert-danger">
@Html(resetPasswordForm.globalError.message)
</div>
}
}
@b3.hidden("token", resetPasswordForm("token").value())
@b4.hidden("token", resetPasswordForm("token").value())
@b3.password(
@b4.password(
resetPasswordForm("password"),
'_label -> Messages("user.register.password"),
'_required -> true,
'_help -> Messages("auth.login.password.pattern.help")
)
@b3.password(
@b4.password(
resetPasswordForm("passwordRepeat"),
'_label -> Messages("user.register.passwordRepeat"),
'_required -> true
)
@b3.submit('class -> "btn btn-primary"){
@b4.submit('class -> "btn btn-primary"){
@Messages("reset.password.btn.submit")
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment