import(common.tpl)

.settings input[type="text"]|value = <?php 
	$_setting = '@@__name:\[(.*)\]__@@';
	echo htmlspecialchars($_POST['settings'][$_setting] ?? Vvveb\getSetting('captcha', $_setting, null) ?? '@@__value__@@');
	//name="turnstile[setting-name] > get only setting-name
?>

.settings input[type="number"]|value = <?php 
	$_setting = '@@__name:\[(.*)\]__@@';
	echo htmlspecialchars($_POST['settings'][$_setting]  ?? Vvveb\getSetting('captcha',$_setting, null) ?? '@@__value__@@');
	//name="turnstile[setting-name] > get only setting-name
?>

.settings select|before = <?php 
	$_select = '@@__name:\[(.*)\]__@@';
?>

.settings select option|addNewAttribute = <?php 
	if (isset($_select)) {
		$_value = '@@__value__@@';

		if ((isset($_POST['settings'][$_select]) && ($_POST['settings'][$_select] == $_value)) ||
			(empty($_POST['settings']) && (Vvveb\getSetting('captcha', $_select, null) == $_value))) { 
			echo 'selected';
		}
	}
?>
