diff --git a/plugins/calendar/calendar_ui.js b/plugins/calendar/calendar_ui.js index 6285f6eb..a6e288dc 100644 --- a/plugins/calendar/calendar_ui.js +++ b/plugins/calendar/calendar_ui.js @@ -3096,9 +3096,10 @@ function rcube_calendar_ui(settings) $('#event-export-calendar').val(calendar.id); $('#event-export-range').change(function(e){ - var custom = $('option:selected', this).val() == 'custom', - input = $('#event-export-startdate') - input.parent()[(custom?'show':'hide')](); + var custom = $(this).val() == 'custom', input = $('#event-export-startdate'); + + $(this)[custom ? 'removeClass' : 'addClass']('rounded-right'); // Elastic/Bootstrap + input[custom ? 'show' : 'hide'](); if (custom) input.select(); }) @@ -3109,8 +3110,8 @@ function rcube_calendar_ui(settings) 'class': 'mainaction export', click: function() { if (form) { - var start = 0, range = $('#event-export-range option:selected', this).val(), - source = $('#event-export-calendar option:selected').val(), + var start = 0, range = $('#event-export-range', this).val(), + source = $('#event-export-calendar').val(), attachmt = $('#event-export-attachments').get(0).checked; if (range == 'custom') diff --git a/plugins/calendar/lib/calendar_ui.php b/plugins/calendar/lib/calendar_ui.php index 79b631d7..63ab9c3b 100644 --- a/plugins/calendar/lib/calendar_ui.php +++ b/plugins/calendar/lib/calendar_ui.php @@ -571,7 +571,7 @@ class calendar_ui html::label(array('for' => 'event-export-calendar', 'class' => 'col-sm-4 col-form-label'), $this->cal->gettext('calendar')) . html::div('col-sm-8', $this->calendar_select(array('name' => 'calendar', 'id' => 'event-export-calendar', 'class' => 'form-control custom-select')))); - $select = new html_select(array('name' => 'range', 'id' => 'event-export-range', 'class' => 'form-control custom-select')); + $select = new html_select(array('name' => 'range', 'id' => 'event-export-range', 'class' => 'form-control custom-select rounded-right')); $select->add(array( $this->cal->gettext('all'), $this->cal->gettext('onemonthback'), @@ -583,11 +583,11 @@ class calendar_ui ), array(0,'1','2','3','6','12','custom')); - $startdate = new html_inputfield(array('name' => 'start', 'size' => 11, 'id' => 'event-export-startdate')); + $startdate = new html_inputfield(array('name' => 'start', 'size' => 11, 'id' => 'event-export-startdate', 'style' => 'display:none')); $html .= html::div('form-section form-group row', html::label(array('for' => 'event-export-range', 'class' => 'col-sm-4 col-form-label'), $this->cal->gettext('exportrange')) - . html::div('col-sm-8', $select->show(0) . html::span(array('style'=>'display:none'), $startdate->show()))); + . html::div('col-sm-8 input-group', $select->show(0) . $startdate->show())); $checkbox = new html_checkbox(array('name' => 'attachments', 'id' => 'event-export-attachments', 'value' => 1, 'class' => 'form-check-input pretty-checkbox')); $html .= html::div('form-section form-check row',