Skip to content

Commit

Permalink
fix(form): hidden questions still consume 10 pixels height
Browse files Browse the repository at this point in the history
Signed-off-by: Thierry Bugier <tbugier@teclib.com>
  • Loading branch information
btry committed Mar 5, 2020
1 parent f0f60a5 commit afa2ea3
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 3 deletions.
2 changes: 1 addition & 1 deletion css/styles.css
Original file line number Diff line number Diff line change
Expand Up @@ -223,7 +223,7 @@ form.formcreator_form {
}

.formcreator_form .form-group {
padding: 5px 15px;
padding: 0 15px;
}

.formcreator_form .form-group > label {
Expand Down
2 changes: 1 addition & 1 deletion inc/form.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -1898,7 +1898,7 @@ public static function import(PluginFormcreatorLinker $linker, $input = [], $con
global $DB;

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

$formFk = PluginFormcreatorForm::getForeignKeyField();
Expand Down
3 changes: 3 additions & 0 deletions inc/question.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -1003,6 +1003,9 @@ public static function import(PluginFormcreatorLinker $linker, $input = [], $con
if (isset($input['_parameters'])) {
$parameters = $field->getParameters();
foreach ($parameters as $fieldName => $parameter) {
if (false === ($input['_parameters'][$input['fieldtype']][$fieldName])) {
continue;
}
$parameter::import($linker, $input['_parameters'][$input['fieldtype']][$fieldName], $itemId);
}
}
Expand Down
2 changes: 1 addition & 1 deletion inc/questionregex.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ public static function import(PluginFormcreatorLinker $linker, $input = [], $con
global $DB;

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

$questionFk = PluginFormcreatorQuestion::getForeignKeyField();
Expand Down

0 comments on commit afa2ea3

Please sign in to comment.