diff --git a/apps/documenteditor/main/app/controller/FormsTab.js b/apps/documenteditor/main/app/controller/FormsTab.js
index 8e7d98bcf..63287cf5b 100644
--- a/apps/documenteditor/main/app/controller/FormsTab.js
+++ b/apps/documenteditor/main/app/controller/FormsTab.js
@@ -153,7 +153,7 @@ define([
var content_locked = lock_type==Asc.c_oAscSdtLockType.SdtContentLocked || lock_type==Asc.c_oAscSdtLockType.ContentLocked;
var arr = [ this.view.btnTextField, this.view.btnComboBox, this.view.btnDropDown, this.view.btnCheckBox,
this.view.btnRadioBox, this.view.btnImageField, this.view.btnEmailField, this.view.btnPhoneField, this.view.btnComplexField,
- this.view.btnCreditCard, this.view.btnZipCode];
+ this.view.btnCreditCard, this.view.btnZipCode, this.view.btnDateTime];
Common.Utils.lockControls(Common.enumLock.paragraphLock, paragraph_locked, {array: arr});
Common.Utils.lockControls(Common.enumLock.headerLock, header_locked, {array: arr});
Common.Utils.lockControls(Common.enumLock.controlPlain, control_plain, {array: arr});
@@ -191,6 +191,8 @@ define([
this.api.asc_AddContentControlCheckBox(oPr, oFormPr);
} else if (type == 'combobox' || type == 'dropdown')
this.api.asc_AddContentControlList(type == 'combobox', oPr, oFormPr);
+ else if (type == 'datetime')
+ this.api.asc_AddContentControlDatePicker(); // !!!! change for datetime form
else if (type == 'text') {
var props = new AscCommon.CContentControlPr();
oPr = new AscCommon.CSdtTextFormPr();
diff --git a/apps/documenteditor/main/app/controller/RightMenu.js b/apps/documenteditor/main/app/controller/RightMenu.js
index 1261c0156..97ef644ac 100644
--- a/apps/documenteditor/main/app/controller/RightMenu.js
+++ b/apps/documenteditor/main/app/controller/RightMenu.js
@@ -220,7 +220,8 @@ define([
if (control_props && control_props.get_FormPr() && this.rightmenu.formSettings) {
var spectype = control_props.get_SpecificType();
if (spectype==Asc.c_oAscContentControlSpecificType.CheckBox || spectype==Asc.c_oAscContentControlSpecificType.Picture || spectype==Asc.c_oAscContentControlSpecificType.Complex ||
- spectype==Asc.c_oAscContentControlSpecificType.ComboBox || spectype==Asc.c_oAscContentControlSpecificType.DropDownList || spectype==Asc.c_oAscContentControlSpecificType.None) {
+ spectype==Asc.c_oAscContentControlSpecificType.ComboBox || spectype==Asc.c_oAscContentControlSpecificType.DropDownList || spectype==Asc.c_oAscContentControlSpecificType.None ||
+ spectype==Asc.c_oAscContentControlSpecificType.DateTime) {
settingsType = Common.Utils.documentSettingsType.Form;
this._settings[settingsType].props = control_props;
this._settings[settingsType].locked = control_lock || isProtected;
diff --git a/apps/documenteditor/main/app/view/FormsTab.js b/apps/documenteditor/main/app/view/FormsTab.js
index 0b9690434..a3ffb0f9b 100644
--- a/apps/documenteditor/main/app/view/FormsTab.js
+++ b/apps/documenteditor/main/app/view/FormsTab.js
@@ -61,6 +61,7 @@ define([
'
' +
'' +
'' +
+ '' +
'' +
'' +
'' +
@@ -130,6 +131,9 @@ define([
this.btnZipCode && this.btnZipCode.on('click', function (b, e) {
me.fireEvent('forms:insert', ['text', {mask: "99999-9999", placeholder: '99999-9999'}]);
});
+ this.btnDateTime && this.btnDateTime.on('click', function (b, e) {
+ me.fireEvent('forms:insert', ['datetime']);
+ });
this.btnViewFormRoles && this.btnViewFormRoles.on('click', function (b, e) {
var item = b.menu.getChecked();
me.fireEvent('forms:mode', [b.pressed, item ? item.caption : undefined]);
@@ -315,6 +319,17 @@ define([
});
this.paragraphControls.push(this.btnCreditCard);
+ this.btnDateTime = new Common.UI.Button({
+ cls: 'btn-toolbar x-huge icon-top',
+ iconCls: 'toolbar__icon btn-datetime',
+ lock: [_set.paragraphLock, _set.headerLock, _set.controlPlain, _set.contentLock, _set.previewReviewMode, _set.viewFormMode, _set.lostConnect, _set.disableOnStart, _set.docLockView, _set.docLockForms, _set.docLockComments],
+ caption: this.capDateTime,
+ dataHint: '1',
+ dataHintDirection: 'bottom',
+ dataHintOffset: 'small'
+ });
+ this.paragraphControls.push(this.btnDateTime);
+
this.btnComplexField = new Common.UI.Button({
cls: 'btn-toolbar x-huge icon-top',
iconCls: 'toolbar__icon complex-field',
@@ -500,6 +515,7 @@ define([
me.btnComplexField.updateHint(me.tipComplexField);
me.btnZipCode.updateHint(me.tipZipCode);
me.btnCreditCard.updateHint(me.tipCreditCard);
+ me.btnDateTime.updateHint(me.tipDateTime);
}
me.btnClear.updateHint(me.textClearFields);
me.btnPrevForm.updateHint(me.tipPrevForm);
@@ -534,6 +550,7 @@ define([
this.btnComplexField.render($host.find('#slot-btn-form-complex'));
this.btnZipCode.render($host.find('#slot-btn-form-zipcode'));
this.btnCreditCard.render($host.find('#slot-btn-form-credit'));
+ this.btnDateTime.render($host.find('#slot-btn-form-datetime'));
$host.find('.forms-buttons').show();
}
@@ -662,7 +679,9 @@ define([
capZipCode: 'Zip Code',
capCreditCard: 'Credit Card',
tipZipCode: 'Insert zip code',
- tipCreditCard: 'Insert credit card number'
+ tipCreditCard: 'Insert credit card number',
+ capDateTime: 'Date & Time',
+ tipDateTime: 'Insert date and time'
}
}()), DE.Views.FormsTab || {}));
});
\ No newline at end of file
diff --git a/apps/documenteditor/main/app/view/ImageSettingsAdvanced.js b/apps/documenteditor/main/app/view/ImageSettingsAdvanced.js
index 96ad6a0bc..ce8a98ef4 100644
--- a/apps/documenteditor/main/app/view/ImageSettingsAdvanced.js
+++ b/apps/documenteditor/main/app/view/ImageSettingsAdvanced.js
@@ -1400,7 +1400,8 @@ define([ 'text!documenteditor/main/app/template/ImageSettingsAdvanced.templat
var spectype = control_props.get_SpecificType();
fixed_size = (spectype==Asc.c_oAscContentControlSpecificType.CheckBox || spectype==Asc.c_oAscContentControlSpecificType.ComboBox ||
spectype==Asc.c_oAscContentControlSpecificType.DropDownList || spectype==Asc.c_oAscContentControlSpecificType.None ||
- spectype==Asc.c_oAscContentControlSpecificType.Picture || spectype==Asc.c_oAscContentControlSpecificType.Complex) &&
+ spectype==Asc.c_oAscContentControlSpecificType.Picture || spectype==Asc.c_oAscContentControlSpecificType.Complex ||
+ spectype==Asc.c_oAscContentControlSpecificType.DateTime) &&
control_props.get_FormPr() && control_props.get_FormPr().get_Fixed();
}
diff --git a/apps/documenteditor/main/app/view/ShapeSettings.js b/apps/documenteditor/main/app/view/ShapeSettings.js
index 85af8379f..2ed4cff65 100644
--- a/apps/documenteditor/main/app/view/ShapeSettings.js
+++ b/apps/documenteditor/main/app/view/ShapeSettings.js
@@ -810,7 +810,8 @@ define([
var spectype = control_props.get_SpecificType();
control_props = (spectype==Asc.c_oAscContentControlSpecificType.CheckBox || spectype==Asc.c_oAscContentControlSpecificType.ComboBox ||
spectype==Asc.c_oAscContentControlSpecificType.DropDownList || spectype==Asc.c_oAscContentControlSpecificType.None ||
- spectype==Asc.c_oAscContentControlSpecificType.Picture || spectype==Asc.c_oAscContentControlSpecificType.Complex) &&
+ spectype==Asc.c_oAscContentControlSpecificType.Picture || spectype==Asc.c_oAscContentControlSpecificType.Complex ||
+ spectype==Asc.c_oAscContentControlSpecificType.DateTime) &&
control_props.get_FormPr() && control_props.get_FormPr().get_Fixed();
} else
control_props = false;