From b22f1c9a1b2d5a56b593287425f9beb5bb3770fb Mon Sep 17 00:00:00 2001 From: Aleksander Machniak Date: Sat, 27 Jun 2020 10:29:40 +0200 Subject: [PATCH] Add skip-empty option to get_edit_field() (#7444) --- program/lib/Roundcube/rcube_output.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/program/lib/Roundcube/rcube_output.php b/program/lib/Roundcube/rcube_output.php index 27acc7075..f1f2d173e 100644 --- a/program/lib/Roundcube/rcube_output.php +++ b/program/lib/Roundcube/rcube_output.php @@ -306,7 +306,9 @@ abstract class rcube_output } else if ($type == 'select') { $input = new html_select($attrib); - $input->add('---', ''); + if (empty($attrib['skip-empty'])) { + $input->add('---', ''); + } $input->add(array_values($attrib['options']), array_keys($attrib['options'])); } else if ($type == 'password' || $attrib['type'] == 'password') {