<?php
	$license_found = $this->toolkit->systemConfig->get('License', 'Intechnic');

	$license_source = $this->GetVar('license_source');
	if ( ($license_source === false) && $license_found ) {
		$license_source = 3;
	}

	if ( !$license_found && (!$license_source || $license_source == 3) ) {
		// when disabled option is selected -> select 1st available - open source
		$license_source = 4;
	}
?>


<tr class="table-color2">
	<td class="text">
		<input type="radio" name="license_source" id="license_source_4" value="4"<?php if ($license_source == 4) echo ' checked'; ?>><label for="license_source_4">GPL / Open Source License (<a href="http://www.in-portal.org/license" target="_blank">http://www.in-portal.org/license</a>)</label>
	</td>
</tr>

<tr class="table-color2">
	<td class="text">
		<input type="radio" name="license_source" id="license_source_2" value="2"<?php if ($license_source == 2) echo ' checked'; ?>><label for="license_source_2">Upload License File:</label>
		<input type="file" class="button" name="license_file" onclick="document.getElementById('license_source_2').checked = true;">
	</td>
</tr>
<!--
<tr class="table-color2">
	<td class="text">
		<input type="radio" name="license_source" id="license_source_1" value="1"<?php if ($license_source == 1) echo ' checked'; ?>><label for="license_source_1">Download from Intechnic Servers</label>
	</td>
</tr>
-->
<tr class="table-color2">
	<?php

	?>
	<td class="text">
		<input <?php if (!$license_found) echo 'disabled="disabled"'; ?> type="radio" name="license_source" id="license_source_3" value="3"<?php if ($license_source == 3) echo ' checked'; ?>><label for="license_source_3">Use Existing License</label>
	</td>
</tr>
