[Redizajn 1KA] - Urejanje --> Nastavitve --> Obveščanje o izpolnjeni anketi - v1

Manjkajo ikone pri prejemnikih, prevodi, nov text za sistemske spremenljivke
This commit is contained in:
tejagerjovic 2022-01-05 02:43:52 +01:00
parent 36a6c1bbda
commit 202833e99a
5 changed files with 107 additions and 70 deletions

View File

@ -3236,7 +3236,7 @@ class SurveyAdminSettings {
if ($tab == 'complete') { if ($tab == 'complete') {
//echo '<h4>' . $lang['srv_alert_title'] . '</h4>'."\n"; //Obveščanje o izpolnjeni anketi
echo ' <form name="alertanketa_' . $anketa . '" action="ajax.php?a=editanketaalert&m='.$tab.'" method="post" autocomplete="off">' . "\n"; echo ' <form name="alertanketa_' . $anketa . '" action="ajax.php?a=editanketaalert&m='.$tab.'" method="post" autocomplete="off">' . "\n";
echo ' <input type="hidden" name="anketa" value="' . $anketa . '" />' . "\n"; echo ' <input type="hidden" name="anketa" value="' . $anketa . '" />' . "\n";
echo ' <input type="hidden" name="location" value="' . $_GET['a'] . '" />' . "\n"; echo ' <input type="hidden" name="location" value="' . $_GET['a'] . '" />' . "\n";
@ -3244,60 +3244,71 @@ class SurveyAdminSettings {
echo ' <input type="hidden" name="submited" value="1" />' . "\n"; echo ' <input type="hidden" name="submited" value="1" />' . "\n";
echo ' <fieldset>'. "\n"; echo ' <fieldset>';
echo ' <legend>' . $lang['srv_alert_prejemnik'] . '</legend>'. "\n"; echo ' <legend>' . $lang['srv_alert_completed_2'] . '</legend>';
// respondent - ne prikazemo ce gre za glasovanje oz. volitve echo '<div class="setting_holder">';
echo '<span class="setting_title">'.$lang['srv_alert_completed_prejemniki'].'</span>';
// respondent - ne prikazemo ce gre za glasovanje oz. volitve
if($rowS['survey_type'] != 0 && !SurveyInfo::getInstance()->checkSurveyModule('voting')){ if($rowS['survey_type'] != 0 && !SurveyInfo::getInstance()->checkSurveyModule('voting')){
echo '<p>'; echo '<div class="setting_item" id="label_alert_finish_respondent">';
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 '<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)); $this->display_alert_label('finish_respondent',($rowAlert['finish_respondent'] == 1));
echo '</span>'. "\n"; echo '</div>';
// Ce imamo vec prevodov omogocimo za vsak prevod svoj email // Ce imamo vec prevodov omogocimo za vsak prevod svoj email - v delu @TG
$this->display_alert_label('finish_respondent_language',($rowAlert['finish_respondent'] == 1)); $this->display_alert_label('finish_respondent_language',($rowAlert['finish_respondent'] == 1));
echo '</p>';
} }
// respondent iz cms ne prikazemo ce gre za volitve // respondent iz cms ne prikazemo ce gre za volitve
if(!SurveyInfo::getInstance()->checkSurveyModule('voting')){ if(!SurveyInfo::getInstance()->checkSurveyModule('voting')){
echo '<div class="setting_item" id="label_alert_finish_respondent_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)); change_alert_instruction($(this)); $(\'form[name=alertanketa_' . $anketa . ']\').submit(); return false;" ' . ($rowAlert['finish_respondent_cms'] == 1 ? ' checked' : '') . '>'; 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)); change_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)); $this->display_alert_label('finish_respondent_cms',($rowAlert['finish_respondent_cms'] == 1));
echo '</span></p>'. "\n"; echo '</div>';
} }
//Avtor ankete oz. souredniki
// avtor ankete oz osebe z dostopom echo '<div class="setting_item" id="label_alert_finish_author">';
//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 '<input type="checkbox" name="alert_finish_author" id="alert_finish_author" value="1" onChange="change_alert_respondent(\'finish_author\', $(this));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)); $this->display_alert_label('finish_author',($rowAlert['finish_author'] == 1));
echo '</span></p>'; echo '</div>';
// posebej navedeni maili //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 '<div class="setting_item">';
echo '<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'] .'</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_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> '; 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']); } if ($rowAlert['finish_other_if']>0) { if ($b==null) $b = new Branching($this->anketa); $b->conditions_display($rowAlert['finish_other_if']); }
echo '</p>'; echo '</div>';
echo '<p id="alert_holder_finish_other_emails" '.($rowAlert['finish_other'] == 0 ? 'class="displayNone"' : '' ).'>'; echo '<div class="setting_item">';
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>';
echo '<br />';
echo '<fieldset>'; echo '<div class="setting_holder alert_other_emails '.($rowAlert['finish_other'] == 0 ? 'displayNone' : '' ).'" id="alert_holder_finish_other_emails">';
echo '<legend>' . $lang['srv_alert_oblika'] . '</legend>'; echo '<label for="alert_finish_other_emails">' . $lang['email_prejemniki_one_per_line'] . ':</label>';
echo '<div style="float:left; width:auto;">'; echo '<textarea class="alert_other_emails" name="alert_finish_other_emails" id="alert_finish_other_emails">' . $rowAlert['delete_other_emails'] . '</textarea>';
echo '<p><label for="alert_finish_subject">' . $lang['subject'] . ': <input type="text" id="alert_finish_subject" name="alert_finish_subject" value="' . ($rowAlert['finish_subject'] ? $rowAlert['finish_subject'] : $lang['srv_alert_finish_subject']) . '" size="90"/></label></p>'; echo '</div>';
echo '<p><label for="reply_to">'.$lang['srv_replay_to'].': <input type="text" id="reply_to" name="reply_to" value="' . ($rowAlert['reply_to'] ? $rowAlert['reply_to'] : $MailReply) . '" size="40"/></label></p>'; echo '</div>';
echo '<div id="obvescanje_sidebyside_holder">';
echo '<div id="obvescanje_sidebyside_left">';
echo '<p class="bold caps bottom16">'.$lang['message_content'].'</p>';
echo '<div class="setting_holder">';
echo '<label for="alert_finish_subject">' . $lang['subject'] . ': </label>';
echo '<input type="text" class="large wauto" id="alert_finish_subject" name="alert_finish_subject" value="' . ($rowAlert['finish_subject'] ? $rowAlert['finish_subject'] : $lang['srv_alert_finish_subject']) . '"/>';
echo '</div>';
echo '<div class="setting_holder">';
echo '<label for="reply_to">' . $lang['srv_replay_to'] . ': </label>';
echo '<input type="text" class="large wauto" id="reply_to" name="reply_to" value="' . ($rowAlert['reply_to'] ? $rowAlert['reply_to'] : $MailReply) . '"/>';
echo '</div>';
if ($rowAlert['finish_text'] != '') { if ($rowAlert['finish_text'] != '') {
$text = $rowAlert['finish_text']; $text = $rowAlert['finish_text'];
} }
@ -3309,30 +3320,43 @@ class SurveyAdminSettings {
} }
// prikaze editor za ne-spremenljivko (za karkoli druzga pac) // prikaze editor za ne-spremenljivko (za karkoli druzga pac)
echo ' <p><label for="alert_finish_text">' . $lang['text'] . ':</label>'; echo '<div class="setting_holder">';
echo ' <textarea name="alert_finish_text" id="alert_finish_text" rows="3" >' . $text . '</textarea>';
echo ' </p>'; echo '<label class="bottom4" for="alert_finish_text">' . $lang['message'] . ':</label>';
echo '</div>'; echo '<textarea name="alert_finish_text" id="alert_finish_text">' . $text . '</textarea>';
echo '<div style="float:left; width:auto; max-width:330px; margin-left:10px;">';
echo '<div id="div_error">'; echo '</div>';
echo $lang['srv_alert_instruction1']; echo '</div>';
//Navodila na desni
echo '<div id="obvescanje_sidebyside_right">';
echo '<div class="message_instructions">';
echo '<p class="bold caps bottom16">'.$lang['srv_alert_instruction1'].'</p>';
echo '<p class="bold bottom16">'.$lang['srv_alert_instruction1a'].':</p>';
echo '<div class="izpolnjena_spremenljivke">';
// ta se skriva, potreben respondent iz CMS, da dobi NAME // ta se skriva, potreben respondent iz CMS, da dobi NAME
echo '<span id="alert_respondent_cms_instruction" class="'.( $rowAlert['finish_respondent_cms'] == 1 ? '' : 'displayNone').'">'.$lang['srv_alert_instruction2'].'</span>'; echo '<span id="alert_respondent_cms_instruction" class="'.( $rowAlert['finish_respondent_cms'] == 1 ? '' : 'displayNone').'">'.$lang['srv_alert_instruction2'].'</span>';
echo $lang['srv_alert_instruction_survey'].'<br/>'; echo '<p>'.$lang['srv_alert_instruction_survey'].'</p>';
echo $lang['srv_alert_instruction_date'].'<br/>'; echo '<p>'.$lang['srv_alert_instruction_date'].'</p>';
echo $lang['srv_alert_instruction_site'].'<br/>'; echo '<p>'.$lang['srv_alert_instruction_site'].'</p>';
echo $lang['srv_alert_instruction_url'].'<br/>'; echo '<p>'.$lang['srv_alert_instruction_url'].'</p>';
echo $lang['srv_alert_instruction_pdf'].'<br/>'; echo '<p>'.$lang['srv_alert_instruction_pdf'].'</p>';
echo $lang['srv_alert_instruction_rtf'].'<br/>'; echo '<p>'.$lang['srv_alert_instruction_rtf'].'</p>';
$row = SurveyInfo::getInstance()->getSurveyRow(); $row = SurveyInfo::getInstance()->getSurveyRow();
# če imamo prepoznavanje uporabnik iz CMS, potem ponudimo tudi META_REFERAL_URL # če imamo prepoznavanje uporabnik iz CMS, potem ponudimo tudi META_REFERAL_URL
echo $lang['srv_alert_instruction_meta_referer_url'].'<br/>'; echo '<p>'.$lang['srv_alert_instruction_meta_referer_url'].'</p>';
echo $lang['srv_alert_instruction_system'];
echo $lang['srv_alert_instruction_sample']; echo '</div>';
echo $lang['srv_alert_instruction_available'];
echo '<div class="izpolnjena_spremenljivke">';
# echo $lang['srv_alert_instruction3'];
echo '<p>'.$lang['srv_alert_instruction_system'].'</p>';
echo '<p>'.$lang['srv_alert_instruction_sample'].'</p>';
echo '<p>'.$lang['srv_alert_instruction_available'].'</p>';
$sqlSistemske = sisplet_query("SELECT s.id, s.naslov, s.variable FROM srv_spremenljivka s, srv_grupa g WHERE s.sistem='1' AND s.gru_id=g.id AND g.ank_id='$anketa' ORDER BY g.vrstni_red, s.vrstni_red"); $sqlSistemske = sisplet_query("SELECT s.id, s.naslov, s.variable FROM srv_spremenljivka s, srv_grupa g WHERE s.sistem='1' AND s.gru_id=g.id AND g.ank_id='$anketa' ORDER BY g.vrstni_red, s.vrstni_red");
$prefix = ""; $prefix = "";
while ($rowSistemske = mysqli_fetch_assoc($sqlSistemske)) { while ($rowSistemske = mysqli_fetch_assoc($sqlSistemske)) {
@ -3342,17 +3366,21 @@ class SurveyAdminSettings {
if ($prefix == "") { // ni sistemskih spremenljivk if ($prefix == "") { // ni sistemskih spremenljivk
echo '<p class="red">'.$lang['srv_alert_no_sys_var'].'</p>'; echo '<p class="red">'.$lang['srv_alert_no_sys_var'].'</p>';
} }
echo '</span>';
echo '</div>';
echo '</div>'; echo '</div>';
echo '</div>'; echo '</div>';
echo ' </fieldset>';
echo '</div>';
echo '<br />';
echo '</fieldset>';
echo ' <span class="floatLeft spaceRight"><div class="buttonwrapper"><a class="ovalbutton ovalbutton_orange btn_savesettings" href="#" onclick="document.alertanketa_' . $rowS['id'] . '.submit(); return false;"><span>'; echo '<div class="button_holder">';
echo $lang['edit1337'] . '</span></a></div></span>'; echo '<button class="medium white-blue" onClick="window.location='.$preklici_url.';return false;">'.$lang['edit1338'].'</button>';
echo '<button class="medium blue" onclick="document.alertanketa_' . $rowS['id'] . '.submit(); return false;">'.$lang['edit1337'].'</button>';
echo '<div class="clr"></div>'; echo '</div>';
if ($_GET['s'] == '1') { if ($_GET['s'] == '1') {
echo '<div id="success_save"></div>'; echo '<div id="success_save"></div>';

View File

@ -2115,6 +2115,7 @@ $lang = array (
"srv_alert_active_1" => "Spremembi aktivnosti", "srv_alert_active_1" => "Spremembi aktivnosti",
"srv_alert_delete_1" => "Izbrisu ankete", "srv_alert_delete_1" => "Izbrisu ankete",
"srv_alert_completed_2" => "Obveščanje o izpolnjeni anketi", "srv_alert_completed_2" => "Obveščanje o izpolnjeni anketi",
"srv_alert_completed_prejemniki" => "Obvestilo o izpolnjeni anketi prejmejo naslednji prejemniki:",
"srv_alert_expired_2" => "Obveščanje o izteku ankete", "srv_alert_expired_2" => "Obveščanje o izteku ankete",
"srv_alert_active_2" => "Obveščanje o spremembi aktivnosti", "srv_alert_active_2" => "Obveščanje o spremembi aktivnosti",
"srv_alert_active_prejemniki" => "Obvestilo o spremembi aktivnosti prejmejo naslednji prejemniki:", "srv_alert_active_prejemniki" => "Obvestilo o spremembi aktivnosti prejmejo naslednji prejemniki:",

View File

@ -2102,6 +2102,7 @@ $lang = array (
"srv_alert_active_1" => "activation changes", "srv_alert_active_1" => "activation changes",
"srv_alert_delete_1" => "survey deletion", "srv_alert_delete_1" => "survey deletion",
"srv_alert_completed_2" => "Alert about completed survey", "srv_alert_completed_2" => "Alert about completed survey",
"srv_alert_completed_prejemniki" => "Survey completion notifications will be sent to the following recipients:",
"srv_alert_expired_2" => "Alert about survey expiration", "srv_alert_expired_2" => "Alert about survey expiration",
"srv_alert_active_2" => "Alert about activation changes", "srv_alert_active_2" => "Alert about activation changes",
"srv_alert_active_prejemniki" => "Survey activation notifications will be sent to the following recipients:", "srv_alert_active_prejemniki" => "Survey activation notifications will be sent to the following recipients:",

View File

@ -13952,7 +13952,7 @@ fieldset #obvescanje_sidebyside_holder #obvescanje_sidebyside_left {
flex-shrink: 0; flex-shrink: 0;
} }
fieldset #obvescanje_sidebyside_holder #obvescanje_sidebyside_right { fieldset #obvescanje_sidebyside_holder #obvescanje_sidebyside_right {
flex-grow: 1; flex-grow: 0;
} }
fieldset #obvescanje_sidebyside_holder #obvescanje_sidebyside_right div.message_instructions { fieldset #obvescanje_sidebyside_holder #obvescanje_sidebyside_right div.message_instructions {
background-color: #F8F8F8; background-color: #F8F8F8;
@ -13961,6 +13961,9 @@ fieldset #obvescanje_sidebyside_holder #obvescanje_sidebyside_right div.message_
padding: 16px; padding: 16px;
margin-left: 32px; margin-left: 32px;
} }
fieldset #obvescanje_sidebyside_holder #obvescanje_sidebyside_right div.message_instructions div.izpolnjena_spremenljivke {
margin-bottom: 16px;
}
fieldset .setting_holder.alert_other_emails { fieldset .setting_holder.alert_other_emails {
margin-left: 24px; margin-left: 24px;
} }

View File

@ -11,7 +11,7 @@ fieldset{
} }
#obvescanje_sidebyside_right { #obvescanje_sidebyside_right {
flex-grow: 1; flex-grow: 0;
div.message_instructions { div.message_instructions {
background-color: $light-gray; background-color: $light-gray;
@ -19,6 +19,10 @@ fieldset{
box-sizing: border-box; box-sizing: border-box;
padding: 16px; padding: 16px;
margin-left: 32px; margin-left: 32px;
div.izpolnjena_spremenljivke {
margin-bottom: 16px;
}
} }
} }