equal
deleted
inserted
replaced
281 fkwargs['initial'] = 'text/html' |
281 fkwargs['initial'] = 'text/html' |
282 else: |
282 else: |
283 # else we want a format selector |
283 # else we want a format selector |
284 fkwargs['widget'] = Select() |
284 fkwargs['widget'] = Select() |
285 fcstr = FormatConstraint() |
285 fcstr = FormatConstraint() |
286 fkwargs['choices'] = fcstr.vocabulary(req=req) |
286 fkwargs['choices'] = fcstr.vocabulary(form=form) |
287 fkwargs['internationalizable'] = True |
287 fkwargs['internationalizable'] = True |
288 fkwargs['initial'] = lambda f: f.form_field_format(self) |
288 fkwargs['initial'] = lambda f: f.form_field_format(self) |
289 field = StringField(name=self.name + '_format', **fkwargs) |
289 field = StringField(name=self.name + '_format', **fkwargs) |
290 req.data[self] = field |
290 req.data[self] = field |
291 return field |
291 return field |