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

<xf:form action="{{ link('user-upgrades/edit-active', null, {'user_upgrade_record_id': $activeUpgrade.user_upgrade_record_id}) }}"
	ajax="true" class="block">

	<div class="block-container">
		<div class="block-body">
			<xf:formrow label="{{ phrase('user_name') }}">{$activeUpgrade.User.username}</xf:formrow>

			<xf:formrow label="{{ phrase('upgrade_title') }}">{$activeUpgrade.Upgrade.title}</xf:formrow>

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

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