Make form editor modals wider

[MAILPOET-1565]
This commit is contained in:
Pavel Dohnal
2018-12-06 10:12:19 +01:00
parent 1f19a851c3
commit b40916c9fa
5 changed files with 13 additions and 3 deletions

View File

@@ -565,4 +565,8 @@ handle_icon = '../img/handle.png'
/* Settings */ /* Settings */
#mailpoet_form_segments.parsley-error + span .select2-selection #mailpoet_form_segments.parsley-error + span .select2-selection
border: 1px solid #b94a48 border: 1px solid #b94a48
.mailpoet_form_field_settings_text
width: 100%
min-height: 100px;

View File

@@ -1137,6 +1137,7 @@ WysijaForm.Widget = window.Class.create(WysijaForm.Block, {
title: window.MailPoet.I18n.t('editFieldSettings'), title: window.MailPoet.I18n.t('editFieldSettings'),
template: window.jQuery('#form_template_field_settings').html(), template: window.jQuery('#form_template_field_settings').html(),
data: this.getData(), data: this.getData(),
minWidth: '500px',
onSuccess: function () { onSuccess: function () {
var data = window.jQuery('#form_field_settings').mailpoetSerializeObject(); var data = window.jQuery('#form_field_settings').mailpoetSerializeObject();
this.redraw(data); this.redraw(data);

View File

@@ -320,6 +320,9 @@ define('modal', ['mailpoet', 'jquery'],
jQuery('#mailpoet_popup_wrapper').css({ jQuery('#mailpoet_popup_wrapper').css({
height: this.options.height height: this.options.height
}); });
if (this.options.minWidth) {
jQuery('#mailpoet_popup').css({ minWidth: this.options.minWidth });
}
break; break;
case 'panel': case 'panel':
// set dimensions // set dimensions

View File

@@ -598,6 +598,7 @@
// open popup // open popup
MailPoet.Modal.popup({ MailPoet.Modal.popup({
title: "<%= __('Add new field') %>", title: "<%= __('Add new field') %>",
minWidth: "500px",
template: $('#form_template_field_form').html() template: $('#form_template_field_form').html()
}); });
@@ -619,6 +620,7 @@
MailPoet.Modal.popup({ MailPoet.Modal.popup({
title: "<%= __('Edit field') %>", title: "<%= __('Edit field') %>",
template: $('#form_template_field_form').html(), template: $('#form_template_field_form').html(),
minWidth: "500px",
data: response.data data: response.data
}); });
}).fail(function(response) { }).fail(function(response) {

View File

@@ -48,7 +48,7 @@
{{/ifCond}} {{/ifCond}}
{{#ifCond type '==' 'html'}} {{#ifCond type '==' 'html'}}
<textarea name="params[text]">{{ params.text }}</textarea> <textarea name="params[text]" class="mailpoet_form_field_settings_text">{{ params.text }}</textarea>
<p class="clearfix"> <p class="clearfix">
<label> <label>
<input type="hidden" name="params[nl2br]" value="0" /> <input type="hidden" name="params[nl2br]" value="0" />
@@ -74,4 +74,4 @@
return false; return false;
}); });
}); });
<{{!}}/script> <{{!}}/script>