equal
deleted
inserted
replaced
98 'id': self.id, |
98 'id': self.id, |
99 'data-ams-plugins': 'pyams_content', |
99 'data-ams-plugins': 'pyams_content', |
100 'data-ams-plugin-pyams_content-src': get_resource_path(pyams_content), |
100 'data-ams-plugin-pyams_content-src': get_resource_path(pyams_content), |
101 'data-ams-location': absolute_url(IFormFieldContainer(self.context), self.request), |
101 'data-ams-location': absolute_url(IFormFieldContainer(self.context), self.request), |
102 'data-ams-tablednd-drag-handle': 'td.sorter', |
102 'data-ams-tablednd-drag-handle': 'td.sorter', |
103 'data-ams-tablednd-drop-target': 'set-form-fields-order.json', |
103 'data-ams-tablednd-drop-target': 'set-form-fields-order.json' |
104 'data-ams-visibility-switcher': 'switch-form-field-visibility.json' |
|
105 } |
104 } |
|
105 attributes.setdefault('td', {}).update({ |
|
106 'data-ams-attribute-switcher': self.get_switcher_target |
|
107 }) |
106 return attributes |
108 return attributes |
|
109 |
|
110 @staticmethod |
|
111 def get_switcher_target(element, column): |
|
112 if column.__name__ == 'show-hide': |
|
113 return 'switch-form-field-visibility.json' |
107 |
114 |
108 @reify |
115 @reify |
109 def values(self): |
116 def values(self): |
110 return list(super(FormFieldsContainerTable, self).values) |
117 return list(super(FormFieldsContainerTable, self).values) |
111 |
118 |