33 from cubicweb.web import uicfg, stdmsgs |
33 from cubicweb.web import uicfg, stdmsgs |
34 from cubicweb.web.form import FormViewMixIn |
34 from cubicweb.web.form import FormViewMixIn |
35 from cubicweb.web.formfields import FIELDS, StringField |
35 from cubicweb.web.formfields import FIELDS, StringField |
36 from cubicweb.web.formwidgets import (Select, TextInput, Button, SubmitButton, |
36 from cubicweb.web.formwidgets import (Select, TextInput, Button, SubmitButton, |
37 FieldWidget) |
37 FieldWidget) |
38 from cubicweb.web.views import primary, formrenderers |
38 from cubicweb.web.views import primary, formrenderers, editcontroller |
39 |
39 |
40 uicfg.primaryview_section.tag_object_of(('*', 'for_user', '*'), 'hidden') |
40 uicfg.primaryview_section.tag_object_of(('*', 'for_user', '*'), 'hidden') |
41 |
41 |
42 # some string we want to be internationalizable for nicer display of property |
42 # some string we want to be internationalizable for nicer display of property |
43 # groups |
43 # groups |
394 for button in form.form_buttons: |
394 for button in form.form_buttons: |
395 w(u'%s\n' % button.render(form)) |
395 w(u'%s\n' % button.render(form)) |
396 w(u'</div>') |
396 w(u'</div>') |
397 |
397 |
398 |
398 |
|
399 class CWPropertyIEditControlAdapter(editcontroller.IEditControlAdapter): |
|
400 __select__ = implements('CWProperty') |
|
401 |
|
402 def after_deletion_path(self): |
|
403 """return (path, parameters) which should be used as redirect |
|
404 information when this entity is being deleted |
|
405 """ |
|
406 return 'view', {} |
|
407 |
399 _afs = uicfg.autoform_section |
408 _afs = uicfg.autoform_section |
400 _afs.tag_subject_of(('*', 'for_user', '*'), 'main', 'hidden') |
409 _afs.tag_subject_of(('*', 'for_user', '*'), 'main', 'hidden') |
401 _afs.tag_object_of(('*', 'for_user', '*'), 'main', 'hidden') |
410 _afs.tag_object_of(('*', 'for_user', '*'), 'main', 'hidden') |
402 _aff = uicfg.autoform_field |
411 _aff = uicfg.autoform_field |
403 _aff.tag_attribute(('CWProperty', 'pkey'), PropertyKeyField) |
412 _aff.tag_attribute(('CWProperty', 'pkey'), PropertyKeyField) |