Skip to content

Commit 4e1d5b7

Browse files
committed
Add empty row and document the need for even rows
Without this, plugin-specific config sections headers may not have the expected background color due to the alternate-rows CSS.
1 parent 70d4b45 commit 4e1d5b7

File tree

2 files changed

+11
-1
lines changed

2 files changed

+11
-1
lines changed

Source/MantisSourcePlugin.class.php

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,12 @@ public function update_repo( $p_repo ) {}
109109

110110
/**
111111
* Output form elements for configuration options.
112-
* The first div should have class 'spacer'
112+
*
113+
* They are displayed at the bottom of the plugin's config page
114+
* (see manage_config_page.php). The first row should have class 'spacer',
115+
* and the function should output an even number of rows (including the
116+
* spacer row), to ensure that the VCS-specific section always start on an
117+
* even row (i.e. with white background). Add an empty row if needed.
113118
*/
114119
public function update_config_form() {}
115120

Source/pages/manage_config_page.php

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -308,6 +308,11 @@
308308
</td>
309309
</tr>
310310

311+
<?php
312+
# Add an empty row `<tr></tr>` here as needed, to ensure that any VCS-specific
313+
# config starts on an even row (i.e. with white background) for better display.
314+
?>
315+
<tr></tr>
311316
<?php
312317
foreach( SourceVCS::all() as $t_type => $t_vcs ) {
313318
if ( $t_vcs->configuration ) {

0 commit comments

Comments
 (0)