diff options
author | Stefan Parviainen <saparvia@caterva.eu> | 2015-01-01 15:54:16 +0100 |
---|---|---|
committer | Stefan Parviainen <saparvia@caterva.eu> | 2015-01-01 15:54:16 +0100 |
commit | 85e76773a04995884e798a89cc285f48377bcb62 (patch) | |
tree | c1ead5390bc85fda87a406971a5efe6191ca0785 /view | |
parent | 686b6ee1182c09969e2817b53825a78975c75bf5 (diff) | |
download | volse-hubzilla-85e76773a04995884e798a89cc285f48377bcb62.tar.gz volse-hubzilla-85e76773a04995884e798a89cc285f48377bcb62.tar.bz2 volse-hubzilla-85e76773a04995884e798a89cc285f48377bcb62.zip |
Use grouped select field for role selection
Diffstat (limited to 'view')
-rw-r--r-- | view/js/mod_new_channel.js | 2 | ||||
-rw-r--r-- | view/js/mod_settings.js | 4 | ||||
-rwxr-xr-x | view/tpl/new_channel.tpl | 5 | ||||
-rw-r--r-- | view/tpl/select_timezone.tpl | 11 | ||||
-rwxr-xr-x | view/tpl/settings.tpl | 5 |
5 files changed, 16 insertions, 11 deletions
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 @@ <div id="newchannel-desc" class="descriptive-paragraph">{{$desc}}</div> <div id="newchannel-role-help" class="descriptive-paragraph">{{$help_role}}</div> - - <label for="newchannel-role" id="label-newchannel-role" class="newchannel-label" >{{$label_role}}</label> - {{$role_select}} - <div class="newchannel-role-morehelp"><a href="help/roles" title="{{$what_is_role}}" target="_blank">{{$questionmark}}</a></div> + {{include file="field_select_grouped.tpl" field=$role}} <div id="newchannel-role-end" class="newchannel-field-end"></div> 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 *}} +<select id='timezone_select' name='timezone'> +{{foreach $continents as $continent => $cities}} +<optgroup label="{{$continent}}"> +{{foreach $cities as $city => $value}} +<option value='{{$value}}' {{if $value == $selected}}selected='selected'{{/if}}>{{$city}}</option> +{{/foreach}} +</optgroup> +{{/foreach}} +</select> + 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 @@ <h3 class="settings-heading">{{$h_prv}}</h3> -<div class="field custom"> -<label for="privacy-role-select">{{$role_lbl}}</label> -{{$role_select}} -</div> +{{include file="field_select_grouped.tpl" field=$role}} <div id="advanced-perm" style="display:{{if $permissions_set}}none{{else}}block{{/if}};"> {{include file="field_checkbox.tpl" field=$hide_presence}} |