Changed styling of warning

This commit is contained in:
zuzanna-maria 2024-10-19 11:16:53 +02:00
parent 8465fc0e44
commit c7be93af3d
2 changed files with 13 additions and 3 deletions

View File

@ -181,8 +181,11 @@
}
.cp-creation-password-warning {
background-color:@creation-bg-color-light;
margin-top: 0.4rem;
font-size: 12px !important;
line-height: normal !important
}
.cp-creation-help, .cp-creation-warning {
font-size: 16px;
color: @cp_creation-fg;

View File

@ -25,6 +25,9 @@ define([
'css!/customize/fonts/cptools/style.css',
], function ($, Config, Broadcast, Util, Hash, Language, UI, Constants, Feedback, h, Clipboard,
Messages, AppConfig, Pages, NThen, InviteInner, Visible, PadTypes) {
Messages.form_passwordWarning = 'For Forms, you can only set the password during creation. It cannot be changed later.' //XX
var UIElements = {};
var urlArgs = Config.requireConf.urlArgs;
@ -2770,8 +2773,11 @@ define([
]);
// Password
var text = h('div.cp-creation-password-warning', 'Note that for Forms, you can only set the password during creation. This password cannot be changed later.');
var password = h('div.cp-creation-password', [text,
let text;
if (type === 'form') {
text = h('div.cp-creation-password-warning.alert.alert-warning.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'})
@ -2779,6 +2785,7 @@ define([
type: "text" // TODO type password with click to show
}),*/
]),
text,
//createHelper('#', "TODO: password protection adds another layer of security ........") // TODO
]);