Add promotion message to form footer

This commit is contained in:
DianaXWiki 2026-05-07 15:09:42 +02:00
parent 3107131ffd
commit 92bb3a6756
3 changed files with 19 additions and 1 deletions

View File

@ -134,6 +134,7 @@ define(req, function(AppConfig, Default, Language) {
}
};
Messages.form_footerInfo = "This form is created with CryptPad.<br>The data is end-to-end encrypted and no one can access it except for the person sending it to you.<br><a href='https://cryptpad.org/apps/form/' target='_blank'>Learn more about CryptPad Forms</a>"; // XXX
return Messages;
});

View File

@ -213,7 +213,22 @@
display: flex;
align-items: center;
justify-content: center;
flex-direction: column;
padding: 20px 20px 150px 20px;
.cp-form-view-footer-text {
text-align: center;
svg.cp-form-footer-icon {
margin: 0 0 0.2rem 0.2rem;
color: @cryptpad_color_brand;
}
a {
color: @cryptpad_color_brand;
text-decoration: none;
&:hover {
text-decoration: underline;
}
}
}
div.cp-form-view-logo {
padding: 10px;
font-size: 40px;

View File

@ -3330,7 +3330,9 @@ define([
$(logo).click(function () {
APP.framework._.sfCommon.gotoURL('/');
});
var footer = h('div.cp-form-view-footer', [logo]);
var content = UI.setHTML(h('div.cp-form-block.cp-form-view-footer-text'), Messages.form_footerInfo);
content.appendChild(Icons.get('form', { 'class': 'cp-form-footer-icon', 'aria-hidden': true }));
var footer = h('div.cp-form-view-footer', [content, logo]);
return footer;
};