Allow other attributes to be added to message list buttons
[squirrelmail.git] / templates / default / message_list_controls.tpl
index 038a18a7d206e6220489aae7bf8f7efbe8091194..714230214d954a107bcbdedf379ab68b97c43e62 100644 (file)
@@ -86,12 +86,24 @@ extract($t);
             switch ($widget_attrs['type']) {
             case 'submit':
                 if ($widget_name != 'moveButton' && $widget_name != 'copyButton' && $widget_name != 'delete' && $widget_name != 'undeleteButton') { // add these later in another table cell
             switch ($widget_attrs['type']) {
             case 'submit':
                 if ($widget_name != 'moveButton' && $widget_name != 'copyButton' && $widget_name != 'delete' && $widget_name != 'undeleteButton') { // add these later in another table cell
-                    echo '<input type="submit" name="' . $widget_name . '" value="' . $widget_attrs['value'] . '" class="message_control_button" />&nbsp;';
+                    echo '<input type="submit" name="' . $widget_name . '" value="' . $widget_attrs['value'] . '" class="message_control_button"';
+                    if (!empty($widget_attrs['extra_attrs'])) {
+                        foreach ($widget_attrs['extra_attrs'] as $attr => $val) {
+                            echo ' ' . $attr . '="' . $val . '"';
+                        }
+                    }
+                    echo ' />&nbsp;';
                 }
                 break;
             case 'checkbox':
                 if ($widget_name != 'bypass_trash') {
                 }
                 break;
             case 'checkbox':
                 if ($widget_name != 'bypass_trash') {
-                    echo '<input type="checkbox" name="' . $widget_name . '" id="' . $widget_name . '" /><label for="' . $widget_name . '">' . $widget_attrs['value'] . '</label>&nbsp;';
+                    echo '<input type="checkbox" name="' . $widget_name . '" id="' . $widget_name . '"';
+                    if (!empty($widget_attrs['extra_attrs'])) {
+                        foreach ($widget_attrs['extra_attrs'] as $attr => $val) {
+                            echo ' ' . $attr . '="' . $val . '"';
+                        }
+                    }
+                    echo ' /><label for="' . $widget_name . '">' . $widget_attrs['value'] . '</label>&nbsp;';
                 }
                 break;
             case 'hidden':
                 }
                 break;
             case 'hidden':