From b20788336286acdfe66529e06b2fcfa513781be7 Mon Sep 17 00:00:00 2001 From: Carson Fleming Date: Mon, 25 Nov 2024 22:10:58 -0800 Subject: use label for forwarding addr --- inbox_settings.php | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/inbox_settings.php b/inbox_settings.php index 25e3cd0..c47acf0 100644 --- a/inbox_settings.php +++ b/inbox_settings.php @@ -96,12 +96,16 @@ class inbox_settings extends rcube_plugin { foreach ($forwarders as $idx => $row) { $forwarding_form->add_row(['class' => 'form-group row']); $forwarding_form->add('title col-sm-4', - html::label(['class' => 'col-form-label'], rcube::Q($row[0])) - . self::get_hiddenfield('addr[' . $idx . ']', $row[0]) - ); + html::label( + ['class' => 'col-form-label', 'for' => 'fwd_addr_' . $idx], + rcube::Q($row[0])) + . self::get_hiddenfield('addr[' . $idx . ']', $row[0])); $forwarding_form->add('col-sm-4', self::get_textfield( - 'fwd_addr[' . $idx . ']', $row[1], ['placeholder' => 'anyone@gmail.com'])); + 'fwd_addr_' . $idx, + 'fwd_addr[' . $idx . ']', + $row[1], + ['placeholder' => 'anyone@gmail.com'])); $forwarding_form->add('col-sm-2 offset-1', self::get_checkbox( 'do_fwd_' . $idx, @@ -145,8 +149,9 @@ class inbox_settings extends rcube_plugin { . html::label(['class' => 'custom-control-label', 'for' => $id] + $attrs, '')); } - private static function get_textfield($name, $value, $attrs = []) { + private static function get_textfield($id, $name, $value, $attrs = []) { return (new html_inputfield([ + 'id' => $id, 'type' => 'text', 'name' => $name, 'size' => 40, -- cgit v1.2.3