diff --git a/admin/survey/SurveyAdminSettings.php b/admin/survey/SurveyAdminSettings.php index 9c77643f1..080d975fa 100644 --- a/admin/survey/SurveyAdminSettings.php +++ b/admin/survey/SurveyAdminSettings.php @@ -2779,95 +2779,44 @@ class SurveyAdminSettings { echo '
'. "\n"; echo ' ' . $lang['srv_alert_prejemnik'] . ''. "\n"; - - // Vklop/izklop obvescanja lahko naredi samo admin ali manager - if(true /*$admin_type == 0 || $admin_type == 1 || (isset($app_settings['commercial_packages']) && $app_settings['commercial_packages'] == true)*/){ - // respondent - ne prikazemo ce gre za glasovanje - if($rowS['survey_type'] != 0){ - echo '

'; - echo ''; - echo ''; - $this->display_alert_label('finish_respondent',($rowAlert['finish_respondent'] == 1)); - echo ''. "\n"; - - // Ce imamo vec prevodov omogocimo za vsak prevod svoj email - $this->display_alert_label('finish_respondent_language',($rowAlert['finish_respondent'] == 1)); - echo '

'; - } - //respondent iz cms - echo '

'; - echo ''; - $this->display_alert_label('finish_respondent_cms',($rowAlert['finish_respondent_cms'] == 1)); - echo '

'. "\n"; - - // avtor ankete oz osebe z dostopom - //echo '

'; - echo '

'; - echo ''; - $this->display_alert_label('finish_author',($rowAlert['finish_author'] == 1)); - echo '

'; - - // posebej navedeni maili - echo '

'; - echo ' '; - echo ' '; - if ($rowAlert['finish_other_if']>0) { if ($b==null) $b = new Branching($this->anketa); $b->conditions_display($rowAlert['finish_other_if']); } - echo '

'; - - echo '

'; - echo '' . - '' . - '

'; - } - // Ostali samo vidijo kaj je vklopljeno - else{ - // Text z obvestilom in linkom na cenik/obrazec za vklop nastavitev - echo '

'.$lang['srv_alert_turnOn_text'].'

'; - // respondent - ne prikazemo ce gre za glasovanje - if($rowS['survey_type'] != 0){ - echo '

'; - echo ''; - $value = $rowAlert['finish_respondent'] == 1 ? 1 : 0; - echo ''; - echo ''; - $this->display_alert_label('finish_respondent',($rowAlert['finish_respondent'] == 1)); - echo ''. "\n"; - - // Ce imamo vec prevodov omogocimo za vsak prevod svoj email - $this->display_alert_label('finish_respondent_language',($rowAlert['finish_respondent'] == 1)); - echo '

'; - } - //respondent iz cms - echo '

'; - $value = $rowAlert['finish_respondent_cms'] == 1 ? 1 : 0; - echo ''; - echo ''; - $this->display_alert_label('finish_respondent_cms',($rowAlert['finish_respondent_cms'] == 1)); - echo '

'. "\n"; + // respondent - ne prikazemo ce gre za glasovanje oz. volitve + if($rowS['survey_type'] != 0 && !SurveyInfo::getInstance()->checkSurveyModule('voting')){ + echo '

'; + echo ''; + echo ''; + $this->display_alert_label('finish_respondent',($rowAlert['finish_respondent'] == 1)); + echo ''. "\n"; + + // Ce imamo vec prevodov omogocimo za vsak prevod svoj email + $this->display_alert_label('finish_respondent_language',($rowAlert['finish_respondent'] == 1)); + echo '

'; + } - // avtor ankete oz osebe z dostopom - echo '

'; - $value = $rowAlert['finish_author'] == 1 ? 1 : 0; - echo ''; - echo ''; - $this->display_alert_label('finish_author',($rowAlert['finish_author'] == 1)); - echo '

'; + //respondent iz cms + echo '

'; + echo ''; + $this->display_alert_label('finish_respondent_cms',($rowAlert['finish_respondent_cms'] == 1)); + echo '

'. "\n"; - // posebej navedeni maili - echo '

'. $lang['email_one_per_line']; - $value = $rowAlert['finish_other'] == 1 || ($rowAlert['finish_other_emails'] && $rowAlert['finish_other'] != 0) ? 1 : 0; - echo ''; - echo ' '; - echo ' '; - if ($rowAlert['finish_other_if']>0) { if ($b==null) $b = new Branching($this->anketa); $b->conditions_display($rowAlert['finish_other_if']); } - echo '

'; - - echo '

'; - echo '' . - '' . - '

'; - } + // avtor ankete oz osebe z dostopom + //echo '

'; + echo '

'; + echo ''; + $this->display_alert_label('finish_author',($rowAlert['finish_author'] == 1)); + echo '

'; + + // posebej navedeni maili + echo '

'; + echo ' '; + echo ' '; + if ($rowAlert['finish_other_if']>0) { if ($b==null) $b = new Branching($this->anketa); $b->conditions_display($rowAlert['finish_other_if']); } + echo '

'; + + echo '

'; + echo '' . + '' . + '

'; echo '
'; diff --git a/admin/survey/modules/mod_voting/class.SurveyVoting.php b/admin/survey/modules/mod_voting/class.SurveyVoting.php index 74dd8ee7b..40c74e9d7 100644 --- a/admin/survey/modules/mod_voting/class.SurveyVoting.php +++ b/admin/survey/modules/mod_voting/class.SurveyVoting.php @@ -36,6 +36,9 @@ class SurveyVoting{ // Vklopimo email vabila sisplet_query("UPDATE srv_anketa SET user_base='1', show_email='0' WHERE id='".$this->anketa."'"); sisplet_query("INSERT INTO srv_anketa_module (ank_id, modul) VALUES ('".$this->anketa."', 'email')"); + + // Ugasnemo obvescanje respondenta + sisplet_query("UPDATE srv_alert SET finish_respondent='0' WHERE ank_id='".$this->anketa."'"); } // Nastavitve volitev