From d076c005eaecaea6db2077952f63d653e766cb3d Mon Sep 17 00:00:00 2001 From: pero1203 Date: Fri, 19 Feb 2021 06:55:04 +0100 Subject: [PATCH] Moj profil je viden tudi na AAI (skrita so samo polja za urejanje), popravljen text pri brisanju uporabnika. --- admin/survey/SurveyAdmin.php | 8 +- admin/survey/SurveyAdminSettings.php | 142 ++++++++++++---------- admin/survey/classes/class.SurveyList.php | 8 +- admin/survey/script/dostop.js | 2 +- admin/survey/script/js-lang.php | 1 + lang/1.php | 4 +- lang/2.php | 6 +- 7 files changed, 90 insertions(+), 81 deletions(-) diff --git a/admin/survey/SurveyAdmin.php b/admin/survey/SurveyAdmin.php index 772b6caaf..12fef186c 100644 --- a/admin/survey/SurveyAdmin.php +++ b/admin/survey/SurveyAdmin.php @@ -333,12 +333,10 @@ class SurveyAdmin $text = (strlen($text) > 25) ? substr($text, 0, 25) . '...' : $text; - echo '
' . $text . ' '; - echo '
'; - // Za Arnes.si skrijemo zavihek moj profil, da ne morejo spremijati gesla - if($site_domain != '1ka.arnes.si') { + echo '
' . $text . ' '; + echo '
'; + echo '' . $lang['edit_data'] . ''; - } // Odjava na nov nacin preko frontend/api echo '
'; diff --git a/admin/survey/SurveyAdminSettings.php b/admin/survey/SurveyAdminSettings.php index f61dbab61..d253ac0a0 100644 --- a/admin/survey/SurveyAdminSettings.php +++ b/admin/survey/SurveyAdminSettings.php @@ -9284,7 +9284,7 @@ class SurveyAdminSettings { } function globalUserMyProfile () { - global $lang, $global_user_id, $admin_type, $site_domain, $site_url, $app_settings; + global $lang, $global_user_id, $admin_type, $site_domain, $site_url, $app_settings, $aai_instalacija; // podatki prijavljenega uporabnika $sql = sisplet_query("SELECT id, name, surname, email, type, gdpr_agree, last_login FROM users WHERE id = '$global_user_id'"); @@ -9366,60 +9366,66 @@ class SurveyAdminSettings { echo '
'; - echo '
'.$lang['name'].':'; - echo '
'; - - echo '
'.$lang['surname'].' :'; - echo '
'; + // AAI nima moznosti spreminjanja imena, priimka, emaila, gesla... + if($aai_instalacija){ + echo ''.$lang['srv_profil_aai_warning'].''; + } + else{ + echo '
'.$lang['name'].':'; + echo '
'; + + echo '
'.$lang['surname'].' :'; + echo '
'; - echo '
'.$lang['email'].' : '; - echo ' '; - echo ' '; - echo '  '; - $alternativni_emaili = User::getInstance()->allEmails('brez primarnega'); - echo ''; - if(!empty($alternativni_emaili)){ - foreach($alternativni_emaili as $email) { - echo '
 '; - echo ''; - echo ''; - echo 'active == 1 ? 'checked="checked"' : '').'> '; - } - } - echo '

'; + echo '
'.$lang['email'].' : '; + echo ' '; + echo ' '; + echo '  '; + + $alternativni_emaili = User::getInstance()->allEmails('brez primarnega'); + + echo ''; + if(!empty($alternativni_emaili)){ + foreach($alternativni_emaili as $email) { + echo '
 '; + echo ''; + echo ''; + echo 'active == 1 ? 'checked="checked"' : '').'> '; + } + } + echo '

'; - echo '
'; } diff --git a/admin/survey/classes/class.SurveyList.php b/admin/survey/classes/class.SurveyList.php index 423995214..a7e362a58 100644 --- a/admin/survey/classes/class.SurveyList.php +++ b/admin/survey/classes/class.SurveyList.php @@ -231,7 +231,7 @@ class SurveyList { * @desc prikaze zgornjo navigacijo */ function display_sub_tabs () { - global $lang, $global_user_id, $admin_type, $site_domain; + global $lang, $global_user_id, $admin_type, $site_domain, $aai_instalacija; $SLCount = $this->countSurveys(); @@ -451,7 +451,7 @@ class SurveyList { echo ''; } - #nastavitve uporabnika + // nastavitve uporabnika if($admin_type == 0) echo '
  • '; @@ -463,13 +463,11 @@ class SurveyList { echo '
  • '; - // Moj profil - preneseno iz sispleta (sispleta se ne bo uporabljalo vec) - if($site_domain != '1ka.arnes.si') { + // Moj profil echo '
  • '; echo ''; echo $lang['edit_data'] . ''; echo '
  • '; - } echo ''; } diff --git a/admin/survey/script/dostop.js b/admin/survey/script/dostop.js index 09ec73ceb..4a785f2a6 100644 --- a/admin/survey/script/dostop.js +++ b/admin/survey/script/dostop.js @@ -534,7 +534,7 @@ function izbrisiNepotrjenegaUporabnika(id) { function vsiUporabnikiAkcija(id, action) { var action = action || 'delete'; - if(action == 'delete' && !confirm(lang['srv_survey_list_users_confirm_delete'])){ + if(action == 'delete' && !confirm(lang['srv_survey_list_users_confirm_delete_warning'])){ return false; } diff --git a/admin/survey/script/js-lang.php b/admin/survey/script/js-lang.php index a5c3d3718..88106b6c0 100644 --- a/admin/survey/script/js-lang.php +++ b/admin/survey/script/js-lang.php @@ -179,6 +179,7 @@ lang('change_account_pass_conformation'); lang('cms_error_password_incorrect'); lang('password_err_complex'); lang('srv_survey_list_users_confirm_delete'); +lang('srv_survey_list_users_confirm_delete_warning'); lang('login_alternative_emails_error'); lang('login_alternative_emails_success'); lang('srv_user_exist'); diff --git a/lang/1.php b/lang/1.php index fcfc51608..c504c8d48 100644 --- a/lang/1.php +++ b/lang/1.php @@ -4975,7 +4975,8 @@ $lang = array ( 'srv_survey_list_users_registred' => "Registriran od", 'srv_survey_list_users_last_login' => "Zadnja prijava", 'srv_survey_list_users_aai' => 'AAI uporabnik', - 'srv_survey_list_users_confirm_delete' => 'Ali ste prepričani, da želite izbrisati uporabnika?', + 'srv_survey_list_users_confirm_delete' => 'Ali ste prepričani, da želite izbrisati uporabnika?', + 'srv_survey_list_users_confirm_delete_warning' => 'Ali ste prepričani, da želite izbrisati uporabnika?\n\nZ brisanjem uporabnika boste uporabniku odvzeli dostop do uporabe vaše aplikacije. Ankete bodo še vedno dostopne drugim urednikom ankete.', 'srv_survey_list_closed' => "Zaključena", 'srv_survey_list_inpreparation' => "V pripravi", 'srv_survey_finished' => "Vprašalnik zaključen?", @@ -7331,6 +7332,7 @@ $lang = array ( 'srv_login_tracking_date' => "Datum prijave", 'srv_last_login' => "Zadnja prijava", 'ob' => "ob", + 'srv_profil_aai_warning' => '1KA profil je vezan na vaš AAI račun. Vse spremembe urejate v vašem AAI profilu.', 'srv_drag_and_drop_new_look_option' => "Prikaži odgovore v obliki", 'srv_drag_and_drop_new_look_option1' => "okvirjev", 'srv_drag_and_drop_new_look_option2' => "škatel", diff --git a/lang/2.php b/lang/2.php index 51e192fb6..2e552e0e0 100644 --- a/lang/2.php +++ b/lang/2.php @@ -4944,8 +4944,9 @@ $lang = array ( 'srv_survey_list_users_registred' => "Registered on", 'srv_survey_list_users_last_login' => "Last login", 'srv_survey_list_users_aai' => 'AAI user', - 'srv_survey_list_users_confirm_delete' => 'You will delete this user, are you agree?', - 'srv_survey_list_closed' => "Closed", + 'srv_survey_list_users_confirm_delete' => 'You will delete this user, are you agree?', + 'srv_survey_list_users_confirm_delete_warning' => 'You will delete this user, are you agree?\n\nDeleting a user will deprive the user of access to use your application. The surveys will still be available to other survey editors.', + 'srv_survey_list_closed' => "Closed", 'srv_survey_list_inpreparation' => "In preparation", 'srv_survey_finished' => "Finished editing survey?", 'srv_quick_settings_osnovno' => "Basic settings", @@ -7213,6 +7214,7 @@ $lang = array ( 'srv_login_tracking_date' => "Login date", 'srv_last_login' => "Last login", 'ob' => "at", + 'srv_profil_aai_warning' => '1KA profile is linked to your AAI account. You edit all changes in your AAI profile. ', 'srv_diferencial_trak' => "Show answers on stripe", 'srv_diferencial_trak_starting_num' => "Stripe starts with", 'srv_drag_and_drop_new_look_option' => "Show answers shaped as",