-
Notifications
You must be signed in to change notification settings - Fork 3
/
confirm.ctp
79 lines (64 loc) · 2.5 KB
/
confirm.ctp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
<?php
/**
* questionnaire page setting view template
*
* @author Noriko Arai <arai@nii.ac.jp>
* @author Allcreator <info@allcreator.net>
* @link http://www.netcommons.org NetCommons Project
* @license http://www.netcommons.org/license.txt NetCommons License
* @copyright Copyright 2014, NetCommons Project
*/
?>
<?php echo $this->element('Questionnaires.scripts'); ?>
<article id="nc-questionnaires-confirm"
ng-controller="QuestionnairesAnswer">
<?php echo $this->element('Questionnaires.Answers/answer_header'); ?>
<?php echo $this->element('Questionnaires.Answers/answer_test_mode_header'); ?>
<p>
<?php echo __d('questionnaires', 'Please confirm your answers.'); ?>
</p>
<?php echo $this->NetCommonsForm->create('QuestionnaireAnswer'); ?>
<?php echo $this->NetCommonsForm->hidden('Frame.id'); ?>
<?php echo $this->NetCommonsForm->hidden('Block.id'); ?>
<?php echo $this->NetCommonsForm->hidden('Questionnaire.id', array('value' => $questionnaire['Questionnaire']['id'])); ?>
<?php foreach($questionnaire['QuestionnairePage'] as $pIndex => $page): ?>
<?php foreach($page['QuestionnaireQuestion'] as $qIndex => $question): ?>
<?php if (isset($answers[$question['key']])): ?>
<?php if ($question['is_require'] == QuestionnairesComponent::REQUIRES_REQUIRE): ?>
<div class="pull-left">
<?php echo $this->element('NetCommons.required'); ?>
</div>
<?php endif ?>
<label>
<?php echo h($question['question_value']); ?>
</label>
<p class="help-block clearfix">
<?php echo $question['description']; ?>
</p>
<div class="well form-control-static">
<div class="form-group">
<?php echo $this->QuestionnaireAnswer->answer($question, true); ?>
</div>
</div>
<?php endif ?>
<?php endforeach; ?>
<?php endforeach; ?>
<div class="text-center">
<a class="btn btn-default" href="<?php echo $this->NetCommonsHtml->url(array(
'controller' => 'questionnaire_answers',
'action' => 'view',
'block_id' => Current::read('Block.id'),
'key' => $questionnaire['Questionnaire']['key'],
'frame_id' => Current::read('Frame.id'))); ?>">
<span class="glyphicon glyphicon-chevron-left"></span>
<?php echo __d('questionnaires', 'Start over'); ?>
</a>
<?php echo $this->NetCommonsForm->button(
__d('net_commons', 'Confirm'),
array(
'class' => 'btn btn-primary',
'name' => 'confirm_' . 'questionnaire',
)) ?>
</div>
<?php echo $this->NetCommonsForm->end(); ?>
</article>