Skip to content

Commit

Permalink
Merge pull request smcmahon#192 from mikerenfro/fix-column-titles
Browse files Browse the repository at this point in the history
Adding getColumnNames logic to getColumnTitles
  • Loading branch information
mauritsvanrees authored Mar 7, 2017
2 parents faa4352 + 82c18e9 commit eb3d189
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
3 changes: 3 additions & 0 deletions CHANGES.txt
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,9 @@ Change History
of a tag not being closed
[datakurre]

- Fix issue where logic in FormSaveDataAdapter's getColumnTitles was
different than the logic for getColumnNames.
[mikerenfro]

1.8.3 (2016-12-06)
------------------
Expand Down
4 changes: 3 additions & 1 deletion Products/PloneFormGen/content/saveDataAdapter.py
Original file line number Diff line number Diff line change
Expand Up @@ -381,8 +381,10 @@ def getColumnNames(self, excludeServerSide=True):
def getColumnTitles(self, excludeServerSide=True):
# """Returns a list of column titles"""

showFields = getattr(self, 'showFields', [])
names = [field.widget.label for field
in self.fgFields(displayOnly=True, excludeServerSide=excludeServerSide)]
in self.fgFields(displayOnly=True, excludeServerSide=excludeServerSide)
if not showFields or field.getName() in showFields]
for f in self.ExtraData:
names.append(self.vocabExtraDataDL().getValue(f, ''))

Expand Down

0 comments on commit eb3d189

Please sign in to comment.