diff options
| author | Carson Fleming <[email protected]> | 2024-11-25 22:10:58 -0800 |
|---|---|---|
| committer | Carson Fleming <[email protected]> | 2024-11-25 22:10:58 -0800 |
| commit | b20788336286acdfe66529e06b2fcfa513781be7 (patch) | |
| tree | b4e5d74eddd50afc09a00935a34eec95a8b15e34 | |
| parent | ff3facb2614aa3e6641b125710b526f92ba421df (diff) | |
| download | rc-inbox-settings-b20788336286acdfe66529e06b2fcfa513781be7.tar.gz | |
use label for forwarding addr
| -rw-r--r-- | inbox_settings.php | 15 |
1 files 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' => '[email protected]'])); + 'fwd_addr_' . $idx, + 'fwd_addr[' . $idx . ']', + $row[1], + ['placeholder' => '[email protected]'])); $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, |
