<xf:title>{{ phrase('manually_upgrade_user') }}</xf:title>

<xf:form action="{{ link('user-upgrades/manual', $upgrade) }}" ajax="true" class="block">
	<div class="block-container">
		<div class="block-body">
			<xf:textboxrow name="username" ac="single"
				label="{{ phrase('user_name') }}" />

			<xf:formrow label="{{ phrase('upgrade_to_apply') }}">{$upgrade.title}</xf:formrow>

			<xf:comment><xf:dateinputrow name="end_date" value="{{ !$endDate ?: date($endDate, 'picker') }}"
				label="{{ phrase('upgrade_ends') }}" /></xf:comment>

			<xf:radiorow name="end_type"
				label="{{ phrase('upgrade_ends') }}">

				<xf:option value="permanent" selected="!{$endDate}">{{ phrase('permanent') }}</xf:option>
				<xf:option value="date" selected="{$endDate}" label="{{ phrase('date:') }}">
					<xf:dateinput name="end_date" value="{{ $endDate ? date($endDate, 'picker') : date($xf.time, 'picker') }}" />
				</xf:option>
			</xf:radiorow>
		</div>
		<xf:submitrow submit="{{ phrase('upgrade') }}" />
	</div>
</xf:form>