Pri volitvah ne pustimo obvescanja respondenta
This commit is contained in:
parent
dacf49fcdb
commit
a746f33350
@ -2779,95 +2779,44 @@ class SurveyAdminSettings {
|
||||
|
||||
echo ' <fieldset>'. "\n";
|
||||
echo ' <legend>' . $lang['srv_alert_prejemnik'] . '</legend>'. "\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 '<p>';
|
||||
echo '<input type="checkbox" name="alert_finish_respondent" id="alert_finish_respondent" value="1" onChange="change_alert_respondent(\'finish_respondent\', $(this)); $(\'form[name=alertanketa_' . $anketa . ']\').submit(); return false;" ' . ($rowAlert['finish_respondent'] == 1 ? ' checked' : '') . '>';
|
||||
echo '<span id="label_alert_finish_respondent">';
|
||||
$this->display_alert_label('finish_respondent',($rowAlert['finish_respondent'] == 1));
|
||||
echo '</span>'. "\n";
|
||||
|
||||
// Ce imamo vec prevodov omogocimo za vsak prevod svoj email
|
||||
$this->display_alert_label('finish_respondent_language',($rowAlert['finish_respondent'] == 1));
|
||||
echo '</p>';
|
||||
}
|
||||
//respondent iz cms
|
||||
echo '<p><input type="checkbox" name="alert_finish_respondent_cms" id="alert_finish_respondent_cms" value="1" onChange="change_alert_respondent(\'finish_respondent_cms\', $(this)); chnage_alert_instruction($(this)); $(\'form[name=alertanketa_' . $anketa . ']\').submit(); return false;" ' . ($rowAlert['finish_respondent_cms'] == 1 ? ' checked' : '') . '>';
|
||||
echo '<span id="label_alert_finish_respondent_cms">';
|
||||
$this->display_alert_label('finish_respondent_cms',($rowAlert['finish_respondent_cms'] == 1));
|
||||
echo '</span></p>'. "\n";
|
||||
|
||||
// avtor ankete oz osebe z dostopom
|
||||
//echo '<p><input type="checkbox" name="alert_finish_author" id="alert_finish_author" value="1" onChange="change_alert_respondent(\'finish_author\', $(this)); $(\'form[name=alertanketa_' . $anketa . ']\').submit(); return false;"' . ($rowAlert['finish_author'] == 1 ? ' checked' : '') . '>';
|
||||
echo '<p><input type="checkbox" name="alert_finish_author" id="alert_finish_author" value="1" onChange="change_alert_respondent(\'finish_author\', $(this));"' . ($rowAlert['finish_author'] == 1 ? ' checked' : '') . '>';
|
||||
echo '<span id="label_alert_finish_author">';
|
||||
$this->display_alert_label('finish_author',($rowAlert['finish_author'] == 1));
|
||||
echo '</span></p>';
|
||||
|
||||
// posebej navedeni maili
|
||||
echo '<p><input type="checkbox" name="alert_finish_other" id="alert_finish_other" value="1"' . (($rowAlert['finish_other'] == 1 || ($rowAlert['finish_other_emails'] && $rowAlert['finish_other'] != 0)) ? ' checked' : '') . ' onchange="toggleStatusAlertOtherCheckbox(\'finish_other\'); if ( ! $(this).attr(\'checked\') ) { $(\'form[name=alertanketa_' . $anketa . ']\').submit(); }"><label for="alert_finish_other">' . $lang['email_prejemniki'] . $lang['email_one_per_line'] . '</label>';
|
||||
echo ' <a href="#" onclick="alert_custom(\'other\', \'0\'); return false;" title="'.$lang['srv_alert_custom'].'"><span class="faicon text_file_small"></span></a>';
|
||||
echo ' <a href="#" onclick="alert_edit_if(\'4\'); return false;"><span class="faicon if_add" '.($rowAlert['finish_other_if']==0?'style=""':'').'></span></a> ';
|
||||
if ($rowAlert['finish_other_if']>0) { if ($b==null) $b = new Branching($this->anketa); $b->conditions_display($rowAlert['finish_other_if']); }
|
||||
echo '</p>';
|
||||
|
||||
echo '<p id="alert_holder_finish_other_emails" '.($rowAlert['finish_other'] == 0 ? 'class="displayNone"' : '' ).'>';
|
||||
echo '<label for="alert_finish_other_emails">' . $lang['email'] . ':</label>' .
|
||||
'<textarea name="alert_finish_other_emails" id="alert_finish_other_emails" style="height:100px" onblur="$(\'form[name=alertanketa_' . $anketa . ']\').submit();">' . $rowAlert['finish_other_emails'] . '</textarea>' .
|
||||
'</p>';
|
||||
}
|
||||
// Ostali samo vidijo kaj je vklopljeno
|
||||
else{
|
||||
// Text z obvestilom in linkom na cenik/obrazec za vklop nastavitev
|
||||
echo '<p>'.$lang['srv_alert_turnOn_text'].'</p>';
|
||||
|
||||
// respondent - ne prikazemo ce gre za glasovanje
|
||||
if($rowS['survey_type'] != 0){
|
||||
echo '<p>';
|
||||
echo '<input type="checkbox" ' . ($rowAlert['finish_respondent'] == 1 ? ' checked' : '') . ' disabled="disabled">';
|
||||
$value = $rowAlert['finish_respondent'] == 1 ? 1 : 0;
|
||||
echo '<input type="hidden" name="alert_finish_respondent" value="'.$value.'">';
|
||||
echo '<span id="label_alert_finish_respondent">';
|
||||
$this->display_alert_label('finish_respondent',($rowAlert['finish_respondent'] == 1));
|
||||
echo '</span>'. "\n";
|
||||
|
||||
// Ce imamo vec prevodov omogocimo za vsak prevod svoj email
|
||||
$this->display_alert_label('finish_respondent_language',($rowAlert['finish_respondent'] == 1));
|
||||
echo '</p>';
|
||||
}
|
||||
//respondent iz cms
|
||||
echo '<p><input type="checkbox" ' . ($rowAlert['finish_respondent_cms'] == 1 ? ' checked' : '') . ' disabled="disabled">';
|
||||
$value = $rowAlert['finish_respondent_cms'] == 1 ? 1 : 0;
|
||||
echo '<input type="hidden" name="alert_finish_respondent_cms" value="'.$value.'">';
|
||||
echo '<span id="label_alert_finish_respondent_cms">';
|
||||
$this->display_alert_label('finish_respondent_cms',($rowAlert['finish_respondent_cms'] == 1));
|
||||
echo '</span></p>'. "\n";
|
||||
// respondent - ne prikazemo ce gre za glasovanje oz. volitve
|
||||
if($rowS['survey_type'] != 0 && !SurveyInfo::getInstance()->checkSurveyModule('voting')){
|
||||
echo '<p>';
|
||||
echo '<input type="checkbox" name="alert_finish_respondent" id="alert_finish_respondent" value="1" onChange="change_alert_respondent(\'finish_respondent\', $(this)); $(\'form[name=alertanketa_' . $anketa . ']\').submit(); return false;" ' . ($rowAlert['finish_respondent'] == 1 ? ' checked' : '') . '>';
|
||||
echo '<span id="label_alert_finish_respondent">';
|
||||
$this->display_alert_label('finish_respondent',($rowAlert['finish_respondent'] == 1));
|
||||
echo '</span>'. "\n";
|
||||
|
||||
// Ce imamo vec prevodov omogocimo za vsak prevod svoj email
|
||||
$this->display_alert_label('finish_respondent_language',($rowAlert['finish_respondent'] == 1));
|
||||
echo '</p>';
|
||||
}
|
||||
|
||||
// avtor ankete oz osebe z dostopom
|
||||
echo '<p><input type="checkbox" ' . ($rowAlert['finish_author'] == 1 ? ' checked' : '') . ' disabled="disabled">';
|
||||
$value = $rowAlert['finish_author'] == 1 ? 1 : 0;
|
||||
echo '<input type="hidden" name="alert_finish_author" value="'.$value.'">';
|
||||
echo '<span id="label_alert_finish_author">';
|
||||
$this->display_alert_label('finish_author',($rowAlert['finish_author'] == 1));
|
||||
echo '</span></p>';
|
||||
//respondent iz cms
|
||||
echo '<p><input type="checkbox" name="alert_finish_respondent_cms" id="alert_finish_respondent_cms" value="1" onChange="change_alert_respondent(\'finish_respondent_cms\', $(this)); chnage_alert_instruction($(this)); $(\'form[name=alertanketa_' . $anketa . ']\').submit(); return false;" ' . ($rowAlert['finish_respondent_cms'] == 1 ? ' checked' : '') . '>';
|
||||
echo '<span id="label_alert_finish_respondent_cms">';
|
||||
$this->display_alert_label('finish_respondent_cms',($rowAlert['finish_respondent_cms'] == 1));
|
||||
echo '</span></p>'. "\n";
|
||||
|
||||
// posebej navedeni maili
|
||||
echo '<p><input type="checkbox" ' . (($rowAlert['finish_other'] == 1 || ($rowAlert['finish_other_emails'] && $rowAlert['finish_other'] != 0)) ? ' checked' : '') . ' disabled="disabled"><label for="alert_finish_other">' . $lang['email_prejemniki'] .'</label>'. $lang['email_one_per_line'];
|
||||
$value = $rowAlert['finish_other'] == 1 || ($rowAlert['finish_other_emails'] && $rowAlert['finish_other'] != 0) ? 1 : 0;
|
||||
echo '<input type="hidden" name="alert_finish_other" value="'.$value.'">';
|
||||
echo ' <a href="#" onclick="alert_custom(\'other\', \'0\'); return false;" title="'.$lang['srv_alert_custom'].'"><span class="faicon text_file_small"></span></a>';
|
||||
echo ' <a href="#" onclick="alert_edit_if(\'4\'); return false;"><span class="faicon if_add" '.($rowAlert['finish_other_if']==0?'style=""':'').'></span></a> ';
|
||||
if ($rowAlert['finish_other_if']>0) { if ($b==null) $b = new Branching($this->anketa); $b->conditions_display($rowAlert['finish_other_if']); }
|
||||
echo '</p>';
|
||||
|
||||
echo '<p id="alert_holder_finish_other_emails" '.($rowAlert['finish_other'] == 0 ? 'class="displayNone"' : '' ).'>';
|
||||
echo '<label for="alert_finish_other_emails">' . $lang['email'] . ':</label>' .
|
||||
'<textarea name="alert_finish_other_emails" id="alert_finish_other_emails" style="height:100px" onblur="$(\'form[name=alertanketa_' . $anketa . ']\').submit();">' . $rowAlert['finish_other_emails'] . '</textarea>' .
|
||||
'</p>';
|
||||
}
|
||||
// avtor ankete oz osebe z dostopom
|
||||
//echo '<p><input type="checkbox" name="alert_finish_author" id="alert_finish_author" value="1" onChange="change_alert_respondent(\'finish_author\', $(this)); $(\'form[name=alertanketa_' . $anketa . ']\').submit(); return false;"' . ($rowAlert['finish_author'] == 1 ? ' checked' : '') . '>';
|
||||
echo '<p><input type="checkbox" name="alert_finish_author" id="alert_finish_author" value="1" onChange="change_alert_respondent(\'finish_author\', $(this));"' . ($rowAlert['finish_author'] == 1 ? ' checked' : '') . '>';
|
||||
echo '<span id="label_alert_finish_author">';
|
||||
$this->display_alert_label('finish_author',($rowAlert['finish_author'] == 1));
|
||||
echo '</span></p>';
|
||||
|
||||
// posebej navedeni maili
|
||||
echo '<p><input type="checkbox" name="alert_finish_other" id="alert_finish_other" value="1"' . (($rowAlert['finish_other'] == 1 || ($rowAlert['finish_other_emails'] && $rowAlert['finish_other'] != 0)) ? ' checked' : '') . ' onchange="toggleStatusAlertOtherCheckbox(\'finish_other\'); if ( ! $(this).attr(\'checked\') ) { $(\'form[name=alertanketa_' . $anketa . ']\').submit(); }"><label for="alert_finish_other">' . $lang['email_prejemniki'] . $lang['email_one_per_line'] . '</label>';
|
||||
echo ' <a href="#" onclick="alert_custom(\'other\', \'0\'); return false;" title="'.$lang['srv_alert_custom'].'"><span class="faicon text_file_small"></span></a>';
|
||||
echo ' <a href="#" onclick="alert_edit_if(\'4\'); return false;"><span class="faicon if_add" '.($rowAlert['finish_other_if']==0?'style=""':'').'></span></a> ';
|
||||
if ($rowAlert['finish_other_if']>0) { if ($b==null) $b = new Branching($this->anketa); $b->conditions_display($rowAlert['finish_other_if']); }
|
||||
echo '</p>';
|
||||
|
||||
echo '<p id="alert_holder_finish_other_emails" '.($rowAlert['finish_other'] == 0 ? 'class="displayNone"' : '' ).'>';
|
||||
echo '<label for="alert_finish_other_emails">' . $lang['email'] . ':</label>' .
|
||||
'<textarea name="alert_finish_other_emails" id="alert_finish_other_emails" style="height:100px" onblur="$(\'form[name=alertanketa_' . $anketa . ']\').submit();">' . $rowAlert['finish_other_emails'] . '</textarea>' .
|
||||
'</p>';
|
||||
|
||||
echo '</fieldset>';
|
||||
|
||||
|
@ -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
|
||||
|
Loading…
x
Reference in New Issue
Block a user