-
Notifications
You must be signed in to change notification settings - Fork 988
/
editQuestionTopbarRight_view.php
98 lines (93 loc) · 2.96 KB
/
editQuestionTopbarRight_view.php
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
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
<?php /* Ported from previous versions: Pending to adapt to screen own JS for saving (and validations)
<!-- Save and new group -->
<?php if(!empty($showSaveAndNewGroupButton)): ?>
<a class="btn btn-outline-secondary" id='save-and-new-button' role="button">
<span class="ri-add-box-fill"></span>
<?php eT("Save and new group"); ?>
</a>
<?php endif; ?>
<!-- Save and add question -->
<?php if(!empty($showSaveAndNewQuestionButton)): ?>
<a class="btn btn-outline-secondary" id='save-and-new-question-button' role="button">
<span class="ri-add-line"></span>
<?php eT("Save and add question"); ?>
</a>
<?php endif; ?>
*/ ?>
<!-- Close -->
<?php if(!empty($showCloseButton)): ?>
<?php if (!empty($oQuestion->qid)): ?>
<?php
$this->widget(
'ext.ButtonWidget.ButtonWidget',
[
'name' => 'close-button',
'text' => gT("Close"),
'icon' => 'ri-close-fill',
'link' => '#',
'htmlOptions' => [
'class' => 'btn btn-outline-secondary',
'role' => 'button',
'onclick' => "LS.questionEditor.showOverview(); return false;",
],
]
);
?>
<?php else: ?>
<?php
$this->widget(
'ext.ButtonWidget.ButtonWidget',
[
'name' => 'close-button',
'text' => gT("Close"),
'icon' => 'ri-close-fill',
'link' => $closeUrl,
'htmlOptions' => [
'class' => 'btn btn-outline-secondary',
'role' => 'button',
],
]
);
?>
<?php endif; ?>
<?php endif;?>
<!-- Save and close -->
<?php if(!empty($showSaveAndCloseButton)): ?>
<?php
$this->widget(
'ext.ButtonWidget.ButtonWidget',
[
'id' => 'save-and-close-button-create-question',
'name' => 'save-and-close-button-create-question',
'text' => gT('Save and close'),
'icon' => 'ri-checkbox-fill',
'htmlOptions' => [
'class' => 'btn btn-outline-secondary',
'onclick' => "return LS.questionEditor.checkIfSaveIsValid(event, 'overview');"
],
]
);
?>
<?php endif; ?>
<!-- Save -->
<?php if(!empty($showSaveButton)): ?>
<?php
$htmlOptions = [
'class' => 'btn btn-primary',
'onclick' => "return LS.questionEditor.checkIfSaveIsValid(event, 'editor');"
];
if ($oQuestion->qid !== 0) {
$htmlOptions['data-save-with-ajax'] = "true";
}
$this->widget(
'ext.ButtonWidget.ButtonWidget',
[
'id' => 'save-button-create-question',
'name' => 'save-button-create-question',
'text' => gT('Save'),
'icon' => 'ri-check-fill',
'htmlOptions' => $htmlOptions,
]
);
?>
<?php endif; ?>