forked from thorsten/phpMyFAQ
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathadd.twig
More file actions
121 lines (108 loc) · 4.62 KB
/
Copy pathadd.twig
File metadata and controls
121 lines (108 loc) · 4.62 KB
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
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
{% extends 'index.twig' %}
{% block content %}
<section class="col-12">
{% if noCategories == true %}
<div class="alert alert-danger">{{ msgFormDisabledDueToMissingCategories|raw }}</div>
{% else %}
{% if (id1_active == true) or (displayFullForm == true) %}
<h2 class="mb-4 border-bottom">{{ id1_label }}</h2>
{% endif %}
{% if (id2_active == true) or (displayFullForm == true) %}
<p>{{ id2_label|raw }}</p>
{% endif %}
<div class="row mb-2">
<div class="col">
<div class="spinner-border text-primary d-none" id="loader" role="status">
<span class="visually-hidden">Loading...</span>
</div>
<div id="pmf-add-faq-response"></div>
</div>
</div>
<form id="pmf-add-faq-form" action="#" method="post" accept-charset="utf-8" class="needs-validation" novalidate>
<input type="hidden" name="lang" id="lang" value="{{ lang }}">
<input type="hidden" value="{{ openQuestionID }}" id="openQuestionID" name="openQuestionID">
{% if id3_label is defined %}
<div class="row mb-2">
<label class="col-sm-3 form-control-label" for="name">{{ id3_label }}:
{% if id3_required == 'required' %}<span class="pmf-required-asterisk"> *</span>{% endif %}
</label>
<div class="col-sm-9">
<input type="text" class="form-control" name="name" id="name" value="{{ defaultContentName }}" {{ id3_required }}>
</div>
</div>
{% endif %}
{% if id4_label is defined %}
<div class="row mb-2">
<label class="col-sm-3 form-control-label" for="email">{{ id4_label }}:
{% if id4_required == 'required' %}<span class="pmf-required-asterisk"> *</span>{% endif %}
</label>
<div class="col-sm-9">
<input type="email" class="form-control" name="email" id="email" value="{{ defaultContentMail }}" {{ id4_required }}>
</div>
</div>
{% endif %}
{% if (id5_active == true) or (displayFullForm == true) %}
<div class="row mb-2">
<label class="col-sm-3 form-control-label" for="rubrik">{{ id5_label }}:
{% if id5_required == 'required' %}<span class="pmf-required-asterisk"> *</span>{% endif %}
</label>
<div class="col-sm-9">
<select name="rubrik" class="form-control" id="rubrik" multiple="multiple" size="5" {{ id5_required }}>
{% for cat in categories %}
{% set indent = '...' | repeat(cat.indent) %}
<option value="{{ cat.id }}" {% if cat.id == selectedCategory %}selected{% endif %}>
{{ indent }} {{ cat.name }}
</option>
{% endfor %}
</select>
</div>
</div>
{% endif %}
{% if id6_label is defined %}
<div class="row mb-2">
<label class="col-sm-3 form-control-label" for="question">{{ id6_label }}:
{% if id6_required == 'required' %}<span class="pmf-required-asterisk"> *</span>{% endif %}
</label>
<div class="col-sm-9">
<textarea class="form-control" cols="37" rows="3" name="question" id="question" {{ id6_required }} {{ readonly }}>
{{ printQuestion }}</textarea
>
</div>
</div>
{% endif %}
{% if (id7_active == true) or (displayFullForm == true) %}
<div class="row mb-2">
<label class="col-sm-3 form-control-label" for="answer">{{ id7_label }}:
{% if id7_required == 'required' %}<span class="pmf-required-asterisk"> *</span>{% endif %}
</label>
<div class="col-sm-9">
<textarea class="form-control" cols="37" rows="10" name="answer" id="answer" {{ id7_required }}></textarea>
</div>
</div>
{% endif %}
{% if (id8_active == true) or (displayFullForm == true) %}
<div class="row mb-2">
<label class="col-sm-3 form-control-label" for="keywords">{{ id8_label }}:
{% if id8_required == 'required' %}<span class="pmf-required-asterisk"> *</span>{% endif %}
</label>
<div class="col-sm-9">
<input type="text" class="form-control" name="keywords" id="keywords" {{ id8_required }}>
<small class="text-muted">{{ msgSeparateKeywordsWithCommas }}</small>
</div>
</div>
{% endif %}
{{ captchaFieldset|raw }}
<div class="row mb-2">
<div class="col-sm-12 text-end">
<button class="btn btn-primary btn-lg" type="submit" id="pmf-submit-faq" data-pmf-form="add-faq">
{{ msgNewContentSubmit }}
</button>
</div>
</div>
</form>
</section>
{% if enableWysiwygEditor == true %}
<script src="{{ baseHref }}admin/assets/js/editor/tinymce.min.js?{{ currentTimestamp }}"></script>
{% endif %}
{% endif %}
{% endblock %}