diff --git a/www/common/common-ui-elements.js b/www/common/common-ui-elements.js index 7b3603ccc..70aceaf89 100644 --- a/www/common/common-ui-elements.js +++ b/www/common/common-ui-elements.js @@ -1033,11 +1033,14 @@ define([ var parsedHref = Hash.parsePadUrl(href); var hasPassword = parsedHref.hashData.password; - var faqLink = h('a', {href: '#'}, Messages.passwordFaqLink); - $(faqLink).click(function () { - console.log(config.origin + "/faq.html#security-pad_password"); - common.openURL(config.origin + "/faq.html#security-pad_password"); - }); + var makeFaqLink = function () { + var link = h('a', {href: '#'}, Messages.passwordFaqLink); + $(link).click(function () { + common.openURL(config.origin + "/faq.html#security-pad_password"); + }); + return link; + }; + var parsed = Hash.parsePadUrl(pathname); var canPresent = ['code', 'slide'].indexOf(parsed.type) !== -1; @@ -1098,8 +1101,11 @@ define([ // Show alert if the pad is password protected if (hasPassword) { - linkContent.push(h('div.alert.alert-primary', [h('i.fa.fa-lock'), - ' ', Messages.share_linkPasswordAlert])) + linkContent.push(h('div.alert.alert-primary', [ + h('i.fa.fa-lock'), ' ', + Messages.share_linkPasswordAlert, ' ', + makeFaqLink() + ])) }; var link = h('div.cp-share-modal', linkContent); @@ -1173,8 +1179,11 @@ define([ // Show alert if the pad is password protected if (hasPassword) { - $contactsContent.append(h('div.alert.alert-primary', [h('i.fa.fa-unlock'), - ' ', Messages.share_contactPasswordAlert])) + $contactsContent.append(h('div.alert.alert-primary', [ + h('i.fa.fa-lock'), ' ', + Messages.share_contactPasswordAlert, ' ', + makeFaqLink() + ])) }; @@ -1200,12 +1209,11 @@ define([ ]; // Show alert if the pad is password protected - // if (hasPassword) { embedContent.push(h('div.alert.alert-primary', [ h('i.fa.fa-lock'), ' ', Messages.share_embedPasswordAlert, ' ', - faqLink + makeFaqLink() ])) };