~ara/checkbox/fixes_554202

« back to all changes in this revision

Viewing changes to plugins/exchange_prompt.py

  • Committer: David Murphy
  • Date: 2009-02-18 23:28:47 UTC
  • mto: (478.1.3 trunk)
  • mto: This revision was merged to the branch mainline in revision 480.
  • Revision ID: david.murphy@canonical.com-20090218232847-o26woqv9c6w6vszi
Added the ability to view generated reports via XSL.

Show diffs side-by-side

added added

removed removed

Lines of Context:
16
16
# You should have received a copy of the GNU General Public License
17
17
# along with Checkbox.  If not, see <http://www.gnu.org/licenses/>.
18
18
#
 
19
import posixpath
19
20
import re
20
21
 
21
22
from gettext import gettext as _
30
31
 
31
32
    # E-mail address used to sign in to Launchpad.
32
33
    email = String(required=False)
 
34
    report = String(default="%(checkbox_data)s/submission.xml")
33
35
 
34
36
    def register(self, manager):
35
37
        super(ExchangePrompt, self).register(manager)
78
80
                if self._error:
79
81
                    interface.show_error(_("Exchange"), self._error)
80
82
 
 
83
                url = "file://%s" % posixpath.abspath(self.report)
 
84
                print url
 
85
 
81
86
                email = interface.show_exchange(email, self._reports,
82
87
                    _("""\
83
88
The following information will be sent to the Launchpad \
84
 
hardware database. Please provide the e-mail address you \
85
 
use to sign in to Launchpad to submit this information."""))
 
89
hardware database.\n
 
90
[[%s|View Report]]\n
 
91
Please provide the e-mail address you use to sign in to Launchpad to \
 
92
submit this information.""" % url))
 
93
 
86
94
 
87
95
            if interface.direction == PREV:
88
96
                break