~launchpad-pqm/launchpad/devel

« back to all changes in this revision

Viewing changes to lib/lp/bugs/browser/bugalsoaffects.py

[r=benji][bug=795573,
 796233] On DistroSeries:+localpackagediffs ensure that the comment
 form is hidden after adding a new comment to a DistroSeriesDifference,
 prevent empty comments from being submitted,
 and add some animations and effects to make the UI less jarring and easier to
 follow.

Show diffs side-by-side

added added

removed removed

Lines of Context:
418
418
            self.widgets['sourcepackagename'].name)
419
419
        if sourcepackagename is None and entered_package:
420
420
            # The entered package doesn't exist.
421
 
            filebug_url = "%s/+filebug" % canonical_url(
422
 
                getUtility(ILaunchpadCelebrities).launchpad)
423
 
            self.setFieldError(
424
 
                'sourcepackagename',
425
 
                structured(
426
 
                'There is no package in %s named "%s". If it should'
427
 
                ' be here, <a href="%s">report this as a bug</a>.',
428
 
                distribution.displayname,
429
 
                entered_package,
430
 
                filebug_url))
 
421
            if distribution.has_published_binaries:
 
422
                binary_tracking = ''
 
423
            else:
 
424
                binary_tracking = structured(
 
425
                    ' Launchpad does not track binary package names '
 
426
                    'in %s.', distribution.displayname)
 
427
            error = structured(
 
428
                'There is no package in %s named "%s".%s',
 
429
                distribution.displayname, entered_package,
 
430
                binary_tracking)
 
431
            self.setFieldError('sourcepackagename', error)
431
432
        else:
432
433
            try:
433
434
                validate_new_distrotask(