This commit is contained in:
pero1203 2021-11-22 10:13:56 +01:00
commit 4dc4219a0c
9 changed files with 164 additions and 64 deletions

View File

@ -2293,8 +2293,6 @@ class SurveyAdmin
|| $_GET['a'] == 'json_survey_export'
){
//TODO: stari divi okrog nastavitev - kam prestaviti pogoje? @TG2
if ($this->isAnketar) {
return;
}

View File

@ -1340,39 +1340,70 @@ class SurveyAdminSettings {
/*Nastavitve prikaza za mobilnike*/
if ($_GET['a'] == 'mobile_settings') {
SurveySetting::getInstance()->Init($this->anketa);
echo '<fieldset class="wide">';
SurveySetting::getInstance()->Init($this->anketa);
echo '<fieldset>';
echo '<legend>'.$lang['srv_mobile_settings_title'].'</legend>';
// Prikaz slik pri mobilnikih (default da)
$mobile_friendly = SurveySetting::getInstance()->getSurveyMiscSetting('mobile_friendly');
echo '<span class="nastavitveSpan2" >'.$lang['srv_settings_mobile_friendly'].':</span>';
echo '<label for="mobile_friendly_1"><input type="radio" name="mobile_friendly" id="mobile_friendly_1" '.($mobile_friendly==='1'?' checked':'').' value="1" onClick="$(\'#mobile_settings_other\').show();">'.$lang['yes'].'</label> ';
echo '<label for="mobile_friendly_0"><input type="radio" name="mobile_friendly" id="mobile_friendly_0" '.($mobile_friendly!=='1'?' checked':'').' value="0" onClick="$(\'#mobile_settings_other\').hide();">'.$lang['no'].'</label> ';
echo '<div class="setting_holder">';
echo '<span class="setting_title" >'.$lang['srv_settings_mobile_friendly'].':</span>';
echo '<div class="setting_item">';
echo '<input type="radio" name="mobile_friendly" id="mobile_friendly_1" '.($mobile_friendly==='1'?' checked':'').' value="1" onClick="$(\'#mobile_settings_other\').show();">';
echo '<label for="mobile_friendly_1">'.$lang['yes'].'</label>';
echo '</div>';
echo '<div class="setting_item">';
echo '<input type="radio" name="mobile_friendly" id="mobile_friendly_0" '.($mobile_friendly!=='1'?' checked':'').' value="0" onClick="$(\'#mobile_settings_other\').hide();">';
echo '<label for="mobile_friendly_0">'.$lang['no'].'</label> ';
echo '</div>';
$display = ($mobile_friendly == 1) ? '' : ' display: none;';
echo '<div id="mobile_settings_other" style="margin-top: 10px; '.$display.'">';
echo '</div>';
$display = ($mobile_friendly == 1) ? '' : 'displayNone';
echo '<div class="setting_holder '.$display.'" id="mobile_settings_other">';
// Prikaz slik pri mobilnikih (default da)
$hide_mobile_img = SurveySetting::getInstance()->getSurveyMiscSetting('hide_mobile_img');
echo '<span class="nastavitveSpan2" >'.$lang['srv_settings_mobile_img'].':</span>';
echo '<label for="hide_mobile_img_0"><input type="radio" name="hide_mobile_img" id="hide_mobile_img_0" '.($hide_mobile_img!=='1'?' checked':'').' value="0">'.$lang['yes'].'</label> ';
echo '<label for="hide_mobile_img_1"><input type="radio" name="hide_mobile_img" id="hide_mobile_img_1" '.($hide_mobile_img==='1'?' checked':'').' value="1">'.$lang['no'].'</label> ';
echo '<span class="clr"></span>';
echo '<div class="setting_holder">';
echo '<span class="setting_title" >'.$lang['srv_settings_mobile_img'].':</span>';
echo '<div class="setting_item">';
echo '<input type="radio" name="hide_mobile_img" id="hide_mobile_img_0" '.($hide_mobile_img!=='1'?' checked':'').' value="0">';
echo '<label for="hide_mobile_img_0">'.$lang['yes'].'</label> ';
echo '</div>';
echo '<div class="setting_item">';
echo '<input type="radio" name="hide_mobile_img" id="hide_mobile_img_1" '.($hide_mobile_img==='1'?' checked':'').' value="1">';
echo '<label for="hide_mobile_img_1">'.$lang['no'].'</label> ';
echo '</div>';
echo '</div>';
// Prilagoditev tabel pri mobilnikih
$mobile_tables = SurveySetting::getInstance()->getSurveyMiscSetting('mobile_tables');
echo '<span class="nastavitveSpan2" >'.$lang['srv_settings_mobile_tables'].':</span>';
echo '<label for="mobile_tables_1"><input type="radio" name="mobile_tables" id="mobile_tables_1" '.($mobile_tables==='1'?' checked':'').' value="1">'.$lang['yes'].'</label> ';
echo '<label for="mobile_tables_2"><input type="radio" name="mobile_tables" id="mobile_tables_2" '.($mobile_tables==='2'?' checked':'').' value="2">'.$lang['srv_settings_mobile_tables_slide'].'</label> ';
echo '<label for="mobile_tables_0"><input type="radio" name="mobile_tables" id="mobile_tables_0" '.($mobile_tables==='0'?' checked':'').' value="0">'.$lang['no'].'</label> ';
echo '<div class="setting_holder">';
echo '<span class="setting_title" >'.$lang['srv_settings_mobile_tables'].':</span>';
echo '<div class="setting_item">';
echo '<input type="radio" name="mobile_tables" id="mobile_tables_1" '.($mobile_tables==='1'?' checked':'').' value="1">';
echo '<label for="mobile_tables_1">'.$lang['yes'].'</label> ';
echo '</div>';
echo '<div class="setting_item">';
echo '<input type="radio" name="mobile_tables" id="mobile_tables_2" '.($mobile_tables==='2'?' checked':'').' value="2">';
echo '<label for="mobile_tables_2">'.$lang['srv_settings_mobile_tables_slide'].'</label> ';
echo '</div>';
echo '<div class="setting_item">';
echo '<input type="radio" name="mobile_tables" id="mobile_tables_0" '.($mobile_tables==='0'?' checked':'').' value="0">';
echo '<label for="mobile_tables_0">'.$lang['no'].'</label> ';
echo '</div>';
echo '</div>';
echo '</div>';
echo '</fieldset>';
}
@ -1524,68 +1555,120 @@ class SurveyAdminSettings {
// Nastavitve za izpis odgovorov respondentov
echo '<fieldset class="wide">';
echo '<fieldset>';
echo '<legend>'.$lang['srv_export_results_settings'].'</legend>';
echo '<div class="setting_holder">';
// Tip izvoza (1->dolg oz. razsirjen, 2->kratek oz. skrcen)
$export_data_type = SurveySetting::getInstance()->getSurveyMiscSetting('export_data_type');
echo '<span class="nastavitveSpan1" >'.$lang['srv_displaydata_type'].':</span>';
echo '<select name="export_data_type" id="export_data_type" >';
echo '<label for="export_data_type">'.$lang['srv_displaydata_type'].':';
echo Help :: display('displaydata_pdftype');
echo '</label>';
echo '<form>';
echo '<select name="export_data_type" id="export_data_type" class="dropdown large">';
echo ' <option value="2"'.((int)$export_data_type == 2 ? ' selected="selected"' : '').'>' . $lang['srv_displaydata_type2'] . '</option>';
echo ' <option value="1"'.((int)$export_data_type == 1 ? ' selected="selected"' : '').'>' . $lang['srv_displaydata_type1'] . '</option>';
//echo ' <option value="2"'.((int)$export_data_type == 2 ? ' selected="selected"' : '').'>' . $lang['srv_displaydata_type2'] . '</option>';
echo '</select>';
echo Help :: display('displaydata_pdftype');
echo '<br />';
echo '</form>';
echo '</div>';
echo '<div class="setting_holder">';
// Številčenje vprašanj (default da)
$export_data_numbering = SurveySetting::getInstance()->getSurveyMiscSetting('export_data_numbering');
echo '<span class="nastavitveSpan1" >'.$lang['srv_nastavitveStevilcenje'].':</span>';
echo '<label for="export_data_numbering_1"><input type="radio" name="export_data_numbering" id="export_data_numbering_1" '.($export_data_numbering==='1'?' checked':'').' value="1">'.$lang['yes'].'</label> ';
echo '<label for="export_data_numbering_0"><input type="radio" name="export_data_numbering" id="export_data_numbering_0" '.($export_data_numbering!=='1'?' checked':'').' value="0">'.$lang['no'].'</label> ';
echo '<span class="setting_title" >'.$lang['srv_nastavitveStevilcenje'].':</span>';
echo '<div class="setting_item">';
echo '<input type="radio" name="export_data_numbering" id="export_data_numbering_1" '.($export_data_numbering==='1'?' checked':'').' value="1">';
echo '<label for="export_data_numbering_1">'.$lang['yes'].'</label> ';
echo '</div>';
echo '<div class="setting_item">';
echo '<input type="radio" name="export_data_numbering" id="export_data_numbering_0" '.($export_data_numbering!=='1'?' checked':'').' value="0">';
echo '<label for="export_data_numbering_0">'.$lang['no'].'</label> ';
echo '</div>';
echo '<br />';
echo '</div>';
echo '<div class="setting_holder">';
// Prikaz recnuma (default da)
$export_data_show_recnum = SurveySetting::getInstance()->getSurveyMiscSetting('export_data_show_recnum');
echo '<span class="nastavitveSpan1" >'.$lang['srv_export_show_recnum'].':</span>';
echo '<label for="export_data_show_recnum_1"><input type="radio" name="export_data_show_recnum" id="export_data_show_recnum_1" '.($export_data_show_recnum==='1'?' checked':'').' value="1">'.$lang['yes'].'</label> ';
echo '<label for="export_data_show_recnum_0"><input type="radio" name="export_data_show_recnum" id="export_data_show_recnum_0" '.($export_data_show_recnum!=='1'?' checked':'').' value="0">'.$lang['no'].'</label> ';
echo '<span class="setting_title" >'.$lang['srv_export_show_recnum'].':</span>';
echo '<div class="setting_item">';
echo '<input type="radio" name="export_data_show_recnum" id="export_data_show_recnum_1" '.($export_data_show_recnum==='1'?' checked':'').' value="1">';
echo '<label for="export_data_show_recnum_1">'.$lang['yes'].'</label> ';
echo '</div>';
echo '<div class="setting_item">';
echo '<input type="radio" name="export_data_show_recnum" id="export_data_show_recnum_0" '.($export_data_show_recnum!=='1'?' checked':'').' value="0">';
echo '<label for="export_data_show_recnum_0">'.$lang['no'].'</label> ';
echo '</div>';
echo '<br />';
echo '</div>';
echo '<div class="setting_holder">';
// Prikaz pogojev (default da)
$export_data_show_if = SurveySetting::getInstance()->getSurveyMiscSetting('export_data_show_if');
echo '<span class="nastavitveSpan1" >'.$lang['srv_export_if'].':</span>';
echo '<label for="export_data_show_if_1"><input type="radio" name="export_data_show_if" id="export_data_show_if_1" '.($export_data_show_if==='1'?' checked':'').' value="1">'.$lang['yes'].'</label> ';
echo '<label for="export_data_show_if_0"><input type="radio" name="export_data_show_if" id="export_data_show_if_0" '.($export_data_show_if!=='1'?' checked':'').' value="0">'.$lang['no'].'</label> ';
echo '<span class="setting_title" >'.$lang['srv_export_if'].':</span>';
echo '<div class="setting_item">';
echo '<input type="radio" name="export_data_show_if" id="export_data_show_if_1" '.($export_data_show_if==='1'?' checked':'').' value="1">';
echo '<label for="export_data_show_if_1">'.$lang['yes'].'</label> ';
echo '</div>';
echo '<div class="setting_item">';
echo '<input type="radio" name="export_data_show_if" id="export_data_show_if_0" '.($export_data_show_if!=='1'?' checked':'').' value="0">';
echo '<label for="export_data_show_if_0">'.$lang['no'].'</label> ';
echo '</div>';
echo '<br /><br />';
echo '</div>';
echo '<div class="setting_holder">';
// Page break med posameznimi respondenti (default ne)
$export_data_PB = SurveySetting::getInstance()->getSurveyMiscSetting('export_data_PB');
echo '<span class="nastavitveSpan1" >'.$lang['srv_export_pagebreak'].':</span>';
echo '<label for="export_data_PB_1"><input type="radio" name="export_data_PB" id="export_data_PB_1" '.($export_data_PB==='1'?' checked':'').' value="1">'.$lang['yes'].'</label> ';
echo '<label for="export_data_PB_0"><input type="radio" name="export_data_PB" id="export_data_PB_0" '.($export_data_PB!=='1'?' checked':'').' value="0">'.$lang['no'].'</label> ';
echo '<span class="setting_title" >'.$lang['srv_export_pagebreak'].':</span>';
echo '<div class="setting_item">';
echo '<input type="radio" name="export_data_PB" id="export_data_PB_1" '.($export_data_PB==='1'?' checked':'').' value="1">';
echo '<label for="export_data_PB_1">'.$lang['yes'].'</label> ';
echo '</div>';
echo '<div class="setting_item">';
echo '<input type="radio" name="export_data_PB" id="export_data_PB_0" '.($export_data_PB!=='1'?' checked':'').' value="0">';
echo '<label for="export_data_PB_0">'.$lang['no'].'</label> ';
echo '</div>';
echo '<br />';
echo '</div>';
echo '<div class="setting_holder">';
// Izpusti vprasanja brez odgovora (default ne)
$export_data_skip_empty = SurveySetting::getInstance()->getSurveyMiscSetting('export_data_skip_empty');
echo '<span class="nastavitveSpan1" >'.$lang['srv_export_skip_empty'].':</span>';
echo '<label for="export_data_skip_empty_1"><input type="radio" name="export_data_skip_empty" id="export_data_skip_empty_1" '.($export_data_skip_empty==='1'?' checked':'').' value="1">'.$lang['yes'].'</label> ';
echo '<label for="export_data_skip_empty_0"><input type="radio" name="export_data_skip_empty" id="export_data_skip_empty_0" '.($export_data_skip_empty!=='1'?' checked':'').' value="0">'.$lang['no'].'</label> ';
echo '<span class="setting_title" >'.$lang['srv_export_skip_empty'].':</span>';
echo '<div class="setting_item">';
echo '<input type="radio" name="export_data_skip_empty" id="export_data_skip_empty_1" '.($export_data_skip_empty==='1'?' checked':'').' value="1">';
echo '<label for="export_data_skip_empty_1">'.$lang['yes'].'</label> ';
echo '</div>';
echo '<div class="setting_item">';
echo '<input type="radio" name="export_data_skip_empty" id="export_data_skip_empty_0" '.($export_data_skip_empty!=='1'?' checked':'').' value="0">';
echo '<label for="export_data_skip_empty_0">'.$lang['no'].'</label> ';
echo '</div>';
echo '<br />';
echo '</div>';
echo '<div class="setting_holder">';
// Izpusti podvprasanja brez odgovora (default ne)
$export_data_skip_empty_sub = SurveySetting::getInstance()->getSurveyMiscSetting('export_data_skip_empty_sub');
echo '<span class="nastavitveSpan1" >'.$lang['srv_export_skip_empty_sub'].':</span>';
echo '<label for="export_data_skip_empty_sub_1"><input type="radio" name="export_data_skip_empty_sub" id="export_data_skip_empty_sub_1" '.($export_data_skip_empty_sub==='1'?' checked':'').' value="1">'.$lang['yes'].'</label> ';
echo '<label for="export_data_skip_empty_sub_0"><input type="radio" name="export_data_skip_empty_sub" id="export_data_skip_empty_sub_0" '.($export_data_skip_empty_sub!=='1'?' checked':'').' value="0">'.$lang['no'].'</label> ';
echo '<span class="setting_title" >'.$lang['srv_export_skip_empty_sub'].':</span>';
echo '<div class="setting_item">';
echo '<input type="radio" name="export_data_skip_empty_sub" id="export_data_skip_empty_sub_1" '.($export_data_skip_empty_sub==='1'?' checked':'').' value="1">';
echo '<label for="export_data_skip_empty_sub_1">'.$lang['yes'].'</label> ';
echo '</div>';
echo '<div class="setting_item">';
echo '<input type="radio" name="export_data_skip_empty_sub" id="export_data_skip_empty_sub_0" '.($export_data_skip_empty_sub!=='1'?' checked':'').' value="0">';
echo '<label for="export_data_skip_empty_sub_0">'.$lang['no'].'</label> ';
echo '</div>';
echo '<br />';
echo '</div>';
echo '</fieldset>';
}
@ -1599,11 +1682,11 @@ class SurveyAdminSettings {
if ($_GET['a'] != 'jezik' && $_GET['a'] != 'trajanje' && $_GET['a'] != A_GDPR && $_GET['a'] != 'dostop') {
echo '<br class="clr" />';
echo '<span class="floatLeft spaceRight"><div class="buttonwrapper"><a class="ovalbutton ovalbutton_orange btn_savesettings" href="#" onclick="document.settingsanketa_' . $row['id'] . '.submit(); return false;"><span>';
echo $lang['edit1337'] . '</span></a></div></span>';
echo '<div class="clr"></div>';
echo '<div class="buttonwrapper">';
echo '<button class="medium white-blue" onClick="window.location.reload();">'.$lang['edit1338'].'</button>';
echo '<button class="medium blue" onclick="document.settingsanketa_' . $row['id'] . '.submit(); return false;">'.$lang['edit1337'].'</button>';
echo '</div>';
}
if ($_GET['s'] == '1') {

View File

@ -157,7 +157,7 @@
</div>
<div class="setting_holder">
<label for="dropdown1"lass="input_label">Veliki dropdown meni:</label>
<label for="dropdown1">Veliki dropdown meni:</label>
<form>
<select id="dropdown1" class="dropdown large">
<option>Q1: veliko besedilaaaaa</option>
@ -168,7 +168,7 @@
</div>
<div class="setting_holder">
<label for="dropdown2" class="input_label">Srednji dropdown meni:</label>
<label for="dropdown2">Srednji dropdown meni:</label>
<form>
<select id="dropdown2" class="dropdown medium">
<option>Q1: veliko besedilaaaaa</option>
@ -179,9 +179,9 @@
</div>
<div class="setting_holder">
<label for="dropdown3" class="input_label" disabled>Mali dropdown meni - disabled:</label>
<label for="dropdown3" disabled>Mali dropdown meni - disabled:</label>
<form>
<select id="dropdown3" class="dropdown small disabled">
<select id="dropdown3">
<option>Q1: veliko besedilaaaaa</option>
<option>Q2: manj besedila</option>
<option>Q3: malo</option>
@ -241,7 +241,7 @@
<div class="setting_holder">
<label class="input_label">Gumbi:</label><br><br>
<label>Gumbi:</label><br><br>
<button class="small red">Gumb - majhen rdeč</button> <br><br>
<button class="large blue">Gumb - velik moder</button> <br><br>

View File

@ -349,6 +349,7 @@ $lang = array (
"or_current" => "<font color=\"red\"><br><b>ALI</b></font> obstoje&#269;e",
"edit4" => "Spremeni",
"edit1337" => "Shrani spremembe",
"edit1338" => "Prekliči",
"reset_translation" => "Ponastavi prevod",
"delete_account" => "Izbriši račun 1KA",
"delete_account_conformation" => "Ste prepričani, da želite trajno izbrisati vaš račun? Po potrditvi se ne boste več mogli prijaviti s tem računom!",
@ -2214,7 +2215,7 @@ $lang = array (
"srv_moduli_setings" => "Nastavitve",
"srv_uporabnost" => "Evalvacija strani",
"srv_uporabnost_link" => "URL strani, ki jo evaluirate (ekran se bo razpolovil)",
"srv_uporabnost_warning" => "Vključite lahko samo spletno stran, ki ima dovoljeno vključevanje iz drugih domen (angl. cross-origin framing). Nekatere spletne strani takega vključevanja (npr. google.si ipd.) takega vključevanja ne dovolijo, prav tako lahko pride do težav, če spletna stran nima dodatnega varnostnega protokola (v primeru, da gre za spletno stran http). V teh primerih v anketi spletne strani ne bo prikazalo, zato pred aktivacijo ankete dobro pretestirajte, ali imate vključene spletne strani, ki to dovolijo.",
"srv_uporabnost_warning" => "Vključite lahko samo spletno stran, ki ima dovoljeno vključevanje iz drugih domen (angl. cross-origin framing). Nekatere spletne strani (npr. google.si, ipd.) takega vključevanja ne dovolijo. Prav tako lahko pride do težav, če spletna stran nima dodatnega varnostnega protokola (v primeru, da gre za spletno stran http). V teh primerih v anketi spletne strani ne bo prikazalo, zato pred aktivacijo ankete dobro pretestirajte, ali imate vključene spletne strani, ki to dovolijo.",
"srv_uporabnost_razdeli"=> "Stran razdeli",
"srv_vodoravno" => "vodoravno",
"srv_navpicno" => "navpi&#269;no",

View File

@ -337,6 +337,7 @@ $lang = array (
"or_current" => "<font color=\"red\"><br><b>OR</b></font> current",
"edit4" => "Change",
"edit1337" => "Save changes",
"edit1338" => "Cancel",
"reset_translation" => "Reset translation",
"delete_account" => "Delete 1KA account",
"delete_account_conformation" => "Are you sure you want to permanently delete your account? After confirmation, you will no longer be able to sign in with this account!",
@ -2200,7 +2201,7 @@ $lang = array (
"srv_moduli_setings" => "Settings",
"srv_uporabnost" => "Website evaluation",
"srv_uporabnost_link" => "Insert URL of evaluated page",
"srv_uporabnost_warning" => "You can only include a website that has cross-origin framing. Some websites do not allow such inclusion (eg google.si, etc.), and problems can also occur if the website does not have an additional security protocol (in the case of the http website). In these cases, the website will not appear in the survey, so before activating the survey, make sure that you have websites that allow it.",
"srv_uporabnost_warning" => "You can only include a website that has cross-origin framing. Some websites (eg. google.si, etc.) do not allow such inclusion. Problems can also occur if the website does not have an additional security protocol (in the case of an http website). In these cases, the website will not appear in the survey, so before activating the survey, make sure that you have websites that allow it.",
"srv_uporabnost_razdeli"=> "Split the page",
"srv_vodoravno" => "horizontally",
"srv_navpicno" => "vertically",

View File

@ -5228,6 +5228,11 @@ div.layout_left_item ul.menu_left-list a:hover {
/*
Form scss - input fields, buttons...
*/
div.buttonwrapper {
display: flex;
flex-direction: row;
}
button,
submit {
box-sizing: border-box;
@ -5418,6 +5423,8 @@ fieldset legend {
}
fieldset .setting_holder {
margin: 16px 0;
display: flex;
flex-direction: column;
}
fieldset .setting_holder:first-of-type {
margin-top: 0;
@ -5435,6 +5442,7 @@ select.dropdown {
border-radius: 2px;
cursor: pointer;
font-family: Source Sans Pro, sans-serif;
margin-top: 4px;
}
select.dropdown.large {
width: 229px;

View File

@ -1,3 +1,8 @@
div.buttonwrapper {
display: flex;
flex-direction: row;
}
button,
submit{
box-sizing: border-box;

View File

@ -6,6 +6,8 @@ select.dropdown {
font-family: $font_family;
margin-top: 4px;
&.large {
width: 229px;
height: 40px;

View File

@ -16,6 +16,8 @@ fieldset{
.setting_holder {
margin: 16px 0;
display: flex;
flex-direction: column;
&:first-of-type{
margin-top: 0;