Skip to content

Commit afa2ea3

Browse files
committed
fix(form): hidden questions still consume 10 pixels height
Signed-off-by: Thierry Bugier <[email protected]>
1 parent f0f60a5 commit afa2ea3

File tree

4 files changed

+6
-3
lines changed

4 files changed

+6
-3
lines changed

css/styles.css

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -223,7 +223,7 @@ form.formcreator_form {
223223
}
224224

225225
.formcreator_form .form-group {
226-
padding: 5px 15px;
226+
padding: 0 15px;
227227
}
228228

229229
.formcreator_form .form-group > label {

inc/form.class.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1898,7 +1898,7 @@ public static function import(PluginFormcreatorLinker $linker, $input = [], $con
18981898
global $DB;
18991899

19001900
if (!isset($input['uuid']) && !isset($input['id'])) {
1901-
throw new ImportFailureException('UUID or ID is mandatory');
1901+
throw new ImportFailureException('');
19021902
}
19031903

19041904
$formFk = PluginFormcreatorForm::getForeignKeyField();

inc/question.class.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1003,6 +1003,9 @@ public static function import(PluginFormcreatorLinker $linker, $input = [], $con
10031003
if (isset($input['_parameters'])) {
10041004
$parameters = $field->getParameters();
10051005
foreach ($parameters as $fieldName => $parameter) {
1006+
if (false === ($input['_parameters'][$input['fieldtype']][$fieldName])) {
1007+
continue;
1008+
}
10061009
$parameter::import($linker, $input['_parameters'][$input['fieldtype']][$fieldName], $itemId);
10071010
}
10081011
}

inc/questionregex.class.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,7 @@ public static function import(PluginFormcreatorLinker $linker, $input = [], $con
120120
global $DB;
121121

122122
if (!isset($input['uuid']) && !isset($input['id'])) {
123-
throw new ImportFailureException('UUID or ID is mandatory');
123+
throw new ImportFailureException('');
124124
}
125125

126126
$questionFk = PluginFormcreatorQuestion::getForeignKeyField();

0 commit comments

Comments
 (0)