Skip to content

Commit cca43c8

Browse files
committed
fix: Show missing description on form list
1 parent dfd9bd0 commit cca43c8

File tree

2 files changed

+47
-28
lines changed

2 files changed

+47
-28
lines changed

src/CustomForm.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -286,5 +286,5 @@ function listCustomForm()
286286
$context['page_title'] = !empty($modSettings['customform_view_title'])
287287
? $modSettings['customform_view_title']
288288
: $txt['customform_tabheader'];
289-
$context['customform_view_text'] = $modSettings['customform_view_text'] ?? '';
289+
$context['page_message'] = $modSettings['customform_view_text'] ?? '';
290290
}

src/CustomForm.template.php

+46-27
Original file line numberDiff line numberDiff line change
@@ -15,27 +15,43 @@ function template_main_above()
1515
global $context, $scripturl;
1616

1717
echo '
18-
<style>
19-
li.padding
20-
{
21-
padding: 0.4em 0.7em !important;
22-
}
23-
li.padding a
24-
{
25-
font-size: 1.1em;
26-
}
27-
li.padding div.d
28-
{
29-
font-style: italic;
30-
opacity: 0.4;
31-
padding: 0.4em 0.7em;
32-
}
33-
</style>
34-
<div class="cat_bar">
35-
<h3 class="catbg">
36-
', $context['page_title'], '
37-
</h3>
38-
</div>
18+
<style>
19+
ul.reset, ul.reset li
20+
{
21+
padding: 0;
22+
margin: 0;
23+
list-style: none;
24+
}
25+
.reset li:not(:last-child)
26+
{
27+
padding-bottom: 0.5em;
28+
}
29+
.reset a
30+
{
31+
font-size: 1.1em;
32+
}
33+
li.padding div.d
34+
{
35+
font-style: italic;
36+
opacity: 0.4;
37+
padding: 0.4em 0.7em;
38+
}
39+
</style>
40+
<div class="cat_bar">
41+
<h3 class="catbg">
42+
', $context['page_title'], '
43+
</h3>
44+
</div>';
45+
46+
if (!empty($context['page_message']))
47+
echo '
48+
<div class="information noup">'
49+
, $context['page_message'], '
50+
</div>';
51+
52+
echo '
53+
<div class="windowbg noup">
54+
<span class="topslice"><span></span></span>
3955
<ul class="reset">';
4056
}
4157

@@ -45,11 +61,8 @@ function template_main(): void
4561

4662
foreach ($context['forms'] as [$id_form, $title, $description])
4763
{
48-
$col = empty($col) ? 2 : '';
49-
$color_class = 'windowbg' . $col;
50-
5164
echo '
52-
<li class="padding ', $color_class, '">
65+
<li>
5366
<a href="' . $scripturl . '?action=form;n=' . $id_form . '">' . $title . '</a>';
5467

5568
if (!empty($description))
@@ -64,7 +77,9 @@ function template_main(): void
6477
function template_main_below(): void
6578
{
6679
echo '
67-
</ul>';
80+
</ul>
81+
<span class="botslice"><span></span></span>
82+
</div>';
6883
}
6984

7085
function template_form_above(): void
@@ -82,6 +97,10 @@ function template_form_above(): void
8297
{
8398
grid-column: span 2;
8499
}
100+
.main_section, .lower_padding
101+
{
102+
padding-bottom: 0.5em;
103+
}
85104
</style>
86105
<form action="', $scripturl, '?action=form" method="post" accept-charset="', $context['character_set'], '" enctype="multipart/form-data">
87106
<div class="cat_bar">
@@ -90,7 +109,7 @@ function template_form_above(): void
90109
</h3>
91110
</div>
92111
<span class="upperframe"><span></span></span>
93-
<div class="roundframe">';
112+
<div class="roundframe noup">';
94113
}
95114

96115
function template_errors_above(): void

0 commit comments

Comments
 (0)