<p class="grey m-0"><?php echo __( 'Recurring Campaign', 'thrive-ult' ) ?></p>
<p><?php echo __( 'Tell us when you would like the new offer to start and how many days the campaign should last for', 'thrive-ult' ) ?></p>
<div class="tvd-row tvd-collapse">
	<div class="tvd-col tvd-s12 tvd-m4">
		<div class="tvd-input-field tvd-timepicker-left">
			<input id="tvu-start-date" type="text" class="tvd-no-focus tvd-no-margin-bottom" value="<#= settings.start && settings.start.date ? settings.start.date : '' #>" data-field="start_date">
			<label <#= settings.start ? 'class="tvd-active"' : '' #> for="tvu-start-date"><?php echo __( 'Start date', 'thrive-ult' ) ?></label>
		</div>
	</div>
	<div class="tvd-col tvd-s12 tvd-m4">
		<div class="tvd-input-field timepicker-append-to">
			<input id="tvu-start-hour" type="text" class="tvd-no-focus tvd-no-margin-bottom" value="<#= settings.start && settings.start.time ?  settings.start.time : '' #>" data-field="start_time">
			<label <#= settings.start ? 'class="tvd-active"' : '' #> for="tvu-start-hour"><?php echo __( 'Start hour', 'thrive-ult' ) ?></label>
		</div>
	</div>
	<div class="tvd-col tvd-s12 tvd-m4">
		<div class="tvd-input-field tvu-no-margin-select">
			<select name="" id="tvu-select-recurrence-change" class="tvu-campaign-recurrence" data-field="recurrence">
				<option value="daily"
				<#= item.get('rolling_type') == 'daily' ? 'selected' : '' #>><?php echo __( 'Daily', 'thrive-ult' ) ?></option>
				<option value="weekly"
				<#= item.get('rolling_type') == 'weekly' ? 'selected' : '' #>><?php echo __( 'Weekly', 'thrive-ult' ) ?></option>
				<option value="monthly"
				<#= item.get('rolling_type') == 'monthly' ? 'selected' : '' #>><?php echo __( 'Monthly', 'thrive-ult' ) ?></option>
				<option value="yearly"
				<#= item.get('rolling_type') == 'yearly' ? 'selected' : '' #>><?php echo __( 'Yearly', 'thrive-ult' ) ?></option>
			</select>
			<label for="tvu-select-recurrence-change"><?php echo __( 'Repeats', 'thrive-ult' ) ?></label>
		</div>
	</div>
</div>
<div class="tvd-v-spacer"></div>
<div id="tvu-rolling-options"></div>
<div class="tvd-row tvd-collapse">
	<div class="tvd-col tvd-s12">
		<p class="tvd-no-margin"><?php echo __( "Ends:", 'thrive-ult' ); ?> </p>
	</div>
	<div class="tvd-col tvd-s6 tvd-m2">
		<p class="tvu-align-radio">
			<input class="" name="ends" type="radio" value="never" id="tve-rolling-end-never" <#= settings.end === null ? 'checked' : '' #> />
			<label for="tve-rolling-end-never"><?php echo __( "Never", 'thrive-ult' ); ?></label>
		</p>
	</div>
	<div class="tvd-col tvd-s6 tvd-m4">
		<div class="tvd-row">
			<div class="tvd-col tvd-s2">
				<p>
					<input class="" name="ends" type="radio" value="after" id="tve-rolling-end-after" <#= settings.end && settings.end.length < 4 ? 'checked' : '' #>/>
					<label for="tve-rolling-end-after"></label>
				</p>
			</div>
			<div class="tvd-col tvd-s10">
				<div class="tvd-input-field">
					<input class="tvd-no-margin-bottom" id="tvu-rolling-end-after-in" type="text" value="<#= settings.end && settings.end.length < 4 ? settings.end : '' #>" data-field="occurrences_number" maxlength="4">
					<label <#= settings.end && settings.end.length < 4 ? 'class="tvd-active"' : '' #> for="tvu-rolling-end-after-in" class="tve_text"><?php echo __( 'After (occurrences)', 'thrive-ult' ) ?></label>
				</div>
			</div>
		</div>
	</div>
	<div class="tvd-col tvd-s6 tvd-m4">
		<div class="tvd-row">
			<div class="tvd-col tvd-s2">
				<p>
					<input class="" name="ends" type="radio" value="date" id="tve-rolling-end-on" <#= settings.end !== null && typeof settings.end === 'object' ? 'checked' : '' #> />
					<label for="tve-rolling-end-on"></label>
				</p>
			</div>
			<div class="tvd-col tvd-s10">
				<div class="tvd-input-field">
					<input id="tvu-end-date" type="text" class="tvd-no-focus tvd-no-margin-bottom" value="<#= settings.end !== null && typeof settings.end === 'object' && settings.end.date ? settings.end.date : '' #>" data-field="end_date">
					<label <#= settings.end && settings.end.length > 4 ? 'class="tvd-active"' : '' #> for="tvu-end-date"><?php echo __( 'On', 'thrive-ult' ) ?></label>
				</div>
			</div>
		</div>
	</div>
	<div class="tvd-col tvd-s6 tvd-m2">
		<div class="tvd-input-field timepicker-append-to">
			<input id="tvu-end-hour" type="text" class="tvd-no-focus tvd-no-margin-bottom" value="<#= settings.end !== null && typeof settings.end === 'object' && settings.end.time ?  settings.end.time : '' #>" data-field="end_time">
			<label <#= settings.end ? 'class="tvd-active"' : '' #> for="tvu-end-hour"><?php echo __( 'End hour', 'thrive-ult' ) ?></label>
		</div>
	</div>
</div>

<div>
	<h4><?php echo __( 'Description', 'thrive-ult' ) ?></h4>
	<p><?php echo __( 'This campaign will repeat every', 'thrive-ult' ) ?> <span class="tvu-campaign-rolling-repeat"></span> <span class="tvu-campaign-rolling-day">on </span></p>
</div>
<div>
	<p style="font-style: italic;"><?php echo __( 'Your current timezone settings are: ', 'thrive-ult' ) ?> <strong class="tu-timezone"><#= ThriveUlt.globals.settings.get('timezone') ? ThriveUlt.globals.settings.get('timezone') : '<?php __( 'Not Set', 'thrive-ult' ) ?>' #></strong>. <?php echo __( 'Local time is ', 'thrive-ult' ) ?> <strong
				class="tu-time"><?php echo tve_ult_current_time( 'Y-m-d H:i' ); ?></strong>, <?php echo __( 'see ', 'thrive-ult' ) ?><?php echo __( ' Date & Time Settings', 'thrive-ult' ) ?></p>
</div>
