From b3c18b99f0648241aa2946bd02bf64e64e0c08b7 Mon Sep 17 00:00:00 2001 From: Wolfgang Knopki <wolfgang.knopki@hft-stuttgart.de> Date: Fri, 6 Dec 2019 14:58:30 +0100 Subject: [PATCH] changed redirect paths relative to account in virews --- views/forgotPwd.pug | 8 ++++++-- views/home.pug | 6 +++--- views/profile.pug | 10 +++++----- views/reset.pug | 4 ++-- views/security.pug | 43 ++++++++++++++++++++----------------------- views/services.pug | 4 ++-- 6 files changed, 38 insertions(+), 37 deletions(-) diff --git a/views/forgotPwd.pug b/views/forgotPwd.pug index 58d66001..0a50e908 100644 --- a/views/forgotPwd.pug +++ b/views/forgotPwd.pug @@ -40,7 +40,7 @@ html(lang="en") for error, i in errors div.alert.alert-danger.alert-dismissible.fade.show #{ error } a(class="close", href="#", data-dismiss="alert", aria-label="close") × - form#forgotForm(class="form-signin", method="POST", action="/forgotPwd") + form#forgotForm(class="form-signin", method="POST", action="/account/forgotPwd") img(src="https://transfer.hft-stuttgart.de/images/demo/m4lab_logo.jpg", class="img-responsive center-block", width="185", height="192") div(class="form-row") input#inputEmail(name="inputEmail", type="email", class="form-control", placeholder="Email" required) @@ -53,4 +53,8 @@ html(lang="en") // Bootstrap script(src="https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/js/bootstrap.min.js" integrity="sha384-JjSmVgyd0p3pXB1rRibZUAYoIIy6OrQ6VrjIEaFf/nJGzIxFDsf4x0xIM+B07jRM" crossorigin="anonymous") // M4_LAB - script(src="https://transfer.hft-stuttgart.de/js/headfoot.js") \ No newline at end of file +<<<<<<< 45bbab2b386c98e5d2ea481b59357ab41b28bd9b +======= + script(src="/account/js/account.js") +>>>>>>> changed redirect paths relative to account in virews + script(src="https://transfer.hft-stuttgart.de/js/headfoot.js") diff --git a/views/home.pug b/views/home.pug index 2c704c1a..285666ec 100644 --- a/views/home.pug +++ b/views/home.pug @@ -3,10 +3,10 @@ extends layout block content if user !== null h1 Hello, #{user.firstName} - a(href="/profile") Profile + a(href="/account/profile") Profile br - a(href="/logout") Logout + a(href="/account/logout") Logout else h1 Welcome br - a(href="/login") Login + a(href="/account/login") Login diff --git a/views/profile.pug b/views/profile.pug index 3d329f52..e4034308 100644 --- a/views/profile.pug +++ b/views/profile.pug @@ -35,9 +35,9 @@ html(lang="en") span #{user.firstname} #{user.lastname} div(class="nav flex-column nav-pills", id="v-pills-tab", role="tablist", aria-orientation="vertical") a(class="nav-link" href="#" aria-selected="true") Profile - a(class="nav-link" href="/security" aria-selected="false") Security - a(class="nav-link" href="/services" aria-selected="false") Services - div(class="col-sm-8") + a(class="nav-link" href="/account/security" aria-selected="false") Security + a(class="nav-link" href="/account/services" aria-selected="false") Services + div(class="col-sm-9") if successes for success in successes div.alert.alert-success.alert-dismissible #{ success } @@ -87,5 +87,5 @@ html(lang="en") // Bootstrap script(src="https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/js/bootstrap.min.js" integrity="sha384-JjSmVgyd0p3pXB1rRibZUAYoIIy6OrQ6VrjIEaFf/nJGzIxFDsf4x0xIM+B07jRM" crossorigin="anonymous") // M4_LAB - //script(src="/js/account.js") - script(src="https://transfer.hft-stuttgart.de/js/headfoot.js") \ No newline at end of file + script(src="/account//js/account.js") + script(src="https://transfer.hft-stuttgart.de/js/headfoot.js") diff --git a/views/reset.pug b/views/reset.pug index 774f9215..1dcb0528 100644 --- a/views/reset.pug +++ b/views/reset.pug @@ -56,6 +56,6 @@ html(lang="en") // Bootstrap script(src="https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/js/bootstrap.min.js" integrity="sha384-JjSmVgyd0p3pXB1rRibZUAYoIIy6OrQ6VrjIEaFf/nJGzIxFDsf4x0xIM+B07jRM" crossorigin="anonymous") // M4_LAB - script(src="/js/account.js") - script(src="/js/generalFunction.js") + script(src="/account/js/account.js") + script(src="/account/js/generalFunction.js") script(src="https://transfer.hft-stuttgart.de/js/headfoot.js") \ No newline at end of file diff --git a/views/security.pug b/views/security.pug index 0bdea4cf..cd8f101a 100644 --- a/views/security.pug +++ b/views/security.pug @@ -37,9 +37,9 @@ html(lang="en") h5 span #{user.firstName} #{user.lastName} div(class="nav flex-column nav-pills", id="v-pills-tab", role="tablist", aria-orientation="vertical") - a(class="nav-link" href="/profile" aria-selected="true") Profile + a(class="nav-link" href="/account/profile" aria-selected="true") Profile a(class="nav-link" href="#" aria-selected="false") Security - a(class="nav-link" href="/services" aria-selected="false") Services + a(class="nav-link" href="/account/services" aria-selected="false") Services div(class="col-sm-9") if successes for success in successes @@ -49,24 +49,21 @@ html(lang="en") for error, i in errors div.alert.alert-danger.alert-dismissible.fade.show #{ error } a(class="close", href="#", data-dismiss="alert", aria-label="close") × - form(class="needs-validation", method="post", action="/changePwd" novalidate) - div(class="form-row") - div(class='form-group col-md-6') - label(for="currPwd") Current Password - input(id="inputCurrPwd", name="inputCurrPwd", type="password", class="form-control" required) - div(class="invalid-feedback") Please fill in this field. - div(class="form-row") - div(class='form-group col-md-6') - label(for="newPwd") New Password - input#inputNewPwd(name="inputNewPwd", type="password", class="form-control" required) - span#recommendation(class='warning') - div(class="invalid-feedback") Please fill in this field. - div(class="form-row") - div(class='form-group col-md-6') - label(for="confirm") Confirm New Password - input#inputConfirm(name="inputConfirm", type="password", class="form-control" required) - span#message(class='warning') - div(class="invalid-feedback") Please fill in this field. + form(class="needs-validation", method="post", action="/account/changePwd" novalidate) + div(class="form-group row") + label(for="currPwd") Current Password + input(id="inputCurrPwd", name="inputCurrPwd", type="password", class="form-control" required) + div(class="invalid-feedback") Please fill in this field. + div(class="form-group row") + label(for="newPwd") New Password + input#inputNewPwd(name="inputNewPwd", type="password", class="form-control" required) + span#recommendation + div(class="invalid-feedback") Please fill in this field. + div(class="form-group row") + label(for="confirm") Confirm New Password + input#inputConfirm(name="inputConfirm", type="password", class="form-control" required) + span#message + div(class="invalid-feedback") Please fill in this field. input#updateBtn(type="submit", class="btn btn-primary", value="Update Password" disabled) // jQuery @@ -75,8 +72,8 @@ html(lang="en") // Bootstrap script(src="https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/js/bootstrap.min.js" integrity="sha384-JjSmVgyd0p3pXB1rRibZUAYoIIy6OrQ6VrjIEaFf/nJGzIxFDsf4x0xIM+B07jRM" crossorigin="anonymous") // M4_LAB - script(src="/js/generalFunction.js") - script(src="/js/security.js") + script(src="/account/js/account.js") + script(src="/account/js/generalFunction.js") script(src="https://transfer.hft-stuttgart.de/js/headfoot.js") script. // check input fields @@ -94,4 +91,4 @@ html(lang="en") form.classList.add('was-validated'); }, false); }); - }, false); \ No newline at end of file + }, false); diff --git a/views/services.pug b/views/services.pug index a751c928..fdd32a31 100644 --- a/views/services.pug +++ b/views/services.pug @@ -34,8 +34,8 @@ html(lang="en") h5 span #{user.firstName} #{user.lastName} div(class="nav flex-column nav-pills", id="v-pills-tab", role="tablist", aria-orientation="vertical") - a(class="nav-link" href="/profile" aria-selected="true") Profile - a(class="nav-link" href="/security" aria-selected="false") Security + a(class="nav-link" href="/account/profile" aria-selected="true") Profile + a(class="nav-link" href="/account/security" aria-selected="false") Security a(class="nav-link" href="#" aria-selected="false") Services div(class="col-sm-9") if successes -- GitLab