Merge pull request #1690 from cryptpad/formpassword_warning

Form password warning
This commit is contained in:
yflory 2024-12-12 14:01:26 +01:00 committed by GitHub
commit e4fb685c8d
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 19 additions and 7 deletions

View File

@ -135,6 +135,10 @@ define(req, function(AppConfig, Default, Language) {
return text;
}
};
Messages.form_passwordWarning = 'For Forms, you can only set the password during creation. It cannot be changed later.' // XXX
Messages.form_passwordWarning = 'Please note that a Form password can only be set now at creation time and cannot be changed later.' // XXX
Messages.fm_restoreMultipleDialog = "Are you sure you want to restore {0} files and/or folders to their previous locations?"; // XXX: new translation key

View File

@ -69,7 +69,7 @@
outline: none;
width: 700px;
max-width: 90vw;
height: 500px;
//height: 500px;
border-radius: @variables_radius_L;
max-height: ~"calc(100vh - 20px)";
margin: 0px;
@ -85,6 +85,7 @@
}
.cp-creation-checkboxes {
min-width: 300px;
flex-flow: column;
align-items: baseline !important;
max-height: 150px;
@ -156,11 +157,10 @@
flex: 1 0 auto;
justify-content: space-around;
& > div {
width: 300px;
//width: 300px;
max-width: 100%;
display: flex;
align-items: center;
flex-wrap: wrap;
font-size: 16px;
//margin: 10px 0;
min-height: 28px;
@ -293,6 +293,11 @@
}
}
}
.cp-creation-password-warning {
font-size: 0.75em;
line-height: 120%;
margin: 0.4rem 1rem calc(0.4rem + 6px);
}
.cp-creation-settings {
button {
margin: 0;
@ -421,7 +426,6 @@
#cp-creation-form {
& > div {
width: 95%;
margin: 0 auto;
}
.cp-creation-expire {
&.active {
@ -431,7 +435,6 @@
.cp-creation-slider {
flex: none;
order: 10;
width: 100%;
}
}
}
@ -440,7 +443,7 @@
}
@media screen and (max-width: 800px) {
#cp-creation {
height: 550px;
//height: 550px;
#cp-creation-form {
div.cp-creation-template {
flex-flow: column;

View File

@ -2771,7 +2771,11 @@ define([
]);
// Password
var password = h('div.cp-creation-password', [
let text;
if (type === 'form') {
text = h('div.cp-creation-password-warning.alert.alert-info.dismissable', h('span.cp-inline-alert-text', Messages.form_passwordWarning));
}
var password = h('div.cp-creation-password', [
UI.createCheckbox('cp-creation-password', Messages.properties_addPassword, false),
h('span.cp-creation-password-picker.cp-creation-slider', [
UI.passwordInput({id: 'cp-creation-password-val'})
@ -2809,6 +2813,7 @@ define([
expire,
password,
]),
text,
templates,
createDiv
])).appendTo($creation);