mirror of
https://github.com/freedombox/FreedomBox.git
synced 2026-05-13 10:30:16 +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/>.
|
# 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
|
import re
|
||||||
|
|||||||
@ -34,8 +34,8 @@ def validate_ips(ips):
|
|||||||
class BindForm(ServiceForm):
|
class BindForm(ServiceForm):
|
||||||
"""BIND configuration form"""
|
"""BIND configuration form"""
|
||||||
forwarders = forms.CharField(
|
forwarders = forms.CharField(
|
||||||
required=False, validators=[validate_ips], help_text=_(
|
label=_('Forwarders'), required=False, validators=[validate_ips],
|
||||||
'A list DNS servers, separated by space, to which '
|
help_text=_('A list DNS servers, separated by space, to which '
|
||||||
'requests will be forwarded'))
|
'requests will be forwarded'))
|
||||||
|
|
||||||
enable_dnssec = forms.BooleanField(
|
enable_dnssec = forms.BooleanField(
|
||||||
|
|||||||
@ -14,16 +14,12 @@
|
|||||||
# You should have received a copy of the GNU Affero General Public License
|
# 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/>.
|
# 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 django.conf.urls import url
|
||||||
|
|
||||||
from plinth.modules.bind.views import BindServiceView
|
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',
|
'configure', '--forwarders', data['forwarders'], '--dnssec',
|
||||||
dnssec_setting
|
dnssec_setting
|
||||||
])
|
])
|
||||||
messages.success(self.request, _('BIND configuration updated'))
|
messages.success(self.request, _('Configuration updated'))
|
||||||
|
|
||||||
return super().form_valid(form)
|
return super().form_valid(form)
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user