mirror of https://github.com/xwiki-labs/cryptpad
Login or register in profile for anonymous users
This commit is contained in:
parent
2ee38ccc42
commit
78795a3b4d
|
@ -137,7 +137,9 @@
|
|||
button {
|
||||
padding: 5px;
|
||||
color: @corner-white;
|
||||
margin-left: 10px;
|
||||
&:not(:first-child) {
|
||||
margin-left: 10px;
|
||||
}
|
||||
outline: none;
|
||||
text-transform: uppercase;
|
||||
border: 1px solid @corner-white;
|
||||
|
|
|
@ -570,6 +570,29 @@ define([
|
|||
return;
|
||||
}
|
||||
|
||||
if (!common.isLoggedIn()) {
|
||||
var login = h('button.cp-corner-primary', Messages.login_login);
|
||||
var register = h('button.cp-corner-primary', Messages.login_register);
|
||||
var cancel = h('button.cp-corner-cancel', Messages.cancel);
|
||||
var actions = h('div', [cancel, register, login]);
|
||||
var modal = UI.cornerPopup(Messages.profile_login || "You need to log in to add this user to your contacts", actions, '', {alt: true}); // XXX
|
||||
$(register).click(function () {
|
||||
common.setLoginRedirect(function () {
|
||||
common.gotoURL('/register/');
|
||||
});
|
||||
modal.delete();
|
||||
});
|
||||
$(login).click(function () {
|
||||
common.setLoginRedirect(function () {
|
||||
common.gotoURL('/login/');
|
||||
});
|
||||
modal.delete();
|
||||
});
|
||||
$(cancel).click(function () {
|
||||
modal.delete();
|
||||
});
|
||||
}
|
||||
|
||||
var listmapConfig = {
|
||||
data: {},
|
||||
common: common,
|
||||
|
|
Loading…
Reference in New Issue