diff --git a/customize.dist/src/less2/include/creation.less b/customize.dist/src/less2/include/creation.less index 5ff730a64..65b7b6e62 100644 --- a/customize.dist/src/less2/include/creation.less +++ b/customize.dist/src/less2/include/creation.less @@ -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; diff --git a/www/common/common-ui-elements.js b/www/common/common-ui-elements.js index b54cc0f14..4882efbe1 100644 --- a/www/common/common-ui-elements.js +++ b/www/common/common-ui-elements.js @@ -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 ]);