<div style="display: grid; place-items: center;">
	<fieldset style="display: inline-block;">
		<legend><?php echo GetString("AutoLoadExternalContent");?></legend>
		<input type="radio" name="external-content" id="external-content-yes" onchange="InitSettingExternalContent('true');"><label for="external-content-yes"><?php echo GetString("AutoLoadExternalContentYes");?></label><br><input type="radio" name="external-content" id="external-content-no" onchange="InitSettingExternalContent('false');"><label for="external-content-no"><?php echo GetString("AutoLoadExternalContentNo");?></label>
	</fieldset>
</div>

<script>
	"use strict";

	function InitSettingExternalContent(setting)
	{
		if (setting)
		{
			if (setting === 'true')
				localStorage.setItem('LoadExternalContent', 'true');
			else
				localStorage.removeItem('LoadExternalContent');
		}

		setting = localStorage.getItem('LoadExternalContent');
		document.getElementById('external-content-yes').checked = (setting === 'true');
		document.getElementById('external-content-no').checked = !(setting === 'true');
	}

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