From 311308a6d984bbb1ccb11e547d2322f64c508dae Mon Sep 17 00:00:00 2001
From: Moc <github@tijnkuyper.nl>
Date: Tue, 21 Dec 2021 18:00:37 +0100
Subject: [PATCH] Closes #4320 - Use radio_switch() for radio buttons in COPPA
 form

---
 .../shortcodes/batch/signup_shortcodes.php    | 20 +++++++++----------
 1 file changed, 9 insertions(+), 11 deletions(-)

diff --git a/e107_core/shortcodes/batch/signup_shortcodes.php b/e107_core/shortcodes/batch/signup_shortcodes.php
index 19c5bb737..5f7d5ae96 100755
--- a/e107_core/shortcodes/batch/signup_shortcodes.php
+++ b/e107_core/shortcodes/batch/signup_shortcodes.php
@@ -6,14 +6,8 @@
  * Released under the terms and conditions of the
  * GNU General Public License (http://www.gnu.org/licenses/gpl.txt)
  *
- *
- *
- * $URL$
- * $Id$
  */
 
-// Mods to show extended field categories
-
 if (!defined('e107_INIT')) { exit; }
 
 e107::coreLan('signup');
@@ -47,18 +41,22 @@ class signup_shortcodes extends e_shortcode
 		{
 			$class = (!empty($parm['class'])) ? $parm['class'] : 'btn btn-primary button';
 			return "
-			<form method='post' action='".e_SELF."?stage1' autocomplete='off'>\n
-			<div><br />
-			<input type='radio' name='coppa' value='0' id='coppa_no' checked='checked' /> <label class='control-label' for='coppa_no'>".LAN_NO."</label>
-			<input type='radio' name='coppa' value='1' id='coppa_yes' /> <label class='control-label' for='coppa_yes'>".LAN_YES."</label>
+			<form method='post' action='".e_SELF."?stage1' autocomplete='off'>
+			<div>
+			<br />
+			".e107::getForm()->radio_switch("coppa", false, LAN_YES, LAN_NO, array('reverse' => 1))."
 			<br />
 			<br />
 			<input class='".$class."' type='submit' name='newver' value=\"".LAN_CONTINUE."\" />
 			</div></form>
 		";
 		}
-	}
 
+		/*
+			<input type='radio' name='coppa' value='0' id='coppa_no' checked='checked' /> <label class='control-label' for='coppa_no'>".LAN_NO."</label>
+			<input type='radio' name='coppa' value='1' id='coppa_yes' /> <label class='control-label' for='coppa_yes'>".LAN_YES."</label>
+		*/
+	}
 
 
 	function sc_signup_xup($param=null) // show it to those who were using xup