@@ -1,7 +1,6 @@ | |||||
context('Navigation', () => { | context('Navigation', () => { | ||||
before(() => { | before(() => { | ||||
cy.login(); | cy.login(); | ||||
cy.visit('/app/website'); | |||||
}); | }); | ||||
it('Navigate to route with hash in document name', () => { | it('Navigate to route with hash in document name', () => { | ||||
cy.insert_doc('ToDo', {'__newname': 'ABC#123', 'description': 'Test this', 'ignore_duplicate': true}); | cy.insert_doc('ToDo', {'__newname': 'ABC#123', 'description': 'Test this', 'ignore_duplicate': true}); | ||||
@@ -11,4 +10,15 @@ context('Navigation', () => { | |||||
cy.go('back'); | cy.go('back'); | ||||
cy.title().should('eq', 'Website'); | cy.title().should('eq', 'Website'); | ||||
}); | }); | ||||
it.only('Navigate to previous page after login', () => { | |||||
cy.visit('/app/todo'); | |||||
cy.request('/api/method/logout'); | |||||
cy.reload(); | |||||
cy.get('.btn-primary').contains('Login').click(); | |||||
cy.location('pathname').should('eq', '/login'); | |||||
cy.login(); | |||||
cy.visit('/app'); | |||||
cy.location('pathname').should('eq', '/app/todo'); | |||||
}); | |||||
}); | }); |
@@ -1,3 +1,7 @@ | |||||
html, body { | |||||
height: 100%; | |||||
} | |||||
/* checkbox */ | /* checkbox */ | ||||
.checkbox { | .checkbox { | ||||
label { | label { | ||||
@@ -1,5 +1,4 @@ | |||||
html { | html { | ||||
height: 100%; | |||||
background-color: var(--bg-color); | background-color: var(--bg-color); | ||||
} | } | ||||
@@ -1,9 +1,4 @@ | |||||
html { | |||||
min-height: 100%; | |||||
} | |||||
body { | body { | ||||
height: 100%; | |||||
// The html and body elements cannot have any padding or margin. | // The html and body elements cannot have any padding or margin. | ||||
margin: 0px; | margin: 0px; | ||||
padding: 0px !important; | padding: 0px !important; | ||||
@@ -4,12 +4,17 @@ body { | |||||
background-color: var(--bg-light-gray); | background-color: var(--bg-light-gray); | ||||
} | } | ||||
.for-login, | |||||
.for-forgot, | .for-forgot, | ||||
.for-signup, | .for-signup, | ||||
.for-email-login { | .for-email-login { | ||||
display: none; | display: none; | ||||
margin: 70px 0; | |||||
} | |||||
.for-login, | |||||
.for-forgot, | |||||
.for-signup, | |||||
.for-email-login { | |||||
padding: max(15vh, 70px) 0; | |||||
@include media-breakpoint-up(sm) { | @include media-breakpoint-up(sm) { | ||||
.page-card { | .page-card { | ||||
@@ -85,4 +85,15 @@ | |||||
.form-control { | .form-control { | ||||
border: none; | border: none; | ||||
font-size: var(--text-md); | font-size: var(--text-md); | ||||
} | |||||
.footer-logo-extension { | |||||
.input-group { | |||||
justify-content: flex-end; | |||||
#footer-subscribe-email, #footer-subscribe-button { | |||||
max-width: 300px; | |||||
border: 1px solid var(--dark-border-color); | |||||
box-shadow: none; | |||||
} | |||||
} | |||||
} | } |
@@ -3,6 +3,7 @@ | |||||
.web-form-wrapper { | .web-form-wrapper { | ||||
.form-control { | .form-control { | ||||
color: var(--text-color); | color: var(--text-color); | ||||
background-color: var(--control-bg); | |||||
} | } | ||||
.form-section { | .form-section { | ||||
@@ -1,13 +1,13 @@ | |||||
<div class="footer-logo-extension"> | <div class="footer-logo-extension"> | ||||
<div class="row"> | <div class="row"> | ||||
<div class="text-left col-6"> | |||||
<div class="text-left col-md-6"> | |||||
{%- if footer_logo -%} | {%- if footer_logo -%} | ||||
<div> | <div> | ||||
<img src="{{ footer_logo }}" alt="Footer Logo" class="footer-logo"> | <img src="{{ footer_logo }}" alt="Footer Logo" class="footer-logo"> | ||||
</div> | </div> | ||||
{%- endif -%} | {%- endif -%} | ||||
</div> | </div> | ||||
<div class="text-right col-6"> | |||||
<div class="text-right col-md-6"> | |||||
{% block extension %} | {% block extension %} | ||||
{% include "templates/includes/footer/footer_extension.html" %} | {% include "templates/includes/footer/footer_extension.html" %} | ||||
{% endblock %} | {% endblock %} | ||||
@@ -154,11 +154,11 @@ | |||||
</div> | </div> | ||||
</form> | </form> | ||||
{%- else -%} | {%- else -%} | ||||
<div class='page-card-head'> | |||||
<div class='page-card-head mb-2'> | |||||
<span class='indicator gray'>{{_("Signup Disabled")}}</span> | <span class='indicator gray'>{{_("Signup Disabled")}}</span> | ||||
<p class="text-muted text-normal sign-up-message mt-1 mb-8">{{_("Signups have been disabled for this website.")}}</p> | |||||
<div><a href='/' class='btn btn-primary btn-md'>{{ _("Home") }}</a></div> | |||||
</div> | </div> | ||||
<p>{{_("Signups have been disabled for this website.")}}</p> | |||||
<div><a href='/' class='btn btn-primary btn-sm'>{{ _("Home") }}</a></div> | |||||
{%- endif -%} | {%- endif -%} | ||||
</div> | </div> | ||||
@@ -39,8 +39,8 @@ html, body { | |||||
{% endif %} | {% endif %} | ||||
<script> | <script> | ||||
frappe.ready(function() { | frappe.ready(function() { | ||||
if(window.location.hash) { | |||||
localStorage.setItem('session_last_route', window.location.hash.substr(1)); | |||||
if (window.location.hash || window.location.href.includes('/app')) { | |||||
localStorage.setItem('session_last_route', window.location.pathname + window.location.hash + window.location.search); | |||||
} | } | ||||
$('.btn-primary').focus(); | $('.btn-primary').focus(); | ||||