From 9f6eb9db4adaa7b7c737fbbbd5b95c2ee65fcce2 Mon Sep 17 00:00:00 2001 From: "Julia.Radzhabova" Date: Fri, 1 Aug 2025 19:40:21 +0300 Subject: [PATCH 1/2] [PDF] Apply rtl direction for forms --- apps/pdfeditor/main/app/view/Toolbar.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apps/pdfeditor/main/app/view/Toolbar.js b/apps/pdfeditor/main/app/view/Toolbar.js index 1a755fdb15..d2ecfc15b3 100644 --- a/apps/pdfeditor/main/app/view/Toolbar.js +++ b/apps/pdfeditor/main/app/view/Toolbar.js @@ -629,7 +629,7 @@ define([ iconCls: 'toolbar__icon btn-ltr', action: 'text-direction', dirRtl: false, - lock: [_set.paragraphLock, _set.lostConnect, _set.noParagraphSelected, _set.disableOnStart, _set.inAnnotation], + lock: [_set.paragraphLock, _set.lostConnect, _set.noTextSelected, _set.inCheckForm, _set.disableOnStart, _set.inAnnotation], menu: new Common.UI.Menu({ items: [ {caption: this.textDirLtr, value: false, iconCls: 'menu__icon btn-ltr'}, From 3f4caac3e31bdfddbe88360738045bbd5bf9b238 Mon Sep 17 00:00:00 2001 From: "Julia.Radzhabova" Date: Mon, 11 Aug 2025 20:11:30 +0300 Subject: [PATCH 2/2] [PDF] Add numeral settings --- .../main/app/template/FormSettings.template | 18 ++++++++++ apps/pdfeditor/main/app/view/FormSettings.js | 34 +++++++++++++++++++ apps/pdfeditor/main/locale/en.json | 4 +++ 3 files changed, 56 insertions(+) diff --git a/apps/pdfeditor/main/app/template/FormSettings.template b/apps/pdfeditor/main/app/template/FormSettings.template index 7a46951b5e..41eb30698f 100644 --- a/apps/pdfeditor/main/app/template/FormSettings.template +++ b/apps/pdfeditor/main/app/template/FormSettings.template @@ -290,6 +290,24 @@
+ + +
+ + + + + + + + + + + + +
+ + diff --git a/apps/pdfeditor/main/app/view/FormSettings.js b/apps/pdfeditor/main/app/view/FormSettings.js index 537f1ca29f..1a2c001812 100644 --- a/apps/pdfeditor/main/app/view/FormSettings.js +++ b/apps/pdfeditor/main/app/view/FormSettings.js @@ -94,6 +94,7 @@ define([ this.linkAdvanced = el.find('#form-advanced-link'); this.RequiredSettings = el.find('#form-chb-required').closest('tr'); this.NameSettings = el.find('.form-name'); + this.NotCheckSettings = el.find('.form-not-check'); }, createDelayedElements: function() { @@ -128,6 +129,24 @@ define([ this.cmbName.on('changed:after', this.onNameChanged.bind(this)); this.cmbName.on('hide:after', this.onHideMenus.bind(this)); + this.cmbNumeral = new Common.UI.ComboBox({ + el : $markup.findById('#form-combo-numeral'), + editable : false, + cls : 'input-group-nr', + menuStyle : 'min-width:100%;', + data : [ + { value: Asc.c_oNumeralType.arabic, displayValue: this.textArabic }, + { value: Asc.c_oNumeralType.hindi, displayValue: this.textHindi } + // { value: Asc.c_oNumeralType.context, displayValue: this.textContext } + ], + dataHint: '1', + dataHintDirection: 'bottom', + dataHintOffset: 'big' + }); + this.cmbNumeral.setValue(Asc.c_oNumeralType.arabic); + this.cmbNumeral.on('selected', this.onNumeralChanged.bind(this)); + this.lockedControls.push(this.cmbNumeral); + this.cmbOrient = new Common.UI.ComboBox({ el: $markup.findById('#form-combo-orient'), cls: 'input-group-nr', @@ -934,6 +953,14 @@ define([ } }, + onNumeralChanged: function(combo, record) { + if (this.api && !this._noApply) { + this._state.Numeral = undefined; + this.api.SetFieldDigitsType(record.value); + this.fireEvent('editcomplete', this); + } + }, + onLineStyleChanged: function(combo, record) { if (this.api && !this._noApply) { this._state.StrokeStyle = undefined; @@ -1718,6 +1745,12 @@ define([ } } } + } else { + val = props.asc_getDigitsType(); + if ( this._state.Numeral!==val ) { + this.cmbNumeral.setValue(val!==null && val!==undefined ? val : ''); + this._state.Numeral=val; + } } this._noApply = false; @@ -1874,6 +1907,7 @@ define([ this._state.FormatType===AscPDF.FormatType.SPECIAL && this._state.SpecialType===-1)); this.DateSettings.toggleClass('hidden', !(isCombobox || isText) || this._state.FormatType!==AscPDF.FormatType.DATE); this.TimeSettings.toggleClass('hidden', !(isCombobox || isText) || this._state.FormatType!==AscPDF.FormatType.TIME); + this.NotCheckSettings.toggleClass('hidden', isCheck || isRadio); } }, PDFE.Views.FormSettings || {})); diff --git a/apps/pdfeditor/main/locale/en.json b/apps/pdfeditor/main/locale/en.json index e00d2ac4c0..6e453247e4 100644 --- a/apps/pdfeditor/main/locale/en.json +++ b/apps/pdfeditor/main/locale/en.json @@ -1522,6 +1522,10 @@ "PDFE.Views.FormSettings.textZipCode": "ZIP Code", "PDFE.Views.FormSettings.textZipCode4": "ZIP Code + 4", "PDFE.Views.FormSettings.txtCustom": "Custom", + "PDFE.Views.FormSettings.textText": "Text", + "PDFE.Views.FormSettings.textNumeral": "Numeral", + "PDFE.Views.FormSettings.textHindi": "Hindi", + "PDFE.Views.FormSettings.textArabic": "Arabic", "PDFE.Views.FormsTab.capBtnCheckBox": "Checkbox", "PDFE.Views.FormsTab.capBtnComboBox": "Combo Box", "PDFE.Views.FormsTab.capBtnDropDown": "List Box",