Merge branch 'staging' into admin-network-pane
commit
5b19051091
|
@ -437,4 +437,4 @@
|
|||
@cp_form-poll-yes: fade(@cryptpad_color_green, 25%);
|
||||
@cp_form-poll-maybe: @cryptpad_color_grey_700;
|
||||
@cp_form-poll-yes-color: @cryptpad_color_green;
|
||||
@cp_form-invalid: @cryptpad_color_red;
|
||||
@cp_form-invalid: @cryptpad_color_light_red;
|
||||
|
|
|
@ -197,9 +197,6 @@
|
|||
}
|
||||
}
|
||||
|
||||
.cp-form-page + .cp-form-send-container {
|
||||
margin-top: 10px;
|
||||
}
|
||||
.cp-form-send-container {
|
||||
text-align: center;
|
||||
margin: 50px auto 100px auto;
|
||||
|
@ -215,8 +212,15 @@
|
|||
}
|
||||
li {
|
||||
text-align: left;
|
||||
a {
|
||||
color: @cryptpad_color_link;
|
||||
}
|
||||
}
|
||||
}
|
||||
.cp-form-anon-answer {
|
||||
text-align: center;
|
||||
margin: 20px 0 30px 0;
|
||||
}
|
||||
}
|
||||
|
||||
.cp-form-page-container {
|
||||
|
@ -293,7 +297,7 @@
|
|||
justify-content: space-between;
|
||||
}
|
||||
input:invalid {
|
||||
border: 2px solid @cp_form-invalid;
|
||||
border: 2px solid @cryptpad_color_red;
|
||||
color: @cp_form-invalid;
|
||||
}
|
||||
media-tag {
|
||||
|
@ -554,6 +558,9 @@
|
|||
& > div {
|
||||
display: flex;
|
||||
}
|
||||
.cp-poll-total {
|
||||
display: flex;
|
||||
}
|
||||
.cp-form-poll-body {
|
||||
flex-flow: column;
|
||||
max-height: 225px;
|
||||
|
@ -642,6 +649,9 @@
|
|||
}
|
||||
}
|
||||
}
|
||||
.cp-poll-total {
|
||||
flex-flow: column;
|
||||
}
|
||||
.cp-poll-cell:not(.cp-poll-switch) {
|
||||
&:first-child {
|
||||
width: 100px;
|
||||
|
|
|
@ -1909,7 +1909,7 @@ define([
|
|||
|
||||
return h('div.cp-form-send-container', [
|
||||
invalid,
|
||||
cbox ? h('div', cbox) : undefined,
|
||||
cbox ? h('div.cp-form-anon-answer', cbox) : undefined,
|
||||
send, reset
|
||||
]);
|
||||
};
|
||||
|
@ -2512,6 +2512,16 @@ define([
|
|||
}
|
||||
};
|
||||
|
||||
var showAnonBlockedAlert = function () {
|
||||
var content = UI.setHTML(h('span.cp-anon-blocked-msg'), Messages.form_anonymous_blocked);
|
||||
$(content).find('a').click(function (ev) {
|
||||
ev.preventDefault();
|
||||
var href = ($(this).attr('href') || '').replace(/\//g, '');
|
||||
APP.common.setLoginRedirect(href || 'login');
|
||||
});
|
||||
UI.alert(content);
|
||||
};
|
||||
|
||||
framework.onReady(function () {
|
||||
var priv = metadataMgr.getPrivateData();
|
||||
|
||||
|
@ -2581,7 +2591,7 @@ define([
|
|||
|
||||
var loggedIn = framework._.sfCommon.isLoggedIn();
|
||||
if (!loggedIn && !content.answers.anonymous) {
|
||||
UI.alert(Messages.form_anonymous_blocked);
|
||||
showAnonBlockedAlert();
|
||||
}
|
||||
|
||||
// If the results are public and there is at least one doodle, fetch the results now
|
||||
|
|
Loading…
Reference in New Issue