[Redizajn 1KA] - Urejanje --> Nastavitve --> Aktivnost/kvote - v1

This commit is contained in:
tejagerjovic 2021-11-30 01:27:23 +01:00
parent 294f2218ad
commit 50005ae414
7 changed files with 129 additions and 56 deletions

View File

@ -930,18 +930,10 @@ class SurveyAdminSettings {
echo '<span class="buttonwrapper floatLeft spaceRight"><a class="ovalbutton ovalbutton_gray" href="'.$url.'"><span>'.$lang['back'] . '</span></a></span>';
}
}
echo '<span class="buttonwrapper floatLeft"><a class="ovalbutton ovalbutton_orange" onclick="submitSurveyDuration();return false;" href="#"><span>';
echo $lang['edit1337'] . '</span></a></span>';
/*
$http_referer = parse_url($_SERVER['HTTP_REFERER']); //If yes, parse referrer
$referer_url = $http_referer['query'];
if (preg_match('/anketa='.$this->anketa.'&a'.A_VABILA.'/', $referer_url)) {
echo '<div class="buttonwrapper"><a class="ovalbutton ovalbutton_gray" href="'.$_SERVER['HTTP_REFERER'].'"><span>';
echo $lang['srv_back_to_email'] . '</span></a></div>';
echo '</div>';
}
*/
echo '<div class="button_holder">';
echo '<button class="medium white-blue" onClick="window.location='.$preklici_url.';return false;">'.$lang['edit1338'].'</button>';
echo '<button class="medium blue" onclick="submitSurveyDuration();return false;" href="#">'.$lang['edit1337'].'</button>';
echo '</div>';
}
/*Respondenti*/
@ -8453,31 +8445,42 @@ class SurveyAdminSettings {
$_expire = explode('-',$row['expire']);
$expire = $_expire[2].'.'.$_expire[1].'.'.$_expire[0];
echo '<fieldset><legend>'.$lang['srv_activate_duration_2'].' '.Help::display('srv_activity_quotas').'</legend>';
echo '<p>';
echo '<span class="duration_span">' . $lang['srv_activate_duration_manual_from'].'</span>';
echo '<input id="startsManual1" type="text" name="durationStarts" value="' . $starts . '" disabled autocomplete="off"/>';
echo '</p>';
echo '<p>';
echo '<span class="duration_span">' . $lang['srv_activate_duration_manual_to'].'</span>';
echo '<input id="expireManual1" type="text" name="durationExpire" value="' . $expire . '" disabled autocomplete="off"/>';
echo '</p>';
echo '<p>';
echo '<span class="duration_span">' . $lang['srv_trajna_anketa'].'</span>';
echo '<input id="expirePermanent" type="checkbox" name="expirePermanent" value="1"'.($row['expire'] == PERMANENT_DATE ? ' checked="checked"' : '').' autocomplete="off" onchange="setExpirePermanent();"/>';
echo '</p>';
echo '</fieldset>';
echo '<fieldset>';
echo '<legend>'.$lang['srv_activate_duration_2'].' '.Help::display('srv_activity_quotas').'</legend>';
echo '<div class="setting_holder">';
echo '<span class="setting_title">' . $lang['srv_activate_duration_manual_from'].'</span>';
echo '<div class="icon_holder">';
echo '<input id="startsManual1" type="text" class="large" readonly="true" name="durationStarts" value="' . $starts . '" autocomplete="off"/>';
echo '<a class="datepicker-trigger-starts"><span class="faicon calendar_icon large"></span></a>';
echo '</div>';
echo '</div>';
#echo '<span class="floatRight"><div class="buttonwrapper"><a class="ovalbutton ovalbutton_orange" href="#" onclick="anketa_activate_save(\''.$this->anketa.'\',\''.$folders.'\'); return false;"><span>' . $lang['srv_zapri'] . '</span></a></div></span>';
echo '<div class="setting_holder">';
echo '<span class="setting_title">' . $lang['srv_activate_duration_manual_to'].'</span>';
echo '<div class="icon_holder">';
echo '<input id="expireManual1" type="text" class="large" readonly="true" name="durationExpire" value="' . $expire . '" autocomplete="off"/>';
echo '<a class="datepicker-trigger-expire"><span class="faicon calendar_icon large"></span></a>';
echo '</div>';
echo '</div>';
echo '<div class="setting_holder">';
echo '<input id="expirePermanent" type="checkbox" name="expirePermanent" value="1"'.($row['expire'] == PERMANENT_DATE ? ' checked="checked"' : '').' autocomplete="off" onchange="setExpirePermanent();"/>';
echo '<label for="expirePermanent">' . $lang['srv_trajna_anketa'].'</label>';
echo '</div>';
echo '</fieldset>';
echo '
<script type="text/javascript">
$(document).ready(function () {
datepicker("#startsManual1");
datepicker("#expireManual1");
$("#startsManual1").datepicker();
$(".datepicker-trigger-starts").click(function(){
$("#startsManual1").datepicker("show");
});
$("#expireManual1").datepicker();
$(".datepicker-trigger-expire").click(function(){
$("#expireManual1").datepicker("show");
});
});
</script>';
}
@ -8492,30 +8495,41 @@ class SurveyAdminSettings {
$row = SurveyInfo::getInstance()->getSurveyRow();
//Nastavitev max stevila glasov
echo '<br />';
echo '<fieldset>';
echo '<legend>'.$lang['srv_vote_quotas'].' '.Help::display('srv_activity_quotas').'</legend>';
echo '<p>';
echo '<span class="duration_span" ><label>' . $lang['srv_vote_quotas_2'] . ':</label></span>';
echo '<label for="vote_limit_0"><input type="radio" name="vote_limit" value="0" id="vote_limit_0"' . ($row['vote_limit'] == 0 ? ' checked="checked"' : '') . ' onClick="voteCountStatus(0)" />' . $lang['no1'] . '</label>';
echo '<label for="vote_limit_1"><input type="radio" name="vote_limit" value="1" id="vote_limit_1"' . ($row['vote_limit'] == 1 ? ' checked="checked"' : '') . ' onClick="voteCountStatus(1)" />' . $lang['yes'] . '</label>';
echo '<label for="vote_limit_2"><input type="radio" name="vote_limit" value="2" id="vote_limit_2"' . ($row['vote_limit'] == 2 ? ' checked="checked"' : '') . ' onClick="voteCountStatus(2)" />' . $lang['srv_data_only_valid'] . ' (status 5, 6) '.Help::display('srv_activity_quotas_valid').'</label>';
echo '&nbsp;&nbsp;&nbsp;&nbsp;<span class="duration_span"><label for="anketa' . $row['id'] . '" >'.$lang['srv_vote_count'].': </span>';
echo '<input type="text" id="vote_count" name="vote_count" ' . ($row['vote_limit'] == 0 ? ' disabled="disabled"' : '') . ' value="' . $row['vote_count'] . '" style="width:50px; margin-left: 5px;" maxlength="40" /></label>';
echo '</p>';
echo '<div class="setting_holder">';
echo '<span class="setting_title">' . $lang['srv_vote_quotas_2'] . ':</span>';
echo '<div class="setting_item">';
echo '<input type="radio" name="vote_limit" value="0" id="vote_limit_0"' . ($row['vote_limit'] == 0 ? ' checked="checked"' : '') . ' onClick="voteCountStatus(0)" />';
echo '<label for="vote_limit_0">' . $lang['no1'] . '</label>';
echo '</div>';
echo '<div class="setting_item">';
echo '<input type="radio" name="vote_limit" value="1" id="vote_limit_1"' . ($row['vote_limit'] == 1 ? ' checked="checked"' : '') . ' onClick="voteCountStatus(1)" />';
echo '<label for="vote_limit_1">' . $lang['yes'] . '</label>';
echo '</div>';
echo '<div class="setting_item">';
echo '<input type="radio" name="vote_limit" value="2" id="vote_limit_2"' . ($row['vote_limit'] == 2 ? ' checked="checked"' : '') . ' onClick="voteCountStatus(2)" />';
echo '<label for="vote_limit_2">' . $lang['srv_data_only_valid'] . ' (status 5, 6) '.Help::display('srv_activity_quotas_valid').'</label>';
echo '</div>';
echo '</div>';
echo '<div class="setting_holder">';
echo '<span class="setting_title"><label for="anketa' . $row['id'] . '" >'.$lang['srv_vote_count'].':</label></span>';
echo '<input type="text" class="large" id="vote_count" name="vote_count" ' . ($row['vote_limit'] == 0 ? ' disabled="disabled"' : '') . ' value="' . $row['vote_count'] . '"/></label>';
echo '</div>';
// Opozorilo, da je limit odgovorov presezen
echo '<p class="vote_limit_warning" style="padding-left:10px; line-height:20px; '.($row['vote_limit'] == 0 ? ' display:none;' : '').'">';
echo $lang['srv_survey_voteLimit_warning'].':<br />';
echo '<div id="vote_limit_warning" class="setting_holder '.($row['vote_limit'] == 0 ? 'displayNone' : '').'">';
echo $lang['srv_survey_voteLimit_warning'].':';
$srv_survey_non_active_voteLimit = SurveySetting::getInstance()->getSurveyMiscSetting('srvlang_srv_survey_non_active_voteLimit');
if ($srv_survey_non_active_voteLimit == '') $srv_survey_non_active_voteLimit = $lang['srv_survey_non_active_voteLimit'];
echo '<span class="italic spaceLeft">'.$srv_survey_non_active_voteLimit.'</span>';
echo ' <a href="'.$site_url.'admin/survey/index.php?anketa='.$this->anketa.'&a=jezik">'.$lang['edit3'].'</a>';
echo '</p>';
echo '<p><span class="italic">'.$srv_survey_non_active_voteLimit.' </span><a href="'.$site_url.'admin/survey/index.php?anketa='.$this->anketa.'&a=jezik">'.$lang['edit3'].'</a><p>';
echo '</div>';
echo '</fieldset>';
}

View File

@ -3681,10 +3681,10 @@ function recalc_alert_expire(days) {
function voteCountStatus(status) {
if (status == 1 || status == 2) {
$('#vote_count').removeAttr('disabled');
$('.vote_limit_warning').show();
$('#vote_limit_warning').removeClass('displayNone');
} else {
$('#vote_count').attr('disabled', true);
$('.vote_limit_warning').hide();
$('#vote_limit_warning').addClass('displayNone');
}
}
function voteCountToggle(status) {

View File

@ -4326,8 +4326,8 @@ $lang = array (
"srv_activate_duration_auto_to" => " do: ",
"srv_activate_duration_manual" => " Ročno od: ",
"srv_activate_duration_manual_1" => " Ročno ",
"srv_activate_duration_manual_from" => " od: ",
"srv_activate_duration_manual_to" => " do: ",
"srv_activate_duration_manual_from" => "Od:",
"srv_activate_duration_manual_to" => "Do:",
"srv_activate_duration_autostart" => "Avtomatska aktivacija čez ",
"srv_activate_duration_button" => "Aktiviraj",
"srv_processing" => "Obdelava",

View File

@ -4306,8 +4306,8 @@ $lang = array (
"srv_activate_duration_auto_to" => " to: ",
"srv_activate_duration_manual" => " Manual from: ",
"srv_activate_duration_manual_1" => " Manual ",
"srv_activate_duration_manual_from" => " from: ",
"srv_activate_duration_manual_to" => " to: ",
"srv_activate_duration_manual_from" => "From:",
"srv_activate_duration_manual_to" => "To:",
"srv_activate_duration_autostart" => "Automatic activation in ",
"srv_activate_duration_button" => "Activate",
"srv_processing" => "Processing",

View File

@ -5053,10 +5053,15 @@ body {
*/
p, span {
font-size: 16px;
margin-block-start: 0;
margin-block-end: 0;
}
p.warning, p.red, span.warning, span.red {
color: #FF0000;
}
p.italic, span.italic {
font-style: italic;
}
/*
Only layout styles - position, display, max-width...
@ -5134,6 +5139,10 @@ span.faicon.yellow,
a.faicon.yellow {
color: #FFC700;
}
span.faicon.blue,
a.faicon.blue {
color: #1E88E5;
}
span.faicon.fa-stack,
a.faicon.fa-stack {
height: 1em;
@ -5181,6 +5190,21 @@ span.faicon.minus_circle::before {
content: "\f056";
}
span.faicon.calendar_icon::before {
content: "\f073";
}
div.icon_holder {
display: flex;
flex-direction: row;
box-sizing: border-box;
align-items: center;
}
div.icon_holder span.faicon,
div.icon_holder a.faicon {
margin-left: 12px;
}
a {
cursor: pointer;
color: #1E88E5;
@ -5420,6 +5444,9 @@ input[type=text]:focus {
border-color: transparent;
border-color: #1E88E5;
}
input[type=text][readonly=true] {
cursor: pointer;
}
input[type=radio], input[type=checkbox] {
border: 0;
clip: rect(0 0 0 0);

View File

@ -3,9 +3,9 @@ a.faicon{
font-family: $fontawesome;
color: inherit;
display: inline-block;
font-weight: 900;
font-weight: $heavy;
&.empty {
font-weight: 400;
font-weight: $regular;
}
&.link-right {
@ -35,10 +35,12 @@ a.faicon{
}
//BARVE
&.yellow {
color: $yellow;
}
&.blue {
color: $blue;
}
//STACKING
&.fa-stack {
@ -46,8 +48,11 @@ a.faicon{
line-height: 1em;
width: 1em;
}
}
}
// Ključavnica
span.faicon.lock_open::before{
content: "\f3c1";
}
@ -55,6 +60,7 @@ span.faicon.lock_close::before{
content: "\f023";
}
// Zvone (notification)
span.faicon.bell::before{
content: "\f0f3";
}
@ -63,14 +69,17 @@ span.faicon.bell_slash::before{
content: "\f1f6";
}
// Izbris (delete)
span.faicon.trash::before{
content: "\f2ed";
}
// Kopiranje
span.faicon.copy::before{
content: "\f0c5";
}
// Plus, minus, krogi
span.faicon.circle::before{
content: "\f111";
}
@ -85,4 +94,23 @@ span.faicon.plus_circle::before{
span.faicon.minus_circle::before{
content: "\f056";
}
// Koledar
span.faicon.calendar_icon::before{
content: "\f073";
}
//Wrapper
div.icon_holder {
display: flex;
flex-direction: row;
box-sizing: border-box;
align-items: center;
span.faicon,
a.faicon{
margin-left: 12px;
}
}

View File

@ -43,6 +43,10 @@ input {
border-color: transparent;
border-color: $blue;
}
&[readonly="true"] {
cursor: pointer;
}
}