<div class="row">
	<div class="col-sm-12" ng-if="can_view_results">
		<div class="row">
			<div class="col-md-10">
				<h3 class="quiz-title title"><a ng-bind="content.title" href="/polls-surveys/survey/{{ survey_id }}" target="_self">[Product Feedback]</a></h3>
				<p name="question-description" class="question-description" ng-bind-html="content.description">[Description]</p>
				<p ng-show="content.created_by"><strong><txt lmsg="quiz.info.author">Creator</txt>:&nbsp;</strong><a href="{{content.created_by.url}}"><span ng-bind="content.created_by.name"></span></a></p>
				<p ng-show="content.start_date"><strong>Start Date:&nbsp;</strong><span>{{content.start_date}}</span></p>
				<p ng-show="content.end_date"><strong>End Date:&nbsp;</strong><span>{{content.end_date}}</span></p>
				<p ng-show="attempts.sent_to">
					<strong>Sent to:&nbsp;</strong>
					<span ng-bind="attempts.sent_to">[0]</span> users
				</p>
				<p ng-show="attempts.total">
					<strong><txt lmsg="quiz.survey.info.responses">Responded</txt>:&nbsp;</strong>
					<span ng-bind="attempts.total">[0]</span> {{attempts.total > 1 ? 'users': 'user'}}
				</p>
			</div>
			<div class="col-md-2">
				<div class="float-right">
					<cla-share canonical_url="{{content.canonicalUrl}}"></cla-share>
				</div>
			</div>
		</div>

		<div class="page-actions">
			<div class="row mb-3">
				<div class="col-md-2">
					<select name="result" class="form-control" ng-model="result_page_data" ng-options="item.name for item in result_page" ng-change="resultTypeChanged(result_page_data.value)"></select>
				</div>
				<div class="col-md-8">
					<select class="form-control" name="selected_user" ng-model="attempts.selected" ng-options="item.user.name_date for item in attempts.attempts" ng-change="getAttempt(attempts.selected.id)"></select>
				</div>
				<div class="col-md-2">
					<div class="float-right">
						<a href="/polls-surveys/survey/{{ survey_id }}/results/csv/{{ attempts.selected.id }}/" class="btn btn-secondary">
							<ion-icon name="document-outline"></ion-icon>
							<loc lmsg="quiz.statistics.export_to_csv">[Export to CSV]</loc>
						</a>
					</div>
				</div>
			</div>

			<!-- Individual -->
			<div ng-repeat="section in content.sections">
				<h4 class="mt-3" ng-bind="section.title">[title]</h4>
				<p ng-bind-html="section.description">[description]</p>

				<div ng-repeat="question in section.questions">
					<div class="mt-2 section.title question-title-wrap row mb-3">
						<div class="col-md-12">
							<h5 class="title"><strong ng-bind-html="question.text"></strong><span ng-if="question.is_mandatory" class="question-required"> *</span></h5>
							<p name="question-description" class="question-description" ng-bind-html="question.description">[Description]</p>
							<p ng-if="question.img.length > 0">
								<img ng-src="{{question.img}}">
							</p>

							<div ng-if="!isIE">
							<cla-picker-group multiselectable="false">
								<cla-item ng-if="question.type === 0" orientate="vertical" ng-repeat="option in question.options" disabled="true">
									<cla-label hidden="true">{{ option.text }}</cla-label>
									<clang-picker  size="large" block="block" name="{{question.id}}" value="{{option.id}}" ng-checked="isAnswer(question.id, option.id)" disabled="true"></clang-picker>
								</cla-item>
							</cla-picker-group>
							</div>

							<!-- IS IE OR EDGE -->
							<div ng-if="question.type === 0 && isIE" ng-repeat="option in question.options">
								<p class="ie-input-result" name="{{question.id}}" value="{{option.id}}" ng-checked="isAnswer(question.id, option.id)" >{{ option.text }}</p>
							</div>

							<div ng-if="!isIE">
							<cla-picker-group multiselectable="true">
								<cla-item ng-if="question.type === 1" orientate="vertical" ng-repeat="option in question.options" class="w-md-50">
									<cla-label hidden="true">{{ option.text }}</cla-label>
									<clang-picker size="large" block="block" name="{{question.id}}" value="{{option.id}}" ng-checked="isAnswer(question.id, option.id)" disabled="true"></clang-picker>
								</cla-item>
							</cla-picker-group>
							</div>

							<!-- IS IE OR EDGE -->
							<div ng-if="question.type === 1 && isIE" ng-repeat="option in question.options">
								<p class="ie-input-result" name="{{question.id}}" value="{{option.id}}" ng-checked="isAnswer(question.id, option.id)" >{{ option.text }}</p>
							</div>

							<div ng-if="question.type === 3" ng-repeat="option in question.options">
								<input type="text" class="form-control w-md-50" name="{{question.id}}" ng-value="isTextAnswer(question.id)" disabled="true">
							</div>

							<div ng-if="!isIE">
							<cla-picker-group multiselectable="false">
								<cla-item ng-if="question.type === 4" ng-repeat="option in question.options" disabled="true">
									<cla-label hidden="true">{{ option.text }}</cla-label>
									<clang-picker size="large" name="{{question.id}}" value="{{option.id}}" ng-checked="isAnswer(question.id, option.id)" disabled="true"></clang-picker>
								</cla-item>
							</cla-picker-group>
							</div>

							<!-- IS IE OR EDGE -->
							<div ng-if="question.type === 4 && isIE" ng-repeat="option in question.options">
								<p class="ie-input-result" name="{{question.id}}" value="{{option.id}}" ng-checked="isAnswer(question.id, option.id)" >{{ option.text }}</p>
							</div>

							<div ng-if="question.type === 5" ng-repeat="option in question.options">
								<textarea class="form-control w-md-75" name="{{question.id}}" disabled>{{isTextAnswer(question.id)}}</textarea>
							</div>
						</div>
					</div>
				</div>
			</div>

			<br>

			<a href="/polls-surveys" class="btn btn-primary">
				<txt lmsg="quiz.survey.info.done">[Done]</txt>
			</a>
			<a href="#/results" ng-if="results.show_results === '2' || results.manage" class="btn btn-next-question btn-primary mb-3 mt-3" lmsg="quiz.button.next">View results</a>
		</div>
	</div>
</div>
