Skip to content

Commit

Permalink
Merge pull request #1690 from cryptpad/formpassword_warning
Browse files Browse the repository at this point in the history
Form password warning
  • Loading branch information
yflory authored Dec 12, 2024
2 parents 4c0b2d2 + 3dbc21f commit e4fb685
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 7 deletions.
4 changes: 4 additions & 0 deletions customize.dist/messages.js
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
15 changes: 9 additions & 6 deletions customize.dist/src/less2/include/creation.less
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -85,6 +85,7 @@
}

.cp-creation-checkboxes {
min-width: 300px;
flex-flow: column;
align-items: baseline !important;
max-height: 150px;
Expand Down Expand Up @@ -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;
Expand Down Expand Up @@ -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;
Expand Down Expand Up @@ -421,7 +426,6 @@
#cp-creation-form {
& > div {
width: 95%;
margin: 0 auto;
}
.cp-creation-expire {
&.active {
Expand All @@ -431,7 +435,6 @@
.cp-creation-slider {
flex: none;
order: 10;
width: 100%;
}
}
}
Expand All @@ -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;
Expand Down
7 changes: 6 additions & 1 deletion www/common/common-ui-elements.js
Original file line number Diff line number Diff line change
Expand Up @@ -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'})
Expand Down Expand Up @@ -2809,6 +2813,7 @@ define([
expire,
password,
]),
text,
templates,
createDiv
])).appendTo($creation);
Expand Down

0 comments on commit e4fb685

Please sign in to comment.