mirror of
https://github.com/freedombox/FreedomBox.git
synced 2026-01-28 08:03:36 +00:00
bind: Minor i18n updates
- Use a proper i18n label for 'Forwarders' fields instead of auto-generated one. - Reuse an already used success message for form submission so that a new message is not introduced for l10n. - Minor styling fixes and a yapf run. Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
This commit is contained in:
parent
c7c9b200a8
commit
ec0a323cb6
@ -15,7 +15,7 @@
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
#
|
||||
"""
|
||||
Plinth module to configure BIND server
|
||||
Plinth module to configure BIND server.
|
||||
"""
|
||||
|
||||
import re
|
||||
|
||||
@ -34,9 +34,9 @@ def validate_ips(ips):
|
||||
class BindForm(ServiceForm):
|
||||
"""BIND configuration form"""
|
||||
forwarders = forms.CharField(
|
||||
required=False, validators=[validate_ips], help_text=_(
|
||||
'A list DNS servers, separated by space, to which '
|
||||
'requests will be forwarded'))
|
||||
label=_('Forwarders'), required=False, validators=[validate_ips],
|
||||
help_text=_('A list DNS servers, separated by space, to which '
|
||||
'requests will be forwarded'))
|
||||
|
||||
enable_dnssec = forms.BooleanField(
|
||||
label=_('Enable DNSSEC'), required=False,
|
||||
|
||||
@ -14,16 +14,12 @@
|
||||
# You should have received a copy of the GNU Affero General Public License
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
#
|
||||
|
||||
"""
|
||||
URLs for the BIND module
|
||||
URLs for the BIND module.
|
||||
"""
|
||||
|
||||
from django.conf.urls import url
|
||||
|
||||
from plinth.modules.bind.views import BindServiceView
|
||||
|
||||
|
||||
urlpatterns = [
|
||||
url(r'^sys/bind/$', BindServiceView.as_view(), name='index'),
|
||||
]
|
||||
urlpatterns = [url(r'^sys/bind/$', BindServiceView.as_view(), name='index'), ]
|
||||
|
||||
@ -54,6 +54,6 @@ class BindServiceView(ServiceView): # pylint: disable=too-many-ancestors
|
||||
'configure', '--forwarders', data['forwarders'], '--dnssec',
|
||||
dnssec_setting
|
||||
])
|
||||
messages.success(self.request, _('BIND configuration updated'))
|
||||
messages.success(self.request, _('Configuration updated'))
|
||||
|
||||
return super().form_valid(form)
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user