[Redizajn 1KA] - Urejanje --> Nastavitve --> Dostop uredniki - v1

This commit is contained in:
tejagerjovic 2021-12-16 15:53:34 +01:00
parent c856ccab39
commit a1cb2bde9e
6 changed files with 84 additions and 48 deletions

View File

@ -1490,7 +1490,7 @@ class SurveyAdminSettings {
if ($admin_type <= $row['dostop'] || $rowDostopAvtor['isAvtor'] > 0) {
echo '<fieldset><legend>' . $lang['srv_dostop_users'] . '' . Help :: display('srv_dostop_users'). '</legend>'."\n";
echo '<fieldset><legend>' . $lang['srv_dostop_users'] . '' . Help :: display('srv_dostop_users'). '</legend>';
if($admin_type == 0 || $admin_type == 1){
echo '<span id="dostop_active_show_1"><a href="#" onClick="dostopActiveShowAll(\'true\'); return false;">'.$lang['srv_dostop_show_all'].'</a></span>';
@ -1501,15 +1501,12 @@ class SurveyAdminSettings {
$this->display_dostop_users(0);
echo '</div>';
echo '<div class="button_holder below">';
echo '<button class="medium blue" onclick="document.settingsanketa_' . $row['id'] . '.submit(); return false;">'.$lang['edit1337'].'</button>';
echo '</div>';
echo '</fieldset>';
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 '<br class="clr" />';
// Dodajanje uproabnikov preko e-maila
echo '<fieldset><legend>'.$lang['srv_dostop_addusers'].'</legend>';
@ -4801,27 +4798,47 @@ class SurveyAdminSettings {
$avtorRow = SurveyInfo::getInstance()->getSurveyRow();
echo '<p class="bold">'.$lang['srv_dostop_users_list'].'</p>';
// Prikazemo samo userje ki lahko urejajo anketo
if($show_all == 0){
echo ' <input type="hidden" name="dostop_edit" value="1" />' . "\n";
echo '<table>';
echo '<tr>';
echo '<th><input type="checkbox" id="user_access_check_all" name="user_access_check_all"></input></th>';
echo '<th></th>';
echo '<th></th>';
echo '<th>' . $lang['srv_dostop_users_username'] . '</th>';
echo '<th>' . $lang['srv_dostop_users_email'] . '</th>';
echo '<th>' . $lang['srv_dostop_users_addedby'] . '</th>';
echo '</tr>';
$sql1 = sisplet_query("SELECT u.name, u.surname, u.id, u.email FROM users u, srv_dostop d WHERE d.ank_id='$this->anketa' AND d.uid=u.id");
while ($row1 = mysqli_fetch_array($sql1)) {
// Da ga ne pocistimo ce je disablan (sam sebe ne more odstranit in avtorja se ne sme odstranit)
// Da ga ne pocistimo, ce je disablan (sam sebe ne more odstranit in avtorja se ne sme odstranit)
if($avtorRow['insert_uid'] == $row1['id'] || $global_user_id == $row1['id'])
echo ' <input type="hidden" name="uid[]" value="' . $row1['id'] . '" />' . "\n";
echo '<div id="div_for_uid_' . $row1['id'] . '" name="dostop_active_uid" class="floatLeft dostop_for_uid">' . "\n";
echo '<label nowrap for="uid_' . $row1['id'] . '" title="' . $row1['email'] . '">';
echo '<input type="checkbox" name="uid[]" value="' . $row1['id'] . '" id="uid_' . $row1['id'] . '" checked="checked" '.($avtorRow['insert_uid'] == $row1['id'] || $global_user_id == $row1['id'] ? ' disabled="disabled"' : '').' autocomplete="off"/>';
echo $row1['name'] . ($avtorRow['insert_uid'] == $row1['id'] ? ' (' . $lang['author'] . ')' : '') . '</label>' . "\n";
echo ' <span class="faicon edit small icon-as_link" onclick="javascript:anketa_user_dostop(\''.$row1['id'].'\');"></span>';
echo '</div>' . "\n";
echo '<tr id="div_for_uid_' . $row1['id'] . '" name="dostop_active_uid">';
echo '<td><input type="checkbox" name="uid[]" value="' . $row1['id'] . '" id="uid_' . $row1['id'] . '" checked="checked" '.($avtorRow['insert_uid'] == $row1['id'] || $global_user_id == $row1['id'] ? ' disabled="disabled"' : '').' autocomplete="off"/></td>';
echo '<td><a><span class="faicon edit" onclick="javascript:anketa_user_dostop(\''.$row1['id'].'\');"></span></a></td>';
echo '<td><a><span class="faicon trash empty" onclick="_______IZBRIS DOSTOPA______"></span></a></td>';
echo '<td><label for="uid_' . $row1['id'] . '" title="' . $row1['email'] . '">'.$row1['name'] . ($avtorRow['insert_uid'] == $row1['id'] ? ' (' . $lang['author'] . ')' : '') . '</label></td>';
echo '<td>hardcoded@email</td>';
echo '<td>mstupar</td>';
echo '</tr>';
}
echo '</table>';
echo '<a class="noline" href="#" onClick="________IZBRIS DOSTOPA ZA OZNAČENE____________"><span class="faicon trash empty link-right"></span>'.$lang['srv_dostop_users_removeselected'].'</a>';
}
// Prikazemo vse userje, ki jih lahko uporabnig dodaja
// Prikazemo vse userje, ki jih lahko uporabnik dodaja
else{
$sql1 = $this->db_select_users_forLevel($this->anketa);
if ( mysqli_num_rows($sql1) > 0 ) {
@ -4857,7 +4874,7 @@ class SurveyAdminSettings {
global $lang;
global $admin_type;
echo '<p class="bold">';
echo '<p class="red bottom16">';
// Admini in managerji lahko dodajo dostop komurkoli
if($admin_type == 0 || $admin_type == 1){
@ -4877,27 +4894,28 @@ class SurveyAdminSettings {
echo '<input type="hidden" name="aktiven" value="1" >';
echo '<p>';
echo $lang['srv_dostop_adduserstxt_email'].'<br />';
echo '<textarea name="addusers" id="addusers" style="height: 90px; margin-top: 5px;"></textarea>';
echo '</p>';
echo '<div class="setting_holder">';
echo '<label for="addusers">'.$lang['srv_dostop_adduserstxt_email'].'</label>';
echo '<textarea name="addusers" id="addusers"></textarea>';
echo '</div>';
echo '<p>';
echo '<label><input type="checkbox" id="addusers_note_checkbox" style="margin:-2px 0 0 0;" onClick="dostopNoteToggle();"> '.$lang['srv_dostop_adduserstxt_note'].'</label><br />';
echo '<textarea name="addusers_note" id="addusers_note" style="height: 90px; margin-top: 5px; display: none;">'.$lang['srv_dostop_adduserstxt_note_text'].'</textarea>';
echo '</p>';
echo '<p class="bottom16">'.$lang['srv_dostop_adduserstxt_end'].'</p>';
echo '<br class="clr" />';
echo '<p>'.$lang['srv_dostop_adduserstxt_end'].'</p>';
//Opcijsko sporočilo
echo '<div class="setting_holder">';
echo '<div class="setting_item">';
echo '<input type="checkbox" id="addusers_note_checkbox" onClick="dostopNoteToggle();">';
echo '<label for="addusers_note">'.$lang['srv_dostop_adduserstxt_note'].'</label>';
echo '</div>';
echo '<div class="setting_item">';
echo '<textarea name="addusers_note" id="addusers_note">'.$lang['srv_dostop_adduserstxt_note_text'].'</textarea>';
echo '</div>';
echo '</div>';
// Gumb za dodajanje in posiljanje
echo '<br class="clr" />';
echo '<span class="floatLeft spaceRight"><div class="buttonwrapper"><a class="ovalbutton ovalbutton_orange btn_savesettings" href="#" onclick="dostopAddAccess(); return false;">';
echo $lang['srv_dostop_addusers_button'] . '</a></div></span>';
echo '<div class="clr"></div>';
echo '<br class="clr" />';
echo '<div class="button_holder below">';
echo '<button class="medium blue" href="#" onclick="dostopAddAccess(); return false;">'.$lang['srv_dostop_addusers_button'].'</button>';
echo '</div>';
}

View File

@ -2045,19 +2045,18 @@ $lang = array (
"srv_alert_foto_remove" => "Odstrani sliko",
"srv_dostop" => "Anketo lahko ureja avtor in vsi",
"srv_izpolnjujejo" => "Anketo lahko izpolnjujejo",
"srv_dostop_users" => "Uporabniki, ki lahko urejajo anketo",
"srv_dostop_userspassive" => "Pasivni uporabniki, ki lahko pregledujejo anketo",
"srv_passive_multilang" => "Jeziki, ki jih lahko ureja",
"srv_passive_multilang_1" => "Pasivni uporabniki, ki prevajajo",
"srv_dostop_addusers" => "Dodajanje uporabnikov za urejanje ankete",
"srv_dostop_adduserstxt_admin" => "Dostop za urejanje ankete lahko dodelite tudi ostalim uporabnikom, ki so že ali pa še ne, registrirani na ",
"srv_dostop_adduserstxt_admin" => "Dostop za urejanje ankete lahko dodelite tudi ostalim uporabnikom, ki so že ali pa še ne registrirani na ",
"srv_dostop_adduserstxt" => "Dostop za urejanje ankete lahko dodelite samo uporabnikom, ki so že registrirani na ",
"srv_dostop_adduserstxt_aai_more" => "<a href=\"https://www.1ka.si/d/sl/pomoc/prirocniki/dodajanje-uredniskega-dostopa-na-1kaarnessi\" target=\"_blank\">Več >></a>",
"srv_dostop_adduserstxt_email" => "V vsako vrstico vpi&#353;ite le en email naslov. Poleg emaila lahko dodate tudi ime in priimek, vse spremenljivke lo&#269;ite z vejico (janez.novak@example.com,Janez,Novak):",
"srv_dostop_adduserstxt_note" => "Sporočilo za uporabnike, ki jim dodeljujete dostop (opcijsko). Sporočilo lahko poljubno spremenite.",
"srv_dostop_adduserstxt_note" => "V avtomatsko obvestilo o dostopu dodaj svoje sporočilo (neobvezno).",
"srv_dostop_adduserstxt_note_text" => "Pozdravljeni,\r\n\r\ndodelil/a sem vam dostop do ankete, ki jo trenutno urejam.\r\n\r\nLep pozdrav",
"srv_dostop_adduserstxt_end" => "Uporabniki bodo o novem dostopu avtomatsko obve&#353;&#269;eni na e-mail.",
"srv_dostop_addusers_button" => "Dodaj dostope in pošlji obvestila",
"srv_dostop_adduserstxt_end" => "Uporabniki bodo o dostopu avtomatsko obveščeni na e-mail.",
"srv_dostop_addusers_button" => "Dodaj dostope",
"srv_dostop_addusers_error1" => "Vnešeni email naslov ni veljaven!",
"srv_dostop_addusers_error2" => "Uporabnik s tem e-poštnim naslovom še ni registriran!",
"srv_dostop_addusers_error3" => "Prišlo je do napake pri pošiljanju obvestila!",
@ -6248,6 +6247,11 @@ $lang = array (
'srv_enote_navedbe_2' => 'Navedbe: vsaka enota se lahko upošteva večkrat; število navedb je lahko večje kot število enot.',
'srv_line_number' => 'Zap. št.',
'srv_dostop_users' => 'Dostop do ankete imajo',
'srv_dostop_users_list' => 'Seznam uporabnikov z dostopom do urejanja ankete',
'srv_dostop_users_username' => 'Uporabniško ime',
'srv_dostop_users_email' => 'Email naslov',
'srv_dostop_users_addedby' => 'Dostop je dodelil',
'srv_dostop_users_removeselected' => 'Odstrani označene',
'srv_dataIcons_multiple' => 'Kombinirana tabela',
'srv_incremental_lock_message' => 'Poteka priprava podatkov za pregled in analize. Prosimo počakajte trenutek!',
'srv_archive_test_data_count' => 'Število testnih podatkov: ',

View File

@ -2032,7 +2032,6 @@ $lang = array (
"srv_alert_foto_remove" => "Remove image",
"srv_dostop" => "Survey can be edited by",
"srv_izpolnjujejo" => "Survey can be answered by",
"srv_dostop_users" => "Users who can edit survey",
"srv_dostop_addusers" => "Add users that can edit survey",
"srv_dostop_userspassive"=> "Passive users that can view survey",
"srv_passive_multilang" => "Passive users that can translate survey into approved languages",
@ -2041,10 +2040,10 @@ $lang = array (
"srv_dostop_adduserstxt_admin" => "You can grant access to edit the survey to users who are already or not yet registered on ",
"srv_dostop_adduserstxt_aai_more" => "<a href=\"https://www.1ka.si/d/en/help/manuals/adding-editorial-access-on-1kaarnessi\" target=\"_blank\">More >></a>",
"srv_dostop_adduserstxt_email" => "Enter only one email address per line. In addition to the email, you can add a first and last name. Separate all variables with a comma (john.smith@example.com,John,Smith):",
"srv_dostop_adduserstxt_note" => "Optionally you can add a message for users you are adding.",
"srv_dostop_adduserstxt_note" => "Add your own message to the automatic access notification (optional).",
"srv_dostop_adduserstxt_note_text" => "Hello, I have granted you access to the survey I am currently editing. Greetings",
"srv_dostop_adduserstxt_end" => "Users will be automatically notified by e-mail.",
"srv_dostop_addusers_button" => "Grant access and send notifications",
"srv_dostop_addusers_button" => "Grant access",
"srv_dostop_addusers_error1" => "Email address is not valid!",
"srv_dostop_addusers_error2" => "User with this email address does not have an account!",
"srv_dostop_addusers_error3" => "There was an error sending the notification !",
@ -6144,6 +6143,11 @@ $lang = array (
'srv_enote_navedbe_2' => 'Navedbe: vsaka enota se lahko upošteva večkrat; število navedb je lahko večje kot število enot.',
'srv_line_number' => 'No',
'srv_dostop_users' => 'Users with access to survey',
'srv_dostop_users_list' => 'List of users with access to editing the survey',
'srv_dostop_users_username' => 'Username',
'srv_dostop_users_email' => 'Email address',
'srv_dostop_users_addedby' => 'Access given by',
'srv_dostop_users_removeselected' => 'Remove selected',
'srv_dataIcons_multiple' => 'Multiple table',
'srv_incremental_lock_message' => 'We are preparing data for review and analysis. Please wait a moment!',
'srv_archive_test_data_count' => 'Test data count: ',

View File

@ -7111,6 +7111,10 @@ div.button_holder.inline {
div.button_holder.inline button {
margin-left: 16px;
}
div.button_holder.below {
margin-bottom: 0;
margin-top: 24px;
}
button.ui-datepicker-trigger {
cursor: pointer;
@ -7397,7 +7401,7 @@ textarea:focus {
border-color: transparent;
border-color: #1E88E5;
}
textarea#anketa_note {
textarea#anketa_note, textarea#addusers {
width: 800px;
height: 120px;
}

View File

@ -115,6 +115,11 @@ div.button_holder {
margin-left: 16px;
}
}
&.below {
margin-bottom: 0;
margin-top: 24px;
}
}
//Trigger button za koledar

View File

@ -28,7 +28,8 @@ textarea {
border-color: $blue;
}
&#anketa_note{
&#anketa_note,
&#addusers{
width: 800px;
height: 120px;
}