--- a/web/views/management.py Mon Sep 14 11:23:31 2009 +0200
+++ b/web/views/management.py Mon Sep 14 11:32:07 2009 +0200
@@ -237,10 +237,8 @@
w(u"<b>Package %s version:</b> %s<br/>\n" % (cube, cubeversion))
cversions.append((cube, cubeversion))
w(u"</div>")
- # creates a bug submission link if SUBMIT_URL is set
- submiturl = self.config['submit-url']
- submitmail = self.config['submit-mail']
- if submiturl or submitmail:
+ # creates a bug submission link if submit-mail is set
+ if self.config['submit-mail']:
form = self.vreg['forms'].select('base', self.req, rset=None,
mainform=False)
binfo = text_error_description(ex, excinfo, req, eversion, cversions)
@@ -248,15 +246,9 @@
# we must use a text area to keep line breaks
widget=wdgs.TextArea({'class': 'hidden'}))
form.form_add_hidden('__bugreporting', '1')
- if submitmail:
- form.form_buttons = [wdgs.SubmitButton(MAIL_SUBMIT_MSGID)]
- form.action = req.build_url('reportbug')
- w(form.form_render())
- if submiturl:
- form.form_add_hidden('description_format', 'text/rest')
- form.form_buttons = [wdgs.SubmitButton(SUBMIT_MSGID)]
- form.action = submiturl
- w(form.form_render())
+ form.form_buttons = [wdgs.SubmitButton(MAIL_SUBMIT_MSGID)]
+ form.action = req.build_url('reportbug')
+ w(form.form_render())
def exc_message(ex, encoding):
--- a/web/webconfig.py Mon Sep 14 11:23:31 2009 +0200
+++ b/web/webconfig.py Mon Sep 14 11:32:07 2009 +0200
@@ -160,18 +160,6 @@
if you want to allow everything',
'group': 'web', 'inputlevel': 1,
}),
- ('submit-url',
- {'type' : 'string',
- 'default': Method('default_submit_url'),
- 'help': ('URL that may be used to report bug in this instance '
- 'by direct access to the project\'s (jpl) tracker, '
- 'if you want this feature on. The url should looks like '
- 'http://mytracker.com/view?__linkto=concerns:1234:subject&etype=Ticket&type=bug&vid=creation '
- 'where 1234 should be replaced by the eid of your project in '
- 'the tracker. If you have no idea about what I\'am talking '
- 'about, you should probably let no value for this option.'),
- 'group': 'web', 'inputlevel': 2,
- }),
('submit-mail',
{'type' : 'string',
'default': None,
@@ -196,16 +184,6 @@
}),
))
- def default_submit_url(self):
- try:
- cube = self.cubes()[0]
- cubeeid = self.cube_pkginfo(cube).cube_eid
- except Exception:
- return None
- if cubeeid:
- return 'http://intranet.logilab.fr/jpl/view?__linkto=concerns:%s:subject&etype=Ticket&type=bug&vid=creation' % cubeeid
- return None
-
def fckeditor_installed(self):
return exists(self.ext_resources['FCKEDITOR_PATH'])