Skip to content

Commit 9146ea5

Browse files
committed
fix(form): better theme compatibility, UI enhancement
1 parent 3cf3e4e commit 9146ea5

File tree

2 files changed

+17
-7
lines changed

2 files changed

+17
-7
lines changed

css/styles.scss

Lines changed: 15 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,7 @@
105105

106106
> .plugin_formcreator_section {
107107
line-height: 32px;
108-
background: #CCC;
108+
background-color: var(--table-head-bg);
109109
padding-bottom: 1px;
110110
display: flex;
111111
flex-wrap: wrap;
@@ -118,6 +118,7 @@
118118
text-overflow: ellipsis;
119119
flex: 1;
120120
margin: 5px 0 0 5px;
121+
color: inherit;
121122
}
122123
}
123124
}
@@ -149,9 +150,13 @@
149150
padding-left: 16px;
150151
padding-right: 10px;
151152
margin: 0 2px;
152-
background: #F0F0F0;
153+
background-color: var(--light-mix);
153154
display: flex;
154155
align-items: center;
156+
157+
> i {
158+
min-width: 14px;
159+
}
155160
}
156161

157162
.grid-stack-item .grid-stack-item-content a[data-field=name] {
@@ -175,10 +180,14 @@
175180
}
176181

177182
.plugin_formcreator_question {
178-
background: #F0F0F0;
183+
background-color: var(--tabs-active-bg);
179184
margin: 5px 2px;
180185
padding-left: 15px;
181186
flex: 1;
187+
188+
a {
189+
color: inherit;
190+
}
182191
}
183192

184193
/* actions on sections or questions */
@@ -350,7 +359,7 @@ form#plugin_formcreator_form {
350359
}
351360
#plugin_formcreator_form .form-group > .help-block {
352361
font-size: 0.8em;
353-
color: #333;
362+
color: var(--text-muted);
354363
padding: 3px 0;
355364

356365
p {
@@ -996,7 +1005,8 @@ a.plugin_formcreator_formTile_title {
9961005
/* Count of conditions in design view */
9971006
.plugin_formcreator_conditions_count {
9981007
border-radius: 50%;
999-
background-color: #FFF;
1008+
background-color: var(--contrast-dark);
1009+
color: var(--contrast-light);
10001010
min-width: 18px;
10011011
height: 18px;
10021012
text-align: center;

inc/question.class.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -250,13 +250,13 @@ public function getDesignHtml() : string {
250250
$html .= "</span>";
251251

252252
// Toggle mandatory for the question
253+
$html .= "<span class='form_control pointer'>";
253254
if ($fieldType::canRequire()) {
254-
$html .= "<span class='form_control pointer'>";
255255
$required = ($this->fields['required'] == '0') ? 'far fa-circle' : 'far fa-check-circle';
256256
$html .= '<i class="' . $required .'"
257257
onclick="plugin_formcreator.toggleRequired(this)"></i> ';
258-
$html .= "</span>";
259258
}
259+
$html .= "</span>";
260260

261261
$html .= '</div>'; // grid stack item content
262262

0 commit comments

Comments
 (0)