equal
deleted
inserted
replaced
299 wdgtype = 'SuggestField' |
299 wdgtype = 'SuggestField' |
300 loadtype = 'auto' |
300 loadtype = 'auto' |
301 |
301 |
302 def _render_attrs(self, form, field): |
302 def _render_attrs(self, form, field): |
303 name, values, attrs = super(AutoCompletionWidget, self)._render_attrs(form, field) |
303 name, values, attrs = super(AutoCompletionWidget, self)._render_attrs(form, field) |
304 if not values[0]: |
|
305 values = (INTERNAL_FIELD_VALUE,) |
|
306 init_ajax_attributes(attrs, self.wdgtype, self.loadtype) |
304 init_ajax_attributes(attrs, self.wdgtype, self.loadtype) |
307 # XXX entity form specific |
305 # XXX entity form specific |
308 attrs['cubicweb:dataurl'] = self._get_url(form.edited_entity, field) |
306 attrs['cubicweb:dataurl'] = self._get_url(form.edited_entity, field) |
309 return name, values, attrs |
307 return name, values, attrs |
310 |
308 |