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" /> ';
+ 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 ' /> ';
}
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> ';
+ 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> ';
}
break;
case 'hidden':