<div style="display: grid; place-items: center;">
	<fieldset style="display: inline-block;">
		<legend><?php echo GetString("AllowStats");?></legend>
		<input type="radio" name="stats" id="stats-yes" onchange="InitSettingStats('noskip');"><label for="stats-yes"><?php echo GetString("AllowStatsYes");?></label><br><input type="radio" name="stats" id="stats-no" onchange="InitSettingStats('skip');"><label for="stats-no"><?php echo GetString("AllowStatsNo");?></label>
	</fieldset>
</div>

<script>
	"use strict";

	function InitSettingStats(setting)
	{
		if (setting)
		{
			if (setting === 'skip')
				localStorage.setItem('InitStats', 'skip');
			else
				localStorage.removeItem('InitStats');
		}

		setting = localStorage.getItem('InitStats');
		document.getElementById('stats-yes').checked = !(setting === 'skip');
		document.getElementById('stats-no').checked = (setting === 'skip');
	}

	document.addEventListener('DOMContentLoaded', function() { InitSettingStats(); });
</script>
