<div class="modal fade" id="edit-modal-poll" tabindex="-1" role="dialog" aria-labelledby="edit-modal-label">
	<div class="modal-dialog" role="document">
		<div class="modal-content">
			<div class="modal-header">
				<h5 class="modal-title" id="edit-modal-label"><txt name="quiz:polls-surveys:polls:edit_live">You're about to edit a live Poll</txt></h5>
				<button type="button" class="close" data-dismiss="modal" aria-label="Cancel">
					<ion-icon name="close-outline"></ion-icon>
				</button>
			</div>
			<div class="modal-body">
				<div class="alert alert-danger">
					<p>
						<strong>
							<txt name="quiz:polls-surveys:polls:edit_live_text">
								Editing a Live Poll will change its status to Draft, cancel any in-progress user attempts and may skew the results of completed attempts.
							</txt>
						</strong>
					</p>
				</div>

				<p>
					<txt name="quiz:polls-surveys:polls:edit_live_confirm">Are you sure you want to edit this Poll?</txt>
				</p>

				<p>
					<span class="js-loading-spinner"><img src="/images/default/icons/loading.gif" width="16" height="16" alt="" />
						<txt name="quiz:polls-surveys:checking_users">_Checking for attempts in progress...</txt>
					</span>
					<strong>
						<span class="js-edit-modal-attempt-count" style="display:none">
							<txt name="quiz:polls-surveys:polls:no_users">No users are currently taking the Poll, but editing it can still skew its statistics</txt>.
						</span>
					</strong>
				</p>

				<script type="text/template" class="js-edit-modal-attempts-template">
					<ul>
						{{ _.each(attempts, function (attempt) { }}
						<li>
							{{ if (attempt.user_id == 0) { }}
							<span>{{= attempt.user.name }}</span>
							{{ } else { }}
							<a href="{{= attempt.user.url }}">{{= attempt.user.name }}</a>
							{{ } }}
						</li>
						{{ }); }}
						{{ if (total > attempts.length) { }}
						<li>
							{{= lmsg('quiz.admin.edit_live_quiz_attempts_others', total - attempts.length) }}...
						</li>
						{{ } }}
					</ul>
				</script>

				<div class="js-edit-modal-attempts"></div>
			</div>

			<div class="modal-footer">
				<a href="#" class="btn btn-secondary" data-dismiss="modal"><txt name="quiz:button:cancel">Cancel</txt></a>
				<a href="/quiz/${quiz_id}/review" class="btn btn-primary js-edit-anyway"><txt name="quiz:admin:edit_anyway">Edit anyway</txt></a>
			</div>
		</div>
	</div>
</div>
