summaryrefslogtreecommitdiffstats
path: root/admin/survey/classes/class.SurveyMissingValues.php
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--admin/survey/classes/class.SurveyMissingValues.php75
1 files changed, 31 insertions, 44 deletions
diff --git a/admin/survey/classes/class.SurveyMissingValues.php b/admin/survey/classes/class.SurveyMissingValues.php
index 5ea0377..6205edc 100644
--- a/admin/survey/classes/class.SurveyMissingValues.php
+++ b/admin/survey/classes/class.SurveyMissingValues.php
@@ -44,14 +44,19 @@ class SurveyMissingValues
* @param mixed $anketa
*/
function __construct ($anketa = 0) {
+
if (self::$anketa == null) {
- if (isset ($_GET['anketa']) && (int)$_GET['anketa'] > 0) {
+
+ if ((int)$anketa > 0) {
+ self::$anketa = (int)$anketa;
+ }
+ elseif (isset ($_GET['anketa']) && (int)$_GET['anketa'] > 0) {
self::$anketa = $_GET['anketa'];
- } elseif (isset ($_POST['anketa']) && (int)$_POST['anketa'] > 0) {
+ }
+ elseif (isset ($_POST['anketa']) && (int)$_POST['anketa'] > 0) {
self::$anketa = $_POST['anketa'];
- } elseif ((int)$anketa > 0) {
- self::$anketa = (int)$anketa;
}
+
# polovimo nastavitve ankete če obstaja
if (self::$anketa != null && (int)self::$anketa > 0) {
@@ -220,7 +225,7 @@ class SurveyMissingValues
while ( $rowSystemSetting_filters = mysqli_fetch_assoc($sqlSystemSetting_filters) )
{
# naredimo prevode:
- $result[$rowSystemSetting_filters['filter']] = $lang['srv_mv_'.$rowSystemSetting_filters['text']] != '' ? $lang['srv_mv_'.$rowSystemSetting_filters['text']] : $rowSystemSetting_filters['text'];;
+ $result[$rowSystemSetting_filters['filter']] = isset($lang['srv_mv_'.$rowSystemSetting_filters['text']]) ? $lang['srv_mv_'.$rowSystemSetting_filters['text']] : $rowSystemSetting_filters['text'];;
}
self::$_systemFiltersByType[$type] = $result;
return self::$_systemFiltersByType[$type];
@@ -467,6 +472,10 @@ class SurveyMissingValues
echo '<fieldset>';
echo '<legend>'.$lang['srv_survey_missing_title'].':</legend>';
+
+ echo '<p class="bottom16">'.$lang['srv_survey_missing_text'].':</p>';
+
+
$_survey_missing_values = self::GetSurveyMissingValues();
if (self::$mySqlErrNo == '1062') {
@@ -474,26 +483,21 @@ class SurveyMissingValues
}
if ( count($_survey_missing_values) > 0 ) {
- echo '<table class="mv_tbl">';
- echo '<tr>';
- echo '<th style="width:50px;">';
- echo ' <i style="color:gray;text-align:right">'.$lang['srv_filter_vrednost'].'</i>';
- echo '</th>';
- echo '<th style="width:250px;">';
- echo ' <i style="color:gray;">'.$lang['srv_label'].'</i>';
- echo '</th>';
- echo '<th style="width:20px;">';
- echo ' <i style="color:gray;text-align:right">'.'</i>';
- echo '</th>';
- echo '<th>&nbsp;</th>';
+ echo '<table id="missing_value_table">';
+ //Table header
+ echo '<tr>';
+ echo '<th class="vrednost">'.$lang['srv_filter_vrednost'].'</th>';
+ echo '<th>'.$lang['srv_label'].'</th>';
+ echo '<th></th>';
echo '</tr>';
+
foreach ( $_survey_missing_values as $type => $type_missing_values) {
foreach ($type_missing_values AS $type_missing_value) {
$key = $type_missing_value['value'];
$text = $type_missing_value['text'];
$sysValue = $type_missing_value['defSysVal'];
- echo '<tr class="spr_sysFilter'.$type.'">';
+ echo '<tr>';
echo '<td>';
echo '<input name="mv_value_input" id="mv_value_'.$type.'_'.$key.'" type="text" value="'.$key.'" class="mv_value_input">';
@@ -501,30 +505,22 @@ class SurveyMissingValues
echo '<td>';
echo '<input name="mv_text_input" id="mv_text_'.$type.'_'.$key.'" type="text" value="'.$text.'" class="mv_text_input">';
echo '</td>';
- echo '<td class="anl_ac">';
- if ($sysValue != null) {
- echo '['.$sysValue.']';
- }
- echo '</td>';
echo '<td>';
- echo '&nbsp;<span class="faicon remove smaller orange pointer" name="mv_delete_img" id="mv_img_'.$type.'_'.$key.'" title="'.$lang['srv_filtri_izbrisi_filter'].'"/>';
+ echo '<span class="faicon trash empty blue" name="mv_delete_img" id="mv_img_'.$type.'_'.$key.'" title="'.$lang['srv_filtri_izbrisi_filter'].'"/>';
echo '</td>';
echo '</tr>';
}
}
- echo '<tr class="spr_sysFilter3">';
- echo '<td>&nbsp;</td>';
- echo '<td>&nbsp;</td>';
- echo '<td>';
- echo '&nbsp;<span name="mv_add_img" id="mv_add_img" class="faicon add icon-blue smaller pointer"></span>';
- echo '</td>';
- echo '</tr>';
echo '</table>';
}
if ($si_mv == '0') {
echo '<span class="mv_link_disabled">'.$lang['srv_survey_missing_default'].'</span><br/>';
} else {
- echo '<span id="link_use_sistem_mv" onclick="useSystemMissingValues(); return false;" class="as_link">'.$lang['srv_survey_missing_default'].'</span><br/>';
+ echo '<span class="pointer blue" name="mv_add_img" id="mv_add_img"><span class="faicon plus_circle link-right"></span>'.$lang['srv_survey_missing_add'].'</span>';
+
+ echo '<div class="button_holder top16 bottom0">';
+ echo '<button id="link_use_sistem_mv" class="medium white-black" onClick="useSystemMissingValues(); return false;">'.$lang['srv_survey_missing_default'].'</button>';
+ echo '</div>';
}
echo '</div>';
@@ -652,7 +648,7 @@ class SurveyMissingValues
echo '<table class="mv_tbl">';
echo '<tr>';
echo '<th style="width:50px;">';
- echo ' <i style="color:gray;text-align:right">'.$lang['srv_filter_vrednost'].'</i>';
+ echo ' <i style="color:gray;text-align:right">'.$lang['srv_filter_vrednost'].'test</i>';
echo '</th>';
echo '<th style="width:250px;">';
echo ' <i style="color:gray;">'.$lang['srv_filter_variabla'].'</i>';
@@ -703,21 +699,12 @@ class SurveyMissingValues
if ($_REQUEST['a'] != 'missing') {
if ($what == 'start') {
$sa=new SurveyAdmin(self::$anketa);
- echo '<span class="floatLeft">';
- echo '<div id="globalSetingsLinks" class="baseSettings">';
+ echo '<div class="layout_left_item">';
$sa->showGlobalSettingsLinks();
- echo '</div>';
- echo '<br class="clr"/><br/>';
- echo '<div id="globalSetingsLinks" class="aditionalSettings">';
$sa->showAdditionalSettingsLinks();
echo '</div>';
- echo '<br class="clr"/>';
- echo '</span>';
- echo '<div id="globalSetingsList" >';
-
- } else {
- echo '</div>';
}
+
}
}
}