diff --git a/apps/documenteditor/main/app/template/FormSettings.template b/apps/documenteditor/main/app/template/FormSettings.template
index 2c2950bd1..50dd09c3e 100644
--- a/apps/documenteditor/main/app/template/FormSettings.template
+++ b/apps/documenteditor/main/app/template/FormSettings.template
@@ -28,6 +28,12 @@
diff --git a/apps/documenteditor/main/app/view/FormSettings.js b/apps/documenteditor/main/app/view/FormSettings.js
index 17cfd67b3..672f156e9 100644
--- a/apps/documenteditor/main/app/view/FormSettings.js
+++ b/apps/documenteditor/main/app/view/FormSettings.js
@@ -147,6 +147,24 @@ define([
setTimeout(function(){me.txtPlaceholder._input && me.txtPlaceholder._input.select();}, 1);
});
+ this.txtTag = new Common.UI.InputField({
+ el : $markup.findById('#form-txt-tag'),
+ allowBlank : true,
+ validateOnChange: false,
+ validateOnBlur: false,
+ style : 'width: 100%;',
+ value : '',
+ dataHint : '1',
+ dataHintDirection: 'left',
+ dataHintOffset: 'small'
+ });
+ this.lockedControls.push(this.txtTag);
+ this.txtTag.on('changed:after', this.onTagChanged.bind(this));
+ this.txtTag.on('inputleave', function(){ me.fireEvent('editcomplete', me);});
+ this.txtTag.cmpEl.on('focus', 'input.form-control', function() {
+ setTimeout(function(){me.txtTag._input && me.txtTag._input.select();}, 1);
+ });
+
this.textareaHelp = new Common.UI.TextareaField({
el : $markup.findById('#form-txt-help'),
style : 'width: 100%; height: 60px;',
@@ -501,6 +519,16 @@ define([
}
},
+ onTagChanged: function(input, newValue, oldValue, e) {
+ if (this.api && !this._noApply && (newValue!==oldValue)) {
+ var props = this._originalProps || new AscCommon.CContentControlPr();
+ props.put_Tag(newValue);
+ this.api.asc_SetContentControlProperties(props, this.internalId);
+ if (!e.relatedTarget || (e.relatedTarget.localName != 'input' && e.relatedTarget.localName != 'textarea') || !/form-control/.test(e.relatedTarget.className))
+ this.fireEvent('editcomplete', this);
+ }
+ },
+
onHelpChanged: function(input, newValue, oldValue, e) {
if (this.api && !this._noApply && (newValue!==oldValue)) {
var props = this._originalProps || new AscCommon.CContentControlPr();
@@ -830,6 +858,12 @@ define([
this._state.placeholder = val;
}
+ val = props.get_Tag();
+ if (this._state.tag !== val) {
+ this.txtTag.setValue(val ? val : '');
+ this._state.tag = val;
+ }
+
val = props.get_Lock();
(val===undefined) && (val = Asc.c_oAscSdtLockType.Unlocked);
if (this._state.LockDelete !== (val==Asc.c_oAscSdtLockType.SdtContentLocked || val==Asc.c_oAscSdtLockType.SdtLocked)) {
@@ -1341,7 +1375,8 @@ define([
textTooBig: 'Image is Too Big',
textTooSmall: 'Image is Too Small',
textScale: 'When to scale',
- textBackgroundColor: 'Background Color'
+ textBackgroundColor: 'Background Color',
+ textTag: 'Tag'
}, DE.Views.FormSettings || {}));
});
\ No newline at end of file
diff --git a/apps/documenteditor/main/locale/en.json b/apps/documenteditor/main/locale/en.json
index d01ebf758..12a22e8a7 100644
--- a/apps/documenteditor/main/locale/en.json
+++ b/apps/documenteditor/main/locale/en.json
@@ -1862,6 +1862,7 @@
"DE.Views.FormSettings.textRequired": "Required",
"DE.Views.FormSettings.textScale": "When to scale",
"DE.Views.FormSettings.textSelectImage": "Select Image",
+ "DE.Views.FormSettings.textTag": "Tag",
"DE.Views.FormSettings.textTip": "Tip",
"DE.Views.FormSettings.textTipAdd": "Add new value",
"DE.Views.FormSettings.textTipDelete": "Delete value",
diff --git a/apps/documenteditor/main/locale/ru.json b/apps/documenteditor/main/locale/ru.json
index 5c655b96b..a3fb16621 100644
--- a/apps/documenteditor/main/locale/ru.json
+++ b/apps/documenteditor/main/locale/ru.json
@@ -1809,6 +1809,7 @@
"DE.Views.FormSettings.textRequired": "Обязательно",
"DE.Views.FormSettings.textScale": "Когда масштабировать",
"DE.Views.FormSettings.textSelectImage": "Выбрать изображение",
+ "DE.Views.FormSettings.textTag": "Тег",
"DE.Views.FormSettings.textTip": "Подсказка",
"DE.Views.FormSettings.textTipAdd": "Добавить новое значение",
"DE.Views.FormSettings.textTipDelete": "Удалить значение",
|