FIX: Clicking on login should show login modal (#177)
* FIX: Clicking on login should show login modal * Add system test that shows the login modal appears
This commit is contained in:
@@ -1,17 +0,0 @@
|
||||
import Component from "@ember/component";
|
||||
import cookie from "discourse/lib/cookie";
|
||||
import DiscourseURL from "discourse/lib/url";
|
||||
import { default as getURL } from "discourse-common/lib/get-url";
|
||||
|
||||
export default Component.extend({
|
||||
classNames: ["login-required", "subscriptions"],
|
||||
actions: {
|
||||
createAccount() {
|
||||
const destinationUrl = window.location.href;
|
||||
const cookiePath = getURL("/");
|
||||
|
||||
cookie("destination_url", destinationUrl, { path: cookiePath });
|
||||
DiscourseURL.redirectTo("/login");
|
||||
},
|
||||
},
|
||||
});
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
<DButton
|
||||
@label="log_in"
|
||||
@action={{this.createAccount}}
|
||||
@action={{route-action "showLogin"}}
|
||||
@icon="user"
|
||||
class="btn btn-primary"
|
||||
class="btn btn-primary login-required subscriptions"
|
||||
/>
|
||||
Reference in New Issue
Block a user