summaryrefslogtreecommitdiffstats
path: root/admin/survey/classes/class.SurveyCondition.php
diff options
context:
space:
mode:
authorAnton Luka Šijanec <anton@sijanec.eu>2024-05-27 13:08:29 +0200
committerAnton Luka Šijanec <anton@sijanec.eu>2024-05-27 13:08:29 +0200
commit75160b12821f7f4299cce7f0b69c83c1502ae071 (patch)
tree27e25e4ccaef45f0c58b22831164050d1af1d4db /admin/survey/classes/class.SurveyCondition.php
parentprvi-commit (diff)
download1ka-75160b12821f7f4299cce7f0b69c83c1502ae071.tar
1ka-75160b12821f7f4299cce7f0b69c83c1502ae071.tar.gz
1ka-75160b12821f7f4299cce7f0b69c83c1502ae071.tar.bz2
1ka-75160b12821f7f4299cce7f0b69c83c1502ae071.tar.lz
1ka-75160b12821f7f4299cce7f0b69c83c1502ae071.tar.xz
1ka-75160b12821f7f4299cce7f0b69c83c1502ae071.tar.zst
1ka-75160b12821f7f4299cce7f0b69c83c1502ae071.zip
Diffstat (limited to '')
-rw-r--r--admin/survey/classes/class.SurveyCondition.php51
1 files changed, 27 insertions, 24 deletions
diff --git a/admin/survey/classes/class.SurveyCondition.php b/admin/survey/classes/class.SurveyCondition.php
index 08b6239..1c90d63 100644
--- a/admin/survey/classes/class.SurveyCondition.php
+++ b/admin/survey/classes/class.SurveyCondition.php
@@ -68,41 +68,47 @@ class SurveyCondition
$popUp = new PopUp();
$popUp->setId('divConditionProfiles');
- $popUp->setHeaderText($lang[''].'Filtriranje s pogoji');
+ $popUp->setHeaderText($lang['srv_inv_filetr_with_condition']);
#vsebino shranimo v buffer
-
ob_start();
-
+
+ echo '<div class="popup_main with_menu">';
+
echo '<input type="hidden" id="chooseProfileJSAction" value="'.$this->_chooseProfileJSAction.'" />';
- echo '<div class="condition_profile_holder">';
+
+ echo '<div class="popup_left condition_profile_holder">';
- echo '<div id="condition_profile" class="select">';
- if (count($this->_conditions) > 0)
- {
+ echo '<div id="condition_profile" class="list select">';
+ if (count($this->_conditions) > 0){
foreach ($this->_conditions as $key => $value) {
- echo '<div class="option' . ( $pid == $value['id'] ? ' active' : '') . '" data-cid="' . $value['id'] . '" onclick="showSurveyCondition(\''.$value['id'].'\')">' . $value['name'] .'</div>';
+ echo '<div class="list_item option' . ( $pid == $value['id'] ? ' active' : '') . '" data-cid="' . $value['id'] . '" onclick="showSurveyCondition(\''.$value['id'].'\')">' . $value['name'] .'</div>';
}
}
echo '</div>';
echo '</div>';
+
# tukaj prikazemo vsebino ifa
- echo '<div id="div_cp_preview">';
+ echo '<div id="div_cp_preview class="popup_right">';
+
echo '<div id="div_cp_preview_content">';
- if ($pid > 0)
- {
+ if ($pid > 0){
$b = new Branching($this->_sid);
$b->condition_editing($pid, -2);
- } else {
- echo 'Dodaj nov pogoj:';
- echo '<input id="newSurveyConditionName" placeholder="Ime pogoja" >';
- echo '<a href="#" onclick="newSurveyCondition(); return false;" class="faicon if_add" style="margin-left: 5px;" title="Dodaj nov pogoj"> Dodaj nov pogoj</a>';
+ }
+ else {
+ echo $lang['srv_inv_add_new_condition'].':';
+ echo '<input style="margin-left: 8px;" id="newSurveyConditionName" placeholder="'.$lang['srv_inv_condition_name'].'" >';
+ echo '<a href="#" onclick="newSurveyCondition(); return false;" class="faicon if_add" style="margin-left: 8px;" title="'.$lang['srv_inv_add_new_condition'].'"> '.$lang['srv_inv_add_new_condition'].'</a>';
}
echo '</div>';
echo '</div>';
+ echo '</div>';
+
echo '<div id="surveyConditionCover"></div>';
echo '<div id="renameProfileDiv"></div>';
+
$content = ob_get_clean();
#dodamo vsebino
@@ -112,9 +118,8 @@ class SurveyCondition
$popUp->addButton(new PopUpCancelButton());
#dodamo gumb izberi profil
- $confirmAction = 'alert(\'No action set\')';
- if (isset($this->_chooseProfileJSAction) && !empty($this->_chooseProfileJSAction))
- {
+ $confirmAction = 'genericAlertPopup(\'alert_no_action_set\')';
+ if (isset($this->_chooseProfileJSAction) && !empty($this->_chooseProfileJSAction)){
$confirmAction = $this->_chooseProfileJSAction;
}
$button = new PopUpButton($lang['srv_choose_profile']);
@@ -137,9 +142,7 @@ class SurveyCondition
$popUp->addButton($button);
}
- echo $popUp;
-
-
+ echo $popUp;
}
private function newCondition()
@@ -166,7 +169,7 @@ class SurveyCondition
$result['cond_id'] = (int)$cond_id;
$str = "INSERT INTO srv_survey_conditions (ank_id, if_id, name) VALUES ('$this->_sid', '$if_id', '$name')";
$sql = sisplet_query($str);
- if (!sql)
+ if (!$sql)
{
}
else
@@ -222,8 +225,8 @@ class SurveyCondition
}
# pobrišemo še morebitne seje
- SurveySession::sessionStart($this->_sid);
- SurveySession::remove('invitationAdvancedConditionId');
+ //SurveySession::sessionStart($this->_sid);
+ //SurveySession::remove('invitationAdvancedConditionId');
echo json_encode($result);
return;