diff --git a/html/inc/pm.inc b/html/inc/pm.inc
index 284b049171..969892f0fd 100644
--- a/html/inc/pm.inc
+++ b/html/inc/pm.inc
@@ -83,7 +83,7 @@ function pm_team_form($user, $teamid, $error=null) {
"",
null, '20%'
);
- row2_init(tra("Message")."".bbcode_info()."", "", '20%');
+ row2_init(tra("Message")."".bbcode_info()."", '20%');
start_table();
echo $bbcode_html;
echo "
\n";
@@ -165,7 +165,6 @@ function pm_form($replyto, $userid, $error = null) {
);
row2_init(
tra("Message")."".bbcode_info().pm_rules()."",
- "",
'20%'
);
start_table();
diff --git a/html/inc/team.inc b/html/inc/team.inc
index ea9464c996..84eab9ed65 100644
--- a/html/inc/team.inc
+++ b/html/inc/team.inc
@@ -41,7 +41,7 @@ function team_search_form($params) {
row2(
tra('Key words').' '.tra('Find teams with these words in their names or descriptions').'',
'');
- row2_init(tra('Country'), '');
+ row2_init(tra('Country'));
echo ' |
\n";
+
$x = (!$team || $team->joinable)?"checked":"";
row2(tra("Accept new members?"), "");
// Check if we're using reCaptcha to prevent spam accounts
diff --git a/html/inc/util.inc b/html/inc/util.inc
index 89bf8fc198..16e095655e 100644
--- a/html/inc/util.inc
+++ b/html/inc/util.inc
@@ -518,6 +518,8 @@ define('NAME_ATTRS', 'class="text-right " style="padding-right:12px"');
define('VALUE_ATTRS', 'style="padding-left:12px"');
define('VALUE_ATTRS_ERR', 'class="danger" style="padding-left:12px"');
+// a table row with 2 columns, with the left on right-aligned
+
function row2($x, $y, $show_error=false, $lwidth='40%') {
if ($x==="") $x="
";
if ($y==="") $y="
";
@@ -529,11 +531,15 @@ function row2($x, $y, $show_error=false, $lwidth='40%') {
";
}
-function row2_init($x, $y, $lwidth='40%') {
- echo '
- '.$x.' |
- '.$y.'
- ';
+// output the first part of row2();
+// then write the content, followed by |
+
+function row2_init($x, $lwidth='40%') {
+ echo sprintf('
+ %s |
+ ',
+ $lwidth, NAME_ATTRS, $x, VALUE_ATTRS
+ );
}
function row2_plain($x, $y) {
diff --git a/html/user/account_finish.php b/html/user/account_finish.php
index c8f8f4ab3e..1c78c6df2f 100644
--- a/html/user/account_finish.php
+++ b/html/user/account_finish.php
@@ -42,11 +42,12 @@ row2(
sprintf('', $user->name)
);
row2_init(
- tra("Country")." ".tra("Select the country you want to represent, if any.")."",
- ''
+ tra("Country")." ".tra("Select the country you want to represent, if any.").""
);
+echo '';
echo country_select_options();
echo " |
\n";
+
if (POSTAL_CODE) {
row2(
tra("Postal or ZIP Code")."
".tra("Optional; not shown to others")."",
diff --git a/html/user/forum_post.php b/html/user/forum_post.php
index 4d5890703d..5ca466cca0 100644
--- a/html/user/forum_post.php
+++ b/html/user/forum_post.php
@@ -129,7 +129,7 @@ if ($force_title && $title){
);
}
-row2_init(tra("Message").bbcode_info().post_warning($forum).$body_help, "");
+row2_init(tra("Message").bbcode_info().post_warning($forum).$body_help);
start_table();
echo $bbcode_html;
end_table();
diff --git a/html/user/user_search.php b/html/user/user_search.php
index c5fc0a1d33..c936e4a7e6 100644
--- a/html/user/user_search.php
+++ b/html/user/user_search.php
@@ -53,7 +53,8 @@ function user_search_form() {
tra("User name starts with"),
''
);
- row2_init(tra("Country"), "");
+ row2_init(tra("Country"));
+ echo "";
echo country_select_options("asdf");
echo "";
row2(tra("With profile?"),