diff --git a/apps/documenteditor/main/app/view/FormsTab.js b/apps/documenteditor/main/app/view/FormsTab.js index 8b0c8a7b0..feb673745 100644 --- a/apps/documenteditor/main/app/view/FormsTab.js +++ b/apps/documenteditor/main/app/view/FormsTab.js @@ -49,7 +49,7 @@ define([ DE.Views.FormsTab = Common.UI.BaseView.extend(_.extend((function(){ var template = '
' + - '
' + + '' + - '
' + - '
' + + '' + + '' + - '
' + - '
' + + '' + + '' + @@ -303,11 +303,6 @@ define([ me.btnViewForm.updateHint(me.tipViewForm); } else { me.btnClear.updateHint(me.textClearFields); - - var separator_forms = me.$el.find('.separator.forms'); - separator_forms.prev('.group').hide(); - separator_forms.hide().next('.group').hide(); - !me.btnSubmit && me.$el.find('.separator.submit').hide().next('.group').hide(); } me.btnPrevForm.updateHint(me.tipPrevForm); me.btnNextForm.updateHint(me.tipNextForm); @@ -321,8 +316,13 @@ define([ this.$el = $(_.template(template)( {} )); var $host = this.$el; + if (this.appConfig.canSubmitForms) { + this.btnSubmit.render($host.find('#slot-btn-form-submit')); + } + if (this.appConfig.isRestrictedEdit && this.appConfig.canFillForms) { this.btnClear.render($host.find('#slot-btn-form-clear')); + this.btnSubmit && $host.find('.separator.submit').show().next('.group').show(); } else { this.btnTextField.render($host.find('#slot-btn-form-field')); this.btnComboBox.render($host.find('#slot-btn-form-combobox')); @@ -333,14 +333,15 @@ define([ this.btnViewForm.render($host.find('#slot-btn-form-view')); this.btnClearFields.render($host.find('#slot-form-clear-fields')); this.btnHighlight.render($host.find('#slot-form-highlight')); + + var separator_forms = $host.find('.separator.forms'); + separator_forms.prev('.group').show(); + separator_forms.show().next('.group').show(); + $host.find('.separator.submit').show().next('.group').show(); } this.btnPrevForm.render($host.find('#slot-btn-form-prev')); this.btnNextForm.render($host.find('#slot-btn-form-next')); - if (this.appConfig.canSubmitForms) { - this.btnSubmit.render($host.find('#slot-btn-form-submit')); - } - return this.$el; },