Skip to content

Commit ac704f0

Browse files
CMS-7402 フォーム設定に不備がある場合、管理者用のエラーメッセージを表示する
1 parent b80c6f5 commit ac704f0

File tree

1 file changed

+25
-4
lines changed

1 file changed

+25
-4
lines changed

themes/develop/contact/form/main.twig

Lines changed: 25 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,31 @@
11
{% set form = module('V2_Form') %}
22

33
{% if form.error %}
4-
<!-- フォームID : {{ form.error.formID }} エラー項目 : {{ form.error.fields | join('|') }} -->
5-
<p class="text-gray-900 mb-10">
6-
入力内容をもう一度ご確認ください。
7-
</p>
4+
{% if touch('Touch_SessionWithContribution') %}
5+
<section class="mb-10 bg-red-50 border-t-4 border-red-500 rounded-b text-red-900 py-4 px-3 sm:px-4 shadow-md">
6+
<h2 class="text-lg/normal font-semibold">設定に不備があります</h2>
7+
<p class="mt-4 text-base/normal">
8+
テンプレートに記述しているバリデーターまたはコンバーターと、フォームIDの入力チェックまたは変換の項目が一致していない可能性があります。テンプレートとフォームIDの設定をご確認ください。
9+
</p>
10+
<dl class="text-base/normal mt-4">
11+
<div>
12+
<dt class="inline">
13+
フォームID:
14+
</dt>
15+
<dd class="inline">{{ form.error.formID }}</dd>
16+
</div>
17+
<div>
18+
<dt class="inline">
19+
エラーが発生している項目:
20+
</dt>
21+
<dd class="inline">{{ form.error.fields|join(', ') }}</dd>
22+
</div>
23+
</dl>
24+
<p class="text-sm/normal mt-4">
25+
※このエラーメッセージは投稿者以上の権限を持つユーザーのみに表示されています
26+
</p>
27+
</section>
28+
{% endif %}
829
{% endif %}
930

1031
{% if form.step == 'step' %}

0 commit comments

Comments
 (0)