diff --git a/addons/portal/controllers/portal.py b/addons/portal/controllers/portal.py index ea75de8073d..fbfa39ebe89 100644 --- a/addons/portal/controllers/portal.py +++ b/addons/portal/controllers/portal.py @@ -188,27 +188,6 @@ class CustomerPortal(Controller): response.headers['X-Frame-Options'] = 'DENY' return response - @route(['/portal/sign/get_fonts'], type='json', auth='public') - def get_fonts(self): - """This route will return a list of base64 encoded fonts. - - Those fonts will be proposed to the user when creating a signature - using mode 'auto'. - - :return: base64 encoded fonts - :rtype: list - """ - current_dir = os.path.dirname(os.path.abspath(__file__)) - fonts_directory = os.path.join(current_dir, '..', 'static', 'font', 'sign') - font_filenames = sorted(os.listdir(fonts_directory)) - - fonts = [] - for filename in font_filenames: - font_file = open(os.path.join(fonts_directory, filename), 'rb') - font = base64.b64encode(font_file.read()) - fonts.append(font) - return fonts - def details_form_validate(self, data): error = dict() error_message = [] diff --git a/addons/portal/static/src/js/portal_signature.js b/addons/portal/static/src/js/portal_signature.js index f9a83caa224..60d999cfbf0 100644 --- a/addons/portal/static/src/js/portal_signature.js +++ b/addons/portal/static/src/js/portal_signature.js @@ -3,7 +3,7 @@ odoo.define('portal.signature_form', function (require) { var core = require('web.core'); var dom = require('web.dom'); - var NameAndSignature = require('portal.name_and_signature').NameAndSignature; + var NameAndSignature = require('web.name_and_signature').NameAndSignature; var qweb = core.qweb; var Widget = require('web.Widget'); @@ -61,7 +61,7 @@ odoo.define('portal.signature_form', function (require) { start: function () { this.$confirm_btn = this.$('.o_portal_sign_submit'); this.$controls = this.$('.o_portal_sign_controls'); - this.nameAndSignature.replace(this.$('.o_portal_sign_name_and_signature')); + this.nameAndSignature.replace(this.$('.o_web_sign_name_and_signature')); return this._super.apply(this, arguments); }, @@ -168,7 +168,7 @@ $('.o_portal_signature_form').each(function () { var nameAndSignatureOptions = { defaultName: $elem.data('default-name'), mode: $elem.data('mode'), - signatureRatio: $elem.data('signature-ratio'), + displaySignatureRatio: $elem.data('signature-ratio'), signatureType: $elem.data('signature-type'), }; var sendLabel = $elem.data('send-label'); diff --git a/addons/portal/static/src/scss/portal_name_and_signature.scss b/addons/portal/static/src/scss/portal_name_and_signature.scss deleted file mode 100644 index 557731948fb..00000000000 --- a/addons/portal/static/src/scss/portal_name_and_signature.scss +++ /dev/null @@ -1,23 +0,0 @@ -.o_portal_sign_name_and_signature { - // for the absolute of the font selection to work - position: relative; -} - -/* Signature Dialog */ -// The .card selector is important to make sure the position absolute will take -// priority over the position relative of the card. -.card.o_portal_sign_auto_font_selection { - @include o-position-absolute(0, 0); - - .o_portal_sign_auto_font_list { - overflow: auto; - - > a { - height: 100px; - - > img { - height: 100%; - } - } - } -} diff --git a/addons/portal/static/src/xml/portal_signature.xml b/addons/portal/static/src/xml/portal_signature.xml index 57fd067b4a9..83877d387ef 100644 --- a/addons/portal/static/src/xml/portal_signature.xml +++ b/addons/portal/static/src/xml/portal_signature.xml @@ -4,7 +4,7 @@
-
+
+ + Binary file + + +
+
+ +
+
+
By clicking Adopt and Sign, I agree that the chosen signature/initials will be a valid electronic representation of my hand-written signature/initials for all purposes when it is used on documents, including legally binding contracts.
+ +
+
Styles
+
+
+
+ + + + + + + + + +