Skip to content

Commit

Permalink
error in playground_install api; fix to grid mode formatting with emp…
Browse files Browse the repository at this point in the history
…ty label
  • Loading branch information
jhpyle committed Dec 1, 2023
1 parent c1d4e75 commit ef6d132
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 3 deletions.
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
# Change Log

## [1.4.88] - 2023-12-01

### Fixed
- Bug in `/api/playground_install`.

## [1.4.87] - 2023-11-28

### Changed
Expand Down
4 changes: 2 additions & 2 deletions docassemble_base/docassemble/base/standardformatter.py
Original file line number Diff line number Diff line change
Expand Up @@ -569,7 +569,7 @@ def field_item(field, grid_info, pre=None, row=True, floating=False, classes=Non
else:
grid_number = None
if grid_number:
if label_content:
if label_content is not None:
all_label_classes = []
if grid_type == 'horizontal':
label_width_number = grid_info[field.number].get('label width', None) or daconfig['grid classes']['label grid number']
Expand Down Expand Up @@ -1721,7 +1721,7 @@ def as_html(status, debug, root, validation_rules, field_error, the_progress_bar
# fieldlist.append(' <div ' + style_def + data_def + 'class="da-form-group row dayesnospacing ' + side_note_parent + field_class + ' da-field-container-nolabel' + class_def + '">\n <span class="visually-hidden">' + word("Check if applicable") + '</span>\n <div class="col dawidecol dafieldpart">' + input_for(status, field) + '</div>' + side_note + '\n </div>\n')
elif floating_labels or (hasattr(field, 'floating_label') and status.extras['floating_label'][field.number]):
if hasattr(field, 'inputtype') and field.inputtype in ['yesno', 'noyes']:
fieldlist.append(field_item(field, grid_info, pre=style_def + data_def, row=False, classes='dayesnospacing' + side_note_parent + field_class + ' da-field-container-nolabel' + class_def, hidden_message=word("Check if applicable"), grid_type='offset', content_classes='dafieldpart', content=input_for(status, field), side_note=side_note, under_text=under_text))
fieldlist.append(field_item(field, grid_info, pre=style_def + data_def, row=False, classes='dayesnospacing' + side_note_parent + field_class + ' da-field-container-nolabel' + class_def, hidden_message=word("Check if applicable"), grid_type='offset', content_classes='dafieldpart', content=input_for(status, field), side_note=side_note, under_text=under_text, label_content=''))
# fieldlist.append(' <div ' + style_def + data_def + 'class="da-form-group dayesnospacing' + side_note_parent + field_class + ' da-field-container-nolabel' + class_def + '">\n <span class="visually-hidden">' + word("Check if applicable") + '</span>\n <div class="dafieldpart">' + input_for(status, field) + side_note + '</div>\n </div>\n')
elif status.labels[field.number] == '':
fieldlist.append(field_item(field, grid_info, pre=style_def + data_def, row=False, classes='da-form-group' + side_note_parent + req_tag + field_class + ' da-field-container-emptylabel' + class_def, hidden_message=word("Answer here"), content_classes='dafieldpart', content=input_for(status, field), side_note=side_note, under_text=under_text))
Expand Down
2 changes: 1 addition & 1 deletion docassemble_webapp/docassemble/webapp/server.py
Original file line number Diff line number Diff line change
Expand Up @@ -29410,7 +29410,7 @@ def api_playground_install():
with zf.open(zinfo) as f:
the_file_obj = TextIOWrapper(f, encoding='utf8')
setup_py = the_file_obj.read()
elif len(levels) >= 1 and not directory != root_dir and filename.endswith('.py') and filename != '__init__.py' and 'tests' not in dirparts and 'data' not in dirparts:
elif len(levels) >= 1 and directory != root_dir and filename.endswith('.py') and filename != '__init__.py' and 'tests' not in dirparts and 'data' not in dirparts:
need_to_restart = True
data_files['modules'].append(filename)
target_filename = os.path.join(directory_for(area['playgroundmodules'], current_project), filename)
Expand Down

0 comments on commit ef6d132

Please sign in to comment.