Allow to explicitly set ticket language

This commit is contained in:
Raphael Michel
2019-12-20 18:17:00 +01:00
parent 614c40596f
commit eb7e938af6
4 changed files with 28 additions and 3 deletions

View File

@@ -119,6 +119,7 @@ var editor = {
var col = (new fabric.Color(o.getFill()))._source;
d.push({
type: "textarea",
locale: $("#pdf-info-locale").val(),
left: editor._px2mm(left).toFixed(2),
bottom: editor._px2mm(editor.pdf_viewport.height - o.height - top).toFixed(2),
fontsize: editor._px2pt(o.getFontSize()).toFixed(1),
@@ -178,6 +179,10 @@ var editor = {
} else {
o.setText(editor._get_text_sample(d.content));
}
if (d.locale) {
// The data format allows to set the locale per text field but we currently only expose a global field
$("#pdf-info-locale").val(d.locale);
}
}
var new_top = editor.pdf_viewport.height - editor._mm2px(d.bottom) - (o.height * o.scaleY);