~launchpad-pqm/launchpad/devel

« back to all changes in this revision

Viewing changes to lib/lp/translations/browser/distribution.py

  • Committer: Launchpad Patch Queue Manager
  • Date: 2011-10-12 16:06:12 UTC
  • mfrom: (14134.2.6 bug-872715)
  • Revision ID: launchpad@pqm.canonical.com-20111012160612-m9kkf1exifsazgxo
[r=gmb][bug=872715] Get rid of builder-related fields from
 distribution:+configure-translations page and ensure TranslationsAdmin can
 modify all the relevant attributes.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
# Copyright 2009 Canonical Ltd.  This software is licensed under the
 
1
# Copyright 2009-2011 Canonical Ltd.  This software is licensed under the
2
2
# GNU Affero General Public License version 3 (see the file LICENSE).
3
3
 
4
4
"""Translations browser views for distributions."""
24
24
from canonical.launchpad.webapp.authorization import check_permission
25
25
from canonical.launchpad.webapp.menu import NavigationMenu
26
26
from lp.app.enums import service_uses_launchpad
27
 
from lp.registry.browser.distribution import DistributionEditView
 
27
from lp.registry.browser import RegistryEditFormView
28
28
from lp.registry.interfaces.distribution import IDistribution
29
29
from lp.registry.interfaces.series import SeriesStatus
30
30
from lp.services.propertycache import cachedproperty
128
128
                      reverse=True)
129
129
 
130
130
 
131
 
class DistributionSettingsView(TranslationsMixin, DistributionEditView):
 
131
class DistributionSettingsView(TranslationsMixin, RegistryEditFormView):
132
132
    label = "Translations settings"
133
133
    page_title = "Settings"
 
134
    schema = IDistribution
 
135
 
134
136
    field_names = [
135
137
        "translations_usage",
136
138
        "translation_focus",
146
148
 
147
149
    @action('Change', name='change')
148
150
    def edit(self, action, data):
149
 
        self.change_archive_fields(data)
150
151
        self.updateContextFromData(data)