@@ -158,7 +158,7 @@ def input_file_display_renderer(widget, data):
158
158
)
159
159
160
160
161
- @managedprops ('vocabulary' , * css_managed_props )
161
+ @managedprops ('vocabulary' , 'radio_class' , 'radio_input_class' , * css_managed_props )
162
162
def file_options_renderer (widget , data ):
163
163
if data .value in [None , UNSET , '' ]:
164
164
return data .rendered
@@ -169,6 +169,8 @@ def file_options_renderer(widget, data):
169
169
]
170
170
else :
171
171
value = ['keep' ]
172
+ radio_class = attr_value ('radio_class' , widget , data )
173
+ radio_input_class = attr_value ('radio_input_class' , widget , data )
172
174
tags = []
173
175
vocab = attr_value ('vocabulary' , widget , data , [])
174
176
for key , term in vocabulary (vocab ):
@@ -178,15 +180,16 @@ def file_options_renderer(widget, data):
178
180
'checked' : (key in value ) and 'checked' or None ,
179
181
'name_' : '{0}-action' .format (widget .dottedpath ),
180
182
'id' : cssid (widget , 'input' , key ),
181
- 'class_' : cssclasses (widget , data ),
183
+ 'class_' : radio_input_class
184
+ # 'class_': cssclasses(widget, data), # XXX: is this necessary?
182
185
}
183
186
taginput = tag ('input' , ** attrs )
184
187
text = tag ('span' , term )
185
188
tags .append (tag (
186
189
'div' ,
187
190
taginput ,
188
191
text ,
189
- ** {'id' : cssid (widget , 'radio' , key )}
192
+ ** {'id' : cssid (widget , 'radio' , key ), 'class' : radio_class }
190
193
))
191
194
return data .rendered + u'' .join (tags )
192
195
@@ -226,3 +229,13 @@ def file_options_renderer(widget, data):
226
229
factory .doc ['props' ]['file.vocabulary' ] = """\
227
230
Vocabulary with available actions for existing files.
228
231
"""
232
+
233
+ factory .defaults ['file.radio_class' ] = ''
234
+ factory .doc ['props' ]['file.radio_class' ] = """\
235
+ CSS class for the wrapper div of radio options.
236
+ """
237
+
238
+ factory .defaults ['file.radio_input_class' ] = ''
239
+ factory .doc ['props' ]['file.radio_input_class' ] = """\
240
+ CSS class for radio options.
241
+ """
0 commit comments