Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/roundcube/roundcubemail.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--CHANGELOG1
-rw-r--r--plugins/managesieve/Changelog1
-rw-r--r--plugins/managesieve/lib/Roundcube/rcube_sieve_engine.php22
-rw-r--r--plugins/managesieve/localization/en_US.inc1
-rw-r--r--skins/elastic/styles/widgets/forms.less1
5 files changed, 13 insertions, 13 deletions
diff --git a/CHANGELOG b/CHANGELOG
index ed555d495..420b2c383 100644
--- a/CHANGELOG
+++ b/CHANGELOG
@@ -5,6 +5,7 @@ CHANGELOG Roundcube Webmail
- Enigma: Fix so using list checkbox selection does not load the key preview frame
- Enigma: Fix generation of key pairs for identities with IDN domains (#7181)
- Enigma: Display IDN domains of key users and identities in UTF8
+- Managesieve: Fix bug where it wasn't possible to save flag actions (#7188)
- Markasjunk: Fix bug where marking as spam/ham didn't work on moving messages with drag-and-drop (#7137)
- Password: Make chpass-wrapper.py Python 3 compatible (#7135)
- Elastic: Fix disappearing sidebar in mail compose after clicking Mail button
diff --git a/plugins/managesieve/Changelog b/plugins/managesieve/Changelog
index 58a69fd8b..fa5ccc0dd 100644
--- a/plugins/managesieve/Changelog
+++ b/plugins/managesieve/Changelog
@@ -1,6 +1,7 @@
- Replace "Filter disabled" with "Filter enabled" (#7028)
- Fix so modifier type select wasn't hidden after hiding modifier select on header change
- Fix filter selection after removing a first filter (#7079)
+- Fix bug where it wasn't possible to save flag actions (#7188)
* version 9.3 [2019-04-21]
-----------------------------------------------------------
diff --git a/plugins/managesieve/lib/Roundcube/rcube_sieve_engine.php b/plugins/managesieve/lib/Roundcube/rcube_sieve_engine.php
index b62e7565f..329fbe9b1 100644
--- a/plugins/managesieve/lib/Roundcube/rcube_sieve_engine.php
+++ b/plugins/managesieve/lib/Roundcube/rcube_sieve_engine.php
@@ -1084,16 +1084,12 @@ class rcube_sieve_engine
case 'addflag':
case 'setflag':
case 'removeflag':
- $_target = array();
- if (empty($flags[$idx])) {
- $this->errors['actions'][$i]['target'] = $this->plugin->gettext('noflagset');
- }
- else {
- foreach ($flags[$idx] as $flag) {
- $_target[] = $this->strip_value($flag);
- }
+ $this->form['actions'][$i]['target'] = $this->strip_value($flags[$idx]);
+
+ if (empty($this->form['actions'][$i]['target'])) {
+ $this->errors['actions'][$i]['flag'] = $this->plugin->gettext('noflagset');
}
- $this->form['actions'][$i]['target'] = $_target;
+
break;
case 'addheader':
@@ -2285,7 +2281,7 @@ class rcube_sieve_engine
}
$flout .= $this->list_input($id, 'action_flags', $custom_flags, true,
- $this->error_class($id, 'action', 'flags', 'action_flags'));
+ $this->error_class($id, 'action', 'flag', 'action_flags_flag'), null, false, "action_flags_flag{$id}");
$out .= html::div(array(
'id' => 'action_flags' . $id,
@@ -2547,7 +2543,7 @@ class rcube_sieve_engine
return $trim ? trim($str) : $str;
}
- protected function error_class($id, $type, $target, $elem_prefix='')
+ protected function error_class($id, $type, $target, $elem_prefix = '')
{
// TODO: tooltips
if (($type == 'test' && ($str = $this->errors['tests'][$id][$target])) ||
@@ -2579,7 +2575,7 @@ class rcube_sieve_engine
$this->rc->output->add_script($script, 'docready');
}
- protected function list_input($id, $name, $value, $enabled, $class, $size = null, $hidden = false)
+ protected function list_input($id, $name, $value, $enabled, $class, $size = null, $hidden = false, $elem_id = null)
{
$value = (array) $value;
$value = array_map(array('rcube', 'Q'), $value);
@@ -2590,7 +2586,7 @@ class rcube_sieve_engine
'data-size' => $size,
'data-hidden' => $hidden ?: null,
'name' => '_' . $name . '[' . $id . ']',
- 'id' => $name.$id,
+ 'id' => $elem_id ?: ($name.$id),
'disabled' => !$enabled,
'class' => $class,
'style' => 'display:none',
diff --git a/plugins/managesieve/localization/en_US.inc b/plugins/managesieve/localization/en_US.inc
index a5c6d2702..4758bec72 100644
--- a/plugins/managesieve/localization/en_US.inc
+++ b/plugins/managesieve/localization/en_US.inc
@@ -276,3 +276,4 @@ $messages['emptyvacationbody'] = 'Body of vacation message is required!';
$messages['duplicate.conflict.err'] = 'Both header and unique identifier are not allowed.';
$messages['disabledaction'] = 'Action not permitted.';
$messages['lastindexempty'] = 'Index is required when counting from end';
+$messages['noflagset'] = 'At least one flag must be selected.';
diff --git a/skins/elastic/styles/widgets/forms.less b/skins/elastic/styles/widgets/forms.less
index 3b3892518..e8bebcf89 100644
--- a/skins/elastic/styles/widgets/forms.less
+++ b/skins/elastic/styles/widgets/forms.less
@@ -833,6 +833,7 @@ html.ms .propform {
& > .invalid-feedback {
display: inline-block;
+ line-height: 1.5;
}
}
}