admin: change 'new form' page to be a popup
This commit is contained in:
parent
b647c88ff5
commit
60c5de730f
|
@ -82,7 +82,7 @@ class FormDefUI:
|
|||
formdef = self.formdef
|
||||
else:
|
||||
formdef = FormDef()
|
||||
form.add(StringWidget, 'name', title = _('Form Title'), required = True, size=50,
|
||||
form.add(StringWidget, 'name', title = _('Form Title'), required=True, size=40,
|
||||
value = formdef.name)
|
||||
categories = get_categories()
|
||||
if categories:
|
||||
|
@ -115,7 +115,7 @@ class FormDefUI:
|
|||
formdef = self.formdef
|
||||
else:
|
||||
formdef = FormDef()
|
||||
form.add(StringWidget, 'name', title = _('Form Title'), required = True, size=50,
|
||||
form.add(StringWidget, 'name', title = _('Form Title'), required=True, size=40,
|
||||
value = formdef.name)
|
||||
categories = get_categories()
|
||||
if categories:
|
||||
|
@ -971,10 +971,11 @@ class FormsDirectory(Directory):
|
|||
def _q_index [html] (self):
|
||||
get_response().breadcrumb.append( ('forms/', _('Forms')) )
|
||||
html_top('forms', title = _('Forms'))
|
||||
get_response().add_javascript(['jquery.js', 'widget_list.js'])
|
||||
|
||||
if Role.count():
|
||||
'<ul id="main-actions">'
|
||||
' <li><a class="new-item" href="new">%s</a></li>' % _('New Form')
|
||||
' <li><a class="new-item" href="new" rel="popup">%s</a></li>' % _('New Form')
|
||||
' <li><a href="import" rel="popup">%s</a></li>' % _('Import')
|
||||
'</ul>'
|
||||
else:
|
||||
|
|
Loading…
Reference in New Issue