Browse Source

Merge pull request #14199 from surajshetty3416/fix-login-issues

version-14
Suraj Shetty 3 years ago
committed by GitHub
parent
commit
ef44f56b93
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
10 changed files with 41 additions and 16 deletions
  1. +11
    -1
      cypress/integration/navigation.js
  2. +4
    -0
      frappe/public/scss/common/global.scss
  3. +0
    -1
      frappe/public/scss/desk/global.scss
  4. +0
    -5
      frappe/public/scss/desk/mobile.scss
  5. +7
    -2
      frappe/public/scss/login.bundle.scss
  6. +11
    -0
      frappe/public/scss/website/footer.scss
  7. +1
    -0
      frappe/public/scss/website/web_form.scss
  8. +2
    -2
      frappe/templates/includes/footer/footer_logo_extension.html
  9. +3
    -3
      frappe/www/login.html
  10. +2
    -2
      frappe/www/message.html

+ 11
- 1
cypress/integration/navigation.js View File

@@ -1,7 +1,6 @@
context('Navigation', () => {
before(() => {
cy.login();
cy.visit('/app/website');
});
it('Navigate to route with hash in document name', () => {
cy.insert_doc('ToDo', {'__newname': 'ABC#123', 'description': 'Test this', 'ignore_duplicate': true});
@@ -11,4 +10,15 @@ context('Navigation', () => {
cy.go('back');
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');
});
});

+ 4
- 0
frappe/public/scss/common/global.scss View File

@@ -1,3 +1,7 @@
html, body {
height: 100%;
}

/* checkbox */
.checkbox {
label {


+ 0
- 1
frappe/public/scss/desk/global.scss View File

@@ -1,5 +1,4 @@
html {
height: 100%;
background-color: var(--bg-color);
}



+ 0
- 5
frappe/public/scss/desk/mobile.scss View File

@@ -1,9 +1,4 @@
html {
min-height: 100%;
}

body {
height: 100%;
// The html and body elements cannot have any padding or margin.
margin: 0px;
padding: 0px !important;


+ 7
- 2
frappe/public/scss/login.bundle.scss View File

@@ -4,12 +4,17 @@ body {
background-color: var(--bg-light-gray);
}

.for-login,
.for-forgot,
.for-signup,
.for-email-login {
display: none;
margin: 70px 0;
}

.for-login,
.for-forgot,
.for-signup,
.for-email-login {
padding: max(15vh, 70px) 0;

@include media-breakpoint-up(sm) {
.page-card {


+ 11
- 0
frappe/public/scss/website/footer.scss View File

@@ -85,4 +85,15 @@
.form-control {
border: none;
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;
}
}
}

+ 1
- 0
frappe/public/scss/website/web_form.scss View File

@@ -3,6 +3,7 @@
.web-form-wrapper {
.form-control {
color: var(--text-color);
background-color: var(--control-bg);
}

.form-section {


+ 2
- 2
frappe/templates/includes/footer/footer_logo_extension.html View File

@@ -1,13 +1,13 @@
<div class="footer-logo-extension">
<div class="row">
<div class="text-left col-6">
<div class="text-left col-md-6">
{%- if footer_logo -%}
<div>
<img src="{{ footer_logo }}" alt="Footer Logo" class="footer-logo">
</div>
{%- endif -%}
</div>
<div class="text-right col-6">
<div class="text-right col-md-6">
{% block extension %}
{% include "templates/includes/footer/footer_extension.html" %}
{% endblock %}


+ 3
- 3
frappe/www/login.html View File

@@ -154,11 +154,11 @@
</div>
</form>
{%- else -%}
<div class='page-card-head'>
<div class='page-card-head mb-2'>
<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>
<p>{{_("Signups have been disabled for this website.")}}</p>
<div><a href='/' class='btn btn-primary btn-sm'>{{ _("Home") }}</a></div>
{%- endif -%}
</div>



+ 2
- 2
frappe/www/message.html View File

@@ -39,8 +39,8 @@ html, body {
{% endif %}
<script>
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();


Loading…
Cancel
Save