From 018e57cd22a43b92afc8bfdc67e45d9906e5c47f Mon Sep 17 00:00:00 2001 From: Michael Tremer Date: Wed, 17 Oct 2018 14:27:24 +0100 Subject: [PATCH] people: Show SIP forwarding on SIP page Signed-off-by: Michael Tremer --- src/templates/people/sip.html | 54 +++++++++++++++++++++------------- src/templates/people/user.html | 7 ----- 2 files changed, 33 insertions(+), 28 deletions(-) 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) %}