From: Michael Tremer Date: Wed, 17 Oct 2018 13:27:24 +0000 (+0100) Subject: people: Show SIP forwarding on SIP page X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=018e57cd22a43b92afc8bfdc67e45d9906e5c47f;p=ipfire.org.git people: Show SIP forwarding on SIP page Signed-off-by: Michael Tremer --- diff --git a/src/templates/people/sip.html b/src/templates/people/sip.html index eaf24e50..7424b995 100644 --- a/src/templates/people/sip.html +++ b/src/templates/people/sip.html @@ -7,28 +7,40 @@ {% module Registrations(account) %} -
-
-
{{ _("SIP Credentials") }}
- -

- {{ _("Use these credentials to connect a SIP client to our SIP server") }} -

- -
-
-
-
{{ _("SIP Server") }}
-
ipfire.org
- -
{{ _("Username") }}
-
{{ account.sip_id }}
- -
{{ _("Password") }}
-
{{ account.sip_password }}
-
+ {% if account.uses_sip_forwarding() %} +
+
+
{{ _("SIP Forwarding Enabled") }}
+ +

+ {{ _("All calls to %s will be forwarded to %s") % (account.sip_id, format_phone_number(account.sip_routing_address)) }} +

+
+
+ {% else %} +
+
+
{{ _("SIP Credentials") }}
+ +

+ {{ _("Use these credentials to connect a SIP client to our SIP server") }} +

+ +
+
+
+
{{ _("SIP Server") }}
+
ipfire.org
+ +
{{ _("Username") }}
+
{{ account.sip_id }}
+ +
{{ _("Password") }}
+
{{ account.sip_password }}
+
+
-
+ {% end %} {% end block %} diff --git a/src/templates/people/user.html b/src/templates/people/user.html index a199fdc4..0d61715a 100644 --- a/src/templates/people/user.html +++ b/src/templates/people/user.html @@ -72,13 +72,6 @@ {% end %}
- {% if (current_user == account or current_user.is_admin()) and account.uses_sip_forwarding() %} -

- {{ _("All calls are forwarded to") }} - {{ account.sip_routing_address }} -

- {% end %} - {% if account.can_be_managed_by(current_user) %}