Redesign - popravki postavitve desnih nastavitev vprasanja (missing toggle, omejitve stevila)
This commit is contained in:
parent
1b2f6a3bbc
commit
772470ccaf
@ -396,21 +396,16 @@ class Vprasanje {
|
||||
}
|
||||
// manjkajoce vrednosti
|
||||
if ($row['tip'] <= 3) {
|
||||
echo '<fieldset><legend>'.$lang['srv_manjkajoce_vrednosti2'].' '.Help::display('srv_missing_values').'</legend>';
|
||||
$this->edit_missing();
|
||||
echo '</fieldset>';
|
||||
echo '<fieldset><legend>'.$lang['srv_manjkajoce_vrednosti2'].' '.Help::display('srv_missing_values').'</legend>';
|
||||
$this->edit_missing();
|
||||
echo '</fieldset>';
|
||||
}
|
||||
|
||||
// editiranje vrednosti pri datumu
|
||||
if ( in_array($row['tip'], array(8)) ) {
|
||||
|
||||
echo '<fieldset><legend>'.$lang['srv_manjkajoce_vrednosti2'].' '.Help::display('srv_missing_values').'</legend>';
|
||||
|
||||
$this->edit_vrednost_datum();
|
||||
|
||||
// naknaden prikaz missinga ne vem ob opozorilu (samo ce imamo vklopljeno opozorilo in missing ne vem)
|
||||
$this->edit_alert_show_missing();
|
||||
|
||||
echo '<fieldset><legend>'.$lang['srv_manjkajoce_vrednosti2'].' '.Help::display('srv_missing_values').'</legend>';
|
||||
$this->edit_vrednost_missing();
|
||||
echo '</fieldset>';
|
||||
}
|
||||
|
||||
@ -463,11 +458,9 @@ class Vprasanje {
|
||||
|
||||
// manjkajoce vrednosti - besedilo
|
||||
if ( in_array($row['tip'], array(21)) ) {
|
||||
|
||||
echo '<fieldset><legend>'.$lang['srv_manjkajoce_vrednosti2'].' '.Help::display('srv_missing_values').'</legend>';
|
||||
$this->edit_vrednost_besedilo();
|
||||
|
||||
// naknaden prikaz missinga ne vem ob opozorilu (samo ce imamo vklopljeno opozorilo in missing ne vem)
|
||||
$this->edit_alert_show_missing();
|
||||
$this->edit_vrednost_missing();
|
||||
echo '</fieldset>';
|
||||
}
|
||||
|
||||
@ -475,28 +468,27 @@ class Vprasanje {
|
||||
if (in_array($row['tip'], array(1,2,3,6,16,19,20,24)))
|
||||
$this->edit_other_field();
|
||||
|
||||
if ( in_array($row['tip'], array(7, 18, 20)) ) {
|
||||
if ( in_array($row['tip'], array(7, 18, 20, 21)) ) {
|
||||
|
||||
// ce je izbrano stevilo in ne drsnik
|
||||
// ce je izbrano stevilo in ne drsnik - omejitve vnosa
|
||||
if ($row['ranking_k'] == 0){
|
||||
|
||||
echo '<fieldset><legend>'.$lang['srv_num_limits'].'</legend>';
|
||||
$this->edit_number();
|
||||
|
||||
if ($row['tip'] != 21)
|
||||
$this->edit_number();
|
||||
|
||||
$this->edit_limit();
|
||||
|
||||
echo '</fieldset>';
|
||||
}
|
||||
|
||||
if ($row['tip'] == 7) {
|
||||
|
||||
echo '<fieldset><legend>'.$lang['srv_manjkajoce_vrednosti2'].' '.Help::display('srv_missing_values').'</legend>';
|
||||
|
||||
$this->edit_vrednost_number();
|
||||
|
||||
// naknaden prikaz missinga ne vem ob opozorilu (samo ce imamo vklopljeno opozorilo in missing ne vem)
|
||||
$this->edit_alert_show_missing();
|
||||
|
||||
echo '</fieldset>';
|
||||
}
|
||||
}
|
||||
|
||||
if ($row['tip'] == 7) {
|
||||
echo '<fieldset><legend>'.$lang['srv_manjkajoce_vrednosti2'].' '.Help::display('srv_missing_values').'</legend>';
|
||||
$this->edit_vrednost_missing();
|
||||
echo '</fieldset>';
|
||||
}
|
||||
|
||||
if ( in_array($row['tip'], array(22)) ) {
|
||||
$this->edit_compute();
|
||||
@ -506,11 +498,7 @@ class Vprasanje {
|
||||
$this->edit_name_generator();
|
||||
}
|
||||
|
||||
if ( in_array($row['tip'], array(7,18,20, 21)) ) {
|
||||
if ($row['ranking_k'] == 0){ //ce je izbrano stevilo in ne drsnik
|
||||
$this->edit_limit();
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -2728,24 +2716,39 @@ class Vprasanje {
|
||||
$already_set_mv[$row_grid_mv['other']] = $row_grid_mv['naslov'];
|
||||
}
|
||||
|
||||
if (count($missing_values) > 0) {
|
||||
|
||||
foreach ($missing_values AS $mv_key => $mv_text) {
|
||||
|
||||
echo '<div class="vprasanje_setting_holder">';
|
||||
|
||||
echo ' <div class="vprasanje_setting_line">';
|
||||
if (count($missing_values) > 0) {
|
||||
|
||||
// Checkbox za prikaz vseh missing nastavitev
|
||||
echo '<div class="vprasanje_setting_holder">';
|
||||
|
||||
echo ' <div class="vprasanje_setting_line">';
|
||||
echo ' <input type="checkbox" '.(!empty($already_set_mv) ? ' checked="checked"' : '').' id="show_missing_settings" onChange="$(\'#missing_settings_holder\').slideToggle();">';
|
||||
echo ' <label for="show_missing_settings">'.$lang['srv_manjkajoce_vrednosti_toggle'].'</label>';
|
||||
echo ' </div>';
|
||||
|
||||
echo '</div>';
|
||||
|
||||
|
||||
echo '<div id="missing_settings_holder" '.(empty($already_set_mv) ? 'style="display:none;"' : '').'">';
|
||||
|
||||
echo '<div class="vprasanje_setting_holder">';
|
||||
|
||||
echo ' <div class="vprasanje_setting_line inline">';
|
||||
foreach ($missing_values AS $mv_key => $mv_text) {
|
||||
echo ' <input type="checkbox" '.(isset($already_set_mv[$mv_key]) ? ' checked="checked"' : '').' onChange="vrednost_new_dodatne(\'' . $row['id'] . '\', \''.$mv_key.'\', \''.$row['tip'].'\', this.checked); show_alert_missing();" id="missing_value_'.$mv_key.'">';
|
||||
echo ' <label for="missing_value_'.$mv_key.'" class="pointer">'. $mv_text . '</label> ';
|
||||
echo ' </div>';
|
||||
|
||||
echo '</div>';
|
||||
}
|
||||
echo ' </div>';
|
||||
|
||||
echo '</div>';
|
||||
|
||||
// naknaden prikaz missinga ne vem ob opozorilu (samo ce imamo vklopljeno opozorilo in missing ne vem)
|
||||
if ($row['tip'] <= 2)
|
||||
$this->edit_alert_show_missing();
|
||||
|
||||
echo '</div>';
|
||||
}
|
||||
|
||||
// naknaden prikaz missinga ne vem ob opozorilu (samo ce imamo vklopljeno opozorilo in missing ne vem)
|
||||
if ($row['tip'] <= 2)
|
||||
$this->edit_alert_show_missing();
|
||||
}
|
||||
}
|
||||
|
||||
@ -3158,64 +3161,70 @@ class Vprasanje {
|
||||
?><script> $('textarea[name=fastadd]').focus(); </script><?php
|
||||
}
|
||||
|
||||
//editiranje vrednosti pri besedilu
|
||||
function edit_vrednost_besedilo(){
|
||||
// editiranje missing vrednosti pri besedilu, stevilu in datumu
|
||||
function edit_vrednost_missing(){
|
||||
global $lang;
|
||||
|
||||
$row = Cache::srv_spremenljivka($this->spremenljivka);
|
||||
$spremenljivkaParams = new enkaParameters($row['params']);
|
||||
|
||||
$taSize = ($spremenljivkaParams->get('taSize') ? $spremenljivkaParams->get('taSize') : 1);
|
||||
$taWidth = ($spremenljivkaParams->get('taWidth') ? $spremenljivkaParams->get('taWidth') : -1);
|
||||
|
||||
//default sirina
|
||||
if($taWidth == -1)
|
||||
$taWidth = 30;
|
||||
|
||||
# manjkajoče vrednosti
|
||||
//dodatne missing vrednosti (ne vem, zavrnil...)
|
||||
# preberemo iz class.SurveyMissingValues
|
||||
|
||||
# preberemo missing vrednosti iz class.SurveyMissingValues - kateri so na voljo v anketi
|
||||
$smv = new SurveyMissingValues($this->anketa);
|
||||
# katere missinge imamo na voljo
|
||||
$missing_values = $smv->GetUnsetValuesForSurvey();
|
||||
|
||||
#kateri missingi so nastavljeni
|
||||
# kateri missingi so nastavljeni
|
||||
$already_set_mv = array();
|
||||
$sql_grid_mv = sisplet_query("SELECT naslov, other FROM srv_vrednost WHERE spr_id='".$this->spremenljivka."' AND other != 0");
|
||||
while ($row_grid_mv = mysqli_fetch_array($sql_grid_mv)) {
|
||||
$already_set_mv[$row_grid_mv['other']] = $row_grid_mv['naslov'];
|
||||
}
|
||||
|
||||
|
||||
echo '<input type="hidden" name="edit_vrednost_besedilo" value="1" />';
|
||||
|
||||
if (count($missing_values) > 0) {
|
||||
if($row['tip'] == '7')
|
||||
echo '<input type="hidden" name="edit_vrednost_number" value="1" />';
|
||||
elseif($row['tip'] == '21')
|
||||
echo '<input type="hidden" name="edit_vrednost_besedilo" value="1" />';
|
||||
|
||||
|
||||
if (count($missing_values) > 0) {
|
||||
|
||||
// Checkbox za prikaz vseh missing nastavitev
|
||||
echo '<div class="vprasanje_setting_holder">';
|
||||
|
||||
echo ' <div class="vprasanje_setting_line">';
|
||||
echo ' <input type="checkbox" '.(!empty($already_set_mv) ? ' checked="checked"' : '').' id="show_missing_settings" onChange="$(\'#missing_settings_holder\').slideToggle();">';
|
||||
echo ' <label for="show_missing_settings">'.$lang['srv_manjkajoce_vrednosti_toggle'].'</label>';
|
||||
echo ' </div>';
|
||||
|
||||
echo '</div>';
|
||||
|
||||
|
||||
echo '<div id="missing_settings_holder" '.(empty($already_set_mv) ? 'style="display:none;"' : '').'">';
|
||||
|
||||
echo '<div class="vprasanje_setting_holder">';
|
||||
|
||||
echo ' <div class="vprasanje_setting_line inline">';
|
||||
foreach ($missing_values AS $mv_key => $mv_text) {
|
||||
|
||||
echo '<div class="vprasanje_setting_holder">';
|
||||
|
||||
echo ' <div class="vprasanje_setting_line">';
|
||||
echo ' <input type="checkbox" '.(isset($already_set_mv[$mv_key]) ? ' checked="checked"' : '').' onChange="vrednost_new_dodatne(\'' . $row['id'] . '\', \''.$mv_key.'\', \''.$row['tip'].'\', this.checked); show_alert_missing();" id="missing_value_'.$mv_key.'">';
|
||||
echo ' <input type="checkbox" '.(isset($already_set_mv[$mv_key]) ? ' checked="checked"' : '').' onChange="vrednost_new_dodatne(\'' . $row['id'] . '\', \''.$mv_key.'\', \''.$row['tip'].'\', this.checked); show_alert_missing();" id="missing_value_'.$mv_key.'">';
|
||||
echo ' <label for="missing_value_'.$mv_key.'" class="pointer">'.$mv_text.'</label>';
|
||||
echo ' </div>';
|
||||
|
||||
echo '</div>';
|
||||
}
|
||||
echo ' </div>';
|
||||
|
||||
echo '</div>';
|
||||
|
||||
// naknaden prikaz missinga ne vem ob opozorilu (samo ce imamo vklopljeno opozorilo in missing ne vem)
|
||||
$this->edit_alert_show_missing();
|
||||
|
||||
echo '</div>';
|
||||
}
|
||||
}
|
||||
|
||||
//editiranje vrednosti pri number
|
||||
// editiranje missing vrednosti pri number
|
||||
function edit_vrednost_number(){
|
||||
global $lang;
|
||||
|
||||
$row = Cache::srv_spremenljivka($this->spremenljivka);
|
||||
$spremenljivkaParams = new enkaParameters($row['params']);
|
||||
|
||||
$taWidth = ($spremenljivkaParams->get('taWidth') ? $spremenljivkaParams->get('taWidth') : -1);
|
||||
//default sirina
|
||||
if($taWidth == -1)
|
||||
$taWidth = 10;
|
||||
|
||||
//dodatne missing vrednosti (ne vem, zavrnil...)
|
||||
# preberemo iz class.SurveyMissingValues
|
||||
@ -3249,15 +3258,13 @@ class Vprasanje {
|
||||
}
|
||||
}
|
||||
|
||||
//editiranje vrednosti pri datumu
|
||||
// editiranje missing vrednosti pri datumu
|
||||
function edit_vrednost_datum(){
|
||||
global $lang;
|
||||
|
||||
$row = Cache::srv_spremenljivka($this->spremenljivka);
|
||||
$spremenljivkaParams = new enkaParameters($row['params']);
|
||||
|
||||
# manjkajoče vrednosti
|
||||
|
||||
|
||||
//dodatne missing vrednosti (ne vem, zavrnil...)
|
||||
# preberemo iz class.SurveyMissingValues
|
||||
$smv = new SurveyMissingValues($this->anketa);
|
||||
@ -4034,8 +4041,6 @@ class Vprasanje {
|
||||
if($row['tip'] == 7 || $row['tip'] == 21){
|
||||
|
||||
$onkeyup = $row['tip'] == 21 ? ' onkeyup="checkNumber(this, 4, 0, true);"' : '';
|
||||
|
||||
echo '<fieldset><legend>'.$lang['srv_num_reminder'].'</legend>';
|
||||
|
||||
echo '<input type="hidden" name="edit_number_limit" value="1" />';
|
||||
|
||||
@ -4122,17 +4127,12 @@ class Vprasanje {
|
||||
echo ' </div>';
|
||||
|
||||
echo '</div>';
|
||||
|
||||
|
||||
echo '</fieldset>';
|
||||
}
|
||||
|
||||
// grid number
|
||||
if ($row['tip'] == 20 && $row['ranking_k'] != 1) {
|
||||
|
||||
// zaenkrat sam za slider
|
||||
echo '<fieldset><legend>'.$lang['srv_num_reminder'].'</legend>';
|
||||
|
||||
echo '<input type="hidden" name="edit_number_limit" value="1" />';
|
||||
|
||||
|
||||
@ -4165,38 +4165,6 @@ class Vprasanje {
|
||||
echo ' </div>';
|
||||
|
||||
echo '</div>';
|
||||
|
||||
|
||||
// Omejitve za 2. polje (ce ga imamo)
|
||||
echo '<div class="vprasanje_setting_holder">';
|
||||
|
||||
echo ' <div id="num_limit2" class="vprasanje_setting_line" '.($row['size'] == 2 ? '' : ' style="display:none;"').'>';
|
||||
echo ' <span>'.$lang['srv_num_field2'].':</span>';
|
||||
echo ' </div>';
|
||||
|
||||
// spodnji limit
|
||||
echo ' <div class="vprasanje_setting_line half-half">';
|
||||
echo ' <span class="content" onClick="num_limit(\'num_min2\', \'num_useMin2\')">';
|
||||
echo ' <input type="checkbox" value="1" id="num_useMin2" name="num_useMin2" '.($row['num_useMin2']==1 ? ' checked="checked"' : '').' >';
|
||||
echo ' <label for="num_min2">'.$lang['srv_num_min'].'</label>';
|
||||
echo ' </span>';
|
||||
echo ' <span class="content">';
|
||||
echo ' <input type="text" name="num_min2" id="num_min2" value="' . $row['num_min2'] . '" size="8" '.($row['num_useMin2'] == 0 ? ' disabled' : '').'></input>';
|
||||
echo ' </span>';
|
||||
echo ' </div>';
|
||||
|
||||
// zgornji limit
|
||||
echo ' <div class="vprasanje_setting_line half-half">';
|
||||
echo ' <span class="content" onClick="num_limit(\'num_max2\', \'num_useMax2\')">';
|
||||
echo ' <input type="checkbox" value="1" id="num_useMax2" name="num_useMax2" '.($row['num_useMax2']==1 ? ' checked="checked"' : '').'>';
|
||||
echo ' <label for="num_max2">'.$lang['srv_num_limit'].'</label>';
|
||||
echo ' </span>';
|
||||
echo ' <span class="content">';
|
||||
echo ' <input type="text" name="num_max2" id="num_max2" value="' . $row['num_max2'] . '" size="8" '.($row['num_useMax2'] == 0 ? ' disabled' : '').'></input>';
|
||||
echo ' </span>';
|
||||
echo ' </div>';
|
||||
|
||||
echo '</div>';
|
||||
|
||||
|
||||
// prikaz omejitve
|
||||
@ -4223,16 +4191,11 @@ class Vprasanje {
|
||||
echo ' </div>';
|
||||
|
||||
echo '</div>';
|
||||
|
||||
|
||||
echo '</fieldset>';
|
||||
}
|
||||
|
||||
// grid slider
|
||||
if ($row['tip'] == 20 && $row['ranking_k'] == 1) {
|
||||
|
||||
echo '<fieldset><legend>'.$lang['srv_num_reminder'].'</legend>';
|
||||
|
||||
echo '<input type="hidden" name="edit_number_limit" value="1" />';
|
||||
|
||||
echo '<div class="vprasanje_setting_holder">';
|
||||
@ -4250,16 +4213,11 @@ class Vprasanje {
|
||||
echo ' </div>';
|
||||
|
||||
echo '</div>';
|
||||
|
||||
echo '</fieldset>';
|
||||
|
||||
}
|
||||
|
||||
//omejitev za vsoto
|
||||
if($row['tip'] == 18){
|
||||
|
||||
echo '<fieldset><legend>'.$lang['srv_vsota_reminder'].'</legend>';
|
||||
|
||||
|
||||
echo '<input type="hidden" name="edit_vsota_limit" value="1" />';
|
||||
|
||||
//nastavitev tocne vsote
|
||||
@ -4328,9 +4286,6 @@ class Vprasanje {
|
||||
echo ' </div>';
|
||||
|
||||
echo '</div>';
|
||||
|
||||
|
||||
echo '</fieldset>';
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -5461,6 +5461,7 @@ $lang = array (
|
||||
"srv_podvprasanja" => 'Podvprašanja',
|
||||
"srv_manjkajoce_vrednosti" => 'Manjkajoče vrednosti',
|
||||
"srv_manjkajoce_vrednosti2" => 'Nevsebinski in manjkajoči odgovori',
|
||||
"srv_manjkajoce_vrednosti_toggle" => 'Dodaj nevsebinske in manjkajoče odgovore',
|
||||
"srv_nastavitve_stevila" => 'Nastavitve števila',
|
||||
"srv_ostale_nastavitve" => 'Ostale nastavitve',
|
||||
"srv_prikaz_nastavitve" => 'Prikaz podatkov',
|
||||
|
@ -2069,7 +2069,7 @@ $lang = array (
|
||||
"srv_remind_checkbox_min_violated_soft" => "The minimal number of answers have not been chosen. Do you want to proceed?",
|
||||
"srv_remind_num_soft" => "You have exceeded the number limit. Do you want to proceed?",
|
||||
"srv_remind_preview" => "You can turn off alert and condition checking in settings in the top right corner (+).",
|
||||
"srv_alert_show_missing" => "Show option \"Don\'t know\" on alert",
|
||||
"srv_alert_show_missing" => "Show option \"Don't know\" on alert",
|
||||
"srv_alert_show_missing_98" => "Show option \"Refused\" on alert",
|
||||
"srv_alert_show_missing_97" => "Show option \"Invalid\" on alert",
|
||||
"srv_alert_upload_size" => "Uploaded file is too large! Maximum file size is 16 MB.",
|
||||
@ -5437,6 +5437,7 @@ $lang = array (
|
||||
"srv_podvprasanja" => 'Subquestions',
|
||||
"srv_manjkajoce_vrednosti" => 'Missing values',
|
||||
"srv_manjkajoce_vrednosti2" => 'Nonsubstantive and missing responses',
|
||||
"srv_manjkajoce_vrednosti_toggle" => 'Add nonsubstantive and missing responses',
|
||||
"srv_nastavitve_stevila" => 'Number settings',
|
||||
"srv_ostale_nastavitve" => 'Other settings',
|
||||
"srv_vprasanje_tracking" => 'Question archiving',
|
||||
|
@ -14714,6 +14714,7 @@ div#variabla_new span.correct {
|
||||
}
|
||||
#vprasanje_float_editing .vprasanje_edit_holder .vprasanje_setting_holder .vprasanje_setting_line.inline {
|
||||
justify-content: space-between;
|
||||
flex-wrap: wrap;
|
||||
}
|
||||
#vprasanje_float_editing .vprasanje_edit_holder .vprasanje_setting_holder .vprasanje_setting_line.inline .content label:last-child {
|
||||
margin-right: 0;
|
||||
|
@ -221,6 +221,7 @@
|
||||
|
||||
&.inline{
|
||||
justify-content: space-between;
|
||||
flex-wrap: wrap;
|
||||
|
||||
.content{
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user