From ef94747e5eb4d8b2e3566835280c31b848fc28e6 Mon Sep 17 00:00:00 2001 From: Stefan Parviainen Date: Thu, 1 Jan 2015 14:36:17 +0100 Subject: Add field template for grouped selects --- view/tpl/field_select_grouped.tpl | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100644 view/tpl/field_select_grouped.tpl (limited to 'view') diff --git a/view/tpl/field_select_grouped.tpl b/view/tpl/field_select_grouped.tpl new file mode 100644 index 000000000..c7fb4f322 --- /dev/null +++ b/view/tpl/field_select_grouped.tpl @@ -0,0 +1,12 @@ +
+ + + {{$field.3}} +
-- cgit v1.2.3 From 686b6ee1182c09969e2817b53825a78975c75bf5 Mon Sep 17 00:00:00 2001 From: Stefan Parviainen Date: Thu, 1 Jan 2015 14:44:50 +0100 Subject: Use grouped select field for timezone selection --- view/tpl/install_settings.tpl | 2 +- view/tpl/settings.tpl | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'view') diff --git a/view/tpl/install_settings.tpl b/view/tpl/install_settings.tpl index f4fd82fdb..62dcbb8b3 100755 --- a/view/tpl/install_settings.tpl +++ b/view/tpl/install_settings.tpl @@ -20,7 +20,7 @@ {{include file="field_input.tpl" field=$adminmail}} {{include file="field_input.tpl" field=$siteurl}} -{{$timezone}} +{{include file="field_select_grouped.tpl" field=$timezone}} diff --git a/view/tpl/settings.tpl b/view/tpl/settings.tpl index 47d85d8e4..83da4f87e 100755 --- a/view/tpl/settings.tpl +++ b/view/tpl/settings.tpl @@ -9,7 +9,7 @@

{{$h_basic}}

{{include file="field_input.tpl" field=$username}} -{{include file="field_custom.tpl" field=$timezone}} +{{include file="field_select_grouped.tpl" field=$timezone}} {{include file="field_input.tpl" field=$defloc}} {{include file="field_checkbox.tpl" field=$allowloc}} -- cgit v1.2.3 From 85e76773a04995884e798a89cc285f48377bcb62 Mon Sep 17 00:00:00 2001 From: Stefan Parviainen Date: Thu, 1 Jan 2015 15:54:16 +0100 Subject: Use grouped select field for role selection --- view/js/mod_new_channel.js | 2 +- view/js/mod_settings.js | 4 ++-- view/tpl/new_channel.tpl | 5 +---- view/tpl/select_timezone.tpl | 11 +++++++++++ view/tpl/settings.tpl | 5 +---- 5 files changed, 16 insertions(+), 11 deletions(-) create mode 100644 view/tpl/select_timezone.tpl (limited to 'view') diff --git a/view/js/mod_new_channel.js b/view/js/mod_new_channel.js index 492267ff9..c4d5408f2 100644 --- a/view/js/mod_new_channel.js +++ b/view/js/mod_new_channel.js @@ -1,5 +1,5 @@ $(document).ready(function() { -// $("#privacy-role-select").sSelect(); +// $("#id_permissions_role").sSelect(); $("#newchannel-name").blur(function() { $("#name-spinner").spin('small'); var zreg_name = $("#newchannel-name").val(); diff --git a/view/js/mod_settings.js b/view/js/mod_settings.js index 87c8c3a2b..90e17afc4 100644 --- a/view/js/mod_settings.js +++ b/view/js/mod_settings.js @@ -8,8 +8,8 @@ $(document).ready(function() { 'transition' : 'elastic' }); - $("#privacy-role-select").change(function() { - var role = $("#privacy-role-select").val(); + $("#id_permissions_role").change(function() { + var role = $("#id_permissions_role").val(); if(role == 'custom') $('#advanced-perm').show(); else diff --git a/view/tpl/new_channel.tpl b/view/tpl/new_channel.tpl index 241846eb4..ff2011181 100755 --- a/view/tpl/new_channel.tpl +++ b/view/tpl/new_channel.tpl @@ -5,10 +5,7 @@
{{$desc}}
{{$help_role}}
- - - {{$role_select}} - + {{include file="field_select_grouped.tpl" field=$role}}
diff --git a/view/tpl/select_timezone.tpl b/view/tpl/select_timezone.tpl new file mode 100644 index 000000000..2820a54f4 --- /dev/null +++ b/view/tpl/select_timezone.tpl @@ -0,0 +1,11 @@ +{{* TODO: Make id configurabel *}} + + diff --git a/view/tpl/settings.tpl b/view/tpl/settings.tpl index 83da4f87e..53f08e24f 100755 --- a/view/tpl/settings.tpl +++ b/view/tpl/settings.tpl @@ -22,10 +22,7 @@

{{$h_prv}}

-
- -{{$role_select}} -
+{{include file="field_select_grouped.tpl" field=$role}}
{{include file="field_checkbox.tpl" field=$hide_presence}} -- cgit v1.2.3