From 746ea5a3691a67ceb176352e8b6fcfe0f2dc99d6 Mon Sep 17 00:00:00 2001 From: Mario Vavti Date: Mon, 15 Jan 2018 11:34:42 +0100 Subject: fix some regressions with permission roles --- Zotlabs/Module/Connedit.php | 2 +- Zotlabs/Module/Defperms.php | 2 +- view/js/mod_connedit.js | 4 ++-- view/js/mod_defperms.js | 4 ++-- view/js/mod_settings.js | 4 ++-- view/tpl/abook_edit.tpl | 1 - view/tpl/defperms.tpl | 1 - 7 files changed, 8 insertions(+), 10 deletions(-) diff --git a/Zotlabs/Module/Connedit.php b/Zotlabs/Module/Connedit.php index e0511b0d3..8288886cd 100644 --- a/Zotlabs/Module/Connedit.php +++ b/Zotlabs/Module/Connedit.php @@ -866,7 +866,7 @@ class Connedit extends \Zotlabs\Web\Controller { $o .= replace_macros($tpl, [ '$header' => (($self) ? t('Connection Default Permissions') : sprintf( t('Connection: %s'),$contact['xchan_name'])), '$autoperms' => array('autoperms',t('Apply these permissions automatically'), ((get_pconfig(local_channel(),'system','autoperms')) ? 1 : 0), t('Connection requests will be approved without your interaction'), $yes_no), - '$permcat' => [ 'permcat', t('Permission role'), '', '',$permcats ], + '$permcat' => [ 'permcat', t('Permission role'), '', '',$permcats ], '$permcat_new' => t('Add permission role'), '$permcat_enable' => feature_enabled(local_channel(),'permcats'), '$addr' => $contact['xchan_addr'], diff --git a/Zotlabs/Module/Defperms.php b/Zotlabs/Module/Defperms.php index 9214331e4..422333a50 100644 --- a/Zotlabs/Module/Defperms.php +++ b/Zotlabs/Module/Defperms.php @@ -237,7 +237,7 @@ class Defperms extends \Zotlabs\Web\Controller { $o .= replace_macros($tpl, [ '$header' => t('Connection Default Permissions'), '$autoperms' => array('autoperms',t('Apply these permissions automatically'), ((get_pconfig(local_channel(),'system','autoperms')) ? 1 : 0), t('If enabled, connection requests will be approved without your interaction'), $yes_no), - '$permcat' => [ 'permcat', t('Permission role'), '', '',$permcats ], + '$permcat' => [ 'permcat', t('Permission role'), '', '',$permcats ], '$permcat_new' => t('Add permission role'), '$permcat_enable' => feature_enabled(local_channel(),'permcats'), '$section' => $section, diff --git a/view/js/mod_connedit.js b/view/js/mod_connedit.js index 7100e0d07..34e9a3b21 100644 --- a/view/js/mod_connedit.js +++ b/view/js/mod_connedit.js @@ -19,7 +19,7 @@ $(document).ready(function() { $('#id_permcat').change(function() { - $('.loading-role-rotator').spin(true); + $('.loading').toggleClass('invisible'); var permName = $('#id_permcat').val(); loadAbookRole(permName); }); @@ -128,7 +128,7 @@ function loadAbookRole(name) { if(this.value) $('#me_id_perms_' + this.name).attr('checked','checked'); }); - $('.loading-role-rotator').spin(false); + $('.loading').toggleClass('invisible'); }); } diff --git a/view/js/mod_defperms.js b/view/js/mod_defperms.js index c89142579..18ebe268e 100644 --- a/view/js/mod_defperms.js +++ b/view/js/mod_defperms.js @@ -1,7 +1,7 @@ $(document).ready(function() { $('#id_permcat').change(function() { - $('.loading-role-rotator').show(); + $('.loading').toggleClass('invisible'); var permName = $('#id_permcat').val(); loadConnectionRole(permName); }); @@ -25,7 +25,7 @@ function loadConnectionRole(name) { if(this.value) $('#id_perms_' + this.name).attr('checked','checked'); }); - $('.loading-role-rotator').hide(); + $('.loading').toggleClass('invisible'); }); } diff --git a/view/js/mod_settings.js b/view/js/mod_settings.js index f9faa3d5c..d3392c748 100644 --- a/view/js/mod_settings.js +++ b/view/js/mod_settings.js @@ -19,7 +19,7 @@ $(document).ready(function() { }); $('#id_permcat_list').change(function() { - $('.loading-role-rotator').spin(true); + $('.loading').toggleClass('invisible'); var permName = $('#id_permcat').val(); loadPermcat(permName); }); @@ -172,7 +172,7 @@ function loadPermcat(name) { if(this.value) $('#me_id_perms_' + this.name).attr('checked','checked'); }); - $('.loading-role-rotator').spin(false); + $('.loading').toggleClass('invisible'); }); } diff --git a/view/tpl/abook_edit.tpl b/view/tpl/abook_edit.tpl index 13b94a560..81c182e1b 100755 --- a/view/tpl/abook_edit.tpl +++ b/view/tpl/abook_edit.tpl @@ -485,7 +485,6 @@ {{if $permcat_enable}} -
 {{$permcat_new}} {{include file="field_select.tpl" field=$permcat}} {{/if}} diff --git a/view/tpl/defperms.tpl b/view/tpl/defperms.tpl index f4a711957..5273ee91b 100755 --- a/view/tpl/defperms.tpl +++ b/view/tpl/defperms.tpl @@ -17,7 +17,6 @@

{{$permnote_self}}

{{if $permcat_enable}} -
 {{$permcat_new}} {{include file="field_select.tpl" field=$permcat}} {{/if}} -- cgit v1.2.3