diff options
Diffstat (limited to 'admin/survey/modules/mod_hierarhija/class/Ajax')
-rw-r--r-- | admin/survey/modules/mod_hierarhija/class/Ajax/AjaxHierarhijaDostopUporabnikovClass.php | 33 | ||||
-rw-r--r-- | admin/survey/modules/mod_hierarhija/class/Ajax/AjaxUporabnikiClass.php | 2 |
2 files changed, 26 insertions, 9 deletions
diff --git a/admin/survey/modules/mod_hierarhija/class/Ajax/AjaxHierarhijaDostopUporabnikovClass.php b/admin/survey/modules/mod_hierarhija/class/Ajax/AjaxHierarhijaDostopUporabnikovClass.php index 652cfa9..0770ee9 100644 --- a/admin/survey/modules/mod_hierarhija/class/Ajax/AjaxHierarhijaDostopUporabnikovClass.php +++ b/admin/survey/modules/mod_hierarhija/class/Ajax/AjaxHierarhijaDostopUporabnikovClass.php @@ -40,13 +40,14 @@ class AjaxHierarhijaDostopUporabnikovClass { }else {
echo '<h2> Vpiši uporabnika za dostop do SA modula</h2>';
}
+ echo '<div class="popup_close"><a href="#" onClick="edit_user_close();">✕</a></div>';
echo '<div>';
// EMAIL
echo '<div style="width: 100%;">';
echo '<label>Elektronski naslov</label><br/>';
if(!empty($user)){
- echo '<input type="email" value="'.$user->email .'" disabled="disabled" style="width: 80%; padding: 4px; margin: 2px 0;"/>';
+ echo '<input type="email" value="'.$user->email .'" disabled="disabled" />';
}else{
echo '<input type="email"
value=""
@@ -54,7 +55,7 @@ class AjaxHierarhijaDostopUporabnikovClass { id="sa-email"
onblur="preveriVpisanEmailZaSAdostop()"
required="required"
- style="width: 80%; padding: 4px; margin: 2px 0;"/>';
+ />';
echo '<input type="hidden" value="" id="sa-id" "/>';
echo '<span id="sa-email-sporocilo"></span>';
}
@@ -63,13 +64,13 @@ class AjaxHierarhijaDostopUporabnikovClass { // Organizzacija
echo '<div style="padding:15px 0;width: 100%;">';
echo '<label>Šola oz. javni zavod</label><br/>';
- echo '<input type="text" value="'.(!empty($user) ? $user->ustanova : NULL).'" placeholder="Srednja šola" id="sa-ustanova" required="required" style="width: 80%; padding: 4px; margin: 2px 0;"/>';
+ echo '<input type="text" value="'.(!empty($user) ? $user->ustanova : NULL).'" placeholder="Srednja šola" id="sa-ustanova" required="required" />';
echo '</div>';
// Email za AAI dostop
echo '<div style="padding-bottom:15px; width: 100%;">';
echo '<label>Elektronski naaslov za AAI dostop (v kolikor je primarni email drugačen od AAI dostopa)</label><br/>';
- echo '<input type="email" value="'.(!empty($user) ? $user->aai_email : NULL).'" placeholder="janez.novak@guest.arnes.si" id="sa-aai" style="width: 80%; padding: 4px; margin: 2px 0;"/>';
+ echo '<input type="email" value="'.(!empty($user) ? $user->aai_email : NULL).'" placeholder="janez.novak@guest.arnes.si" id="sa-aai" />';
echo '</div>';
echo '</div>';
@@ -77,17 +78,29 @@ class AjaxHierarhijaDostopUporabnikovClass { // Gumb za zapret popup in potrdit
echo '<div class="sa-modul">';
- echo '<div class="buttonwrapper spaceRight floatLeft">';
+ /* echo '<div class="buttonwrapper spaceRight floatLeft">';
if(!empty($user)) {
echo '<a class="ovalbutton ovalbutton_orange sa-potrdi" href="#" onclick="posodobiSAuporabnika(\'' . $user->id . '\')"; return false;"><span>' . $lang['srv_potrdi'] . '</span></a>' . "\n\r";
}else {
echo '<a class="ovalbutton ovalbutton_orange sa-potrdi" href="#" onclick="shraniSAuporabnika()"; return false;"><span>' . $lang['srv_potrdi'] . '</span></a>' . "\n\r";
}
- echo '</div>';
+ echo '</div>'; */
- echo '<div class="buttonwrapper spaceRight floatLeft">';
+ /* echo '<div class="buttonwrapper spaceRight floatLeft">';
echo '<a class="ovalbutton ovalbutton_gray" href="#" onclick="vrednost_cancel(); return false;"><span>' . $lang['srv_close_profile'] . '</span></a>' . "\n\r";
+ echo '</div>'; */
+ echo '<div class="button_holder">';
+
+ echo '<button class="medium white-blue" href="#" onclick="edit_user_close();return false;"><span>' . $lang['srv_close_profile'] . '</span></button>' . "\n\r";
+
+ if(!empty($user)) {
+ echo '<button class="medium blue" href="#" onclick="posodobiSAuporabnika(\'' . $user->id . '\')"; return false;"><span>' . $lang['srv_potrdi'] . '</span></button>' . "\n\r";
+ }else {
+ echo '<button class="medium blue" href="#" onclick="shraniSAuporabnika()"; return false;"><span>' . $lang['srv_potrdi'] . '</span></button>' . "\n\r";
+ }
+
echo '</div>';
+
echo '</div>';
echo '</div>';
@@ -182,6 +195,7 @@ class AjaxHierarhijaDostopUporabnikovClass { echo '<div class="sa-modul">';
echo '<h3><strong>'.$lang['user2'].'</strong></h3>';
+ echo '<div class="popup_close"><a href="#" onClick="edit_user_close();">✕</a></div>';
echo '<p><label for="type">'.$lang['admin_type'].':</label>';
switch ($user->type){
case 0:
@@ -217,8 +231,11 @@ class AjaxHierarhijaDostopUporabnikovClass { // Gumb za zapret popup in potrdit
echo '<div style=" display: block;">';
- echo '<div class="buttonwrapper spaceRight floatLeft">';
+ /* echo '<div class="buttonwrapper spaceRight floatLeft">';
echo '<a class="ovalbutton ovalbutton_gray" href="#" onclick="vrednost_cancel(); return false;"><span>' . $lang['srv_close_profile'] . '</span></a>' . "\n\r";
+ echo '</div>'; */
+ echo '<div class="button_holder">';
+ echo '<button class="medium white-blue" href="#" onclick="edit_user_close(); return false;"><span>' . $lang['srv_close_profile'] . '</span></button>' . "\n\r";
echo '</div>';
echo '</div>';
echo '</div>';
diff --git a/admin/survey/modules/mod_hierarhija/class/Ajax/AjaxUporabnikiClass.php b/admin/survey/modules/mod_hierarhija/class/Ajax/AjaxUporabnikiClass.php index 628977f..56db0f3 100644 --- a/admin/survey/modules/mod_hierarhija/class/Ajax/AjaxUporabnikiClass.php +++ b/admin/survey/modules/mod_hierarhija/class/Ajax/AjaxUporabnikiClass.php @@ -319,7 +319,7 @@ class AjaxUporabniki $sql_user = sisplet_query("SELECT id FROM users WHERE email='$email'");
if (mysqli_num_rows($sql_user) == 0) {
- sisplet_query("INSERT INTO users (name, surname, email, pass, type, when_reg, came_from) VALUES ('$name', '$surname', '$email', '" . base64_encode((hash(SHA256, '' . $pass_salt))) . "', '3', DATE_FORMAT(NOW(), '%Y-%m-%d'), '1')");
+ sisplet_query("INSERT INTO users (name, surname, email, pass, type, when_reg, came_from) VALUES ('$name', '$surname', '$email', '" . base64_encode((hash('SHA256', '' . $pass_salt))) . "', '3', DATE_FORMAT(NOW(), '%Y-%m-%d'), '1')");
$user_id = mysqli_insert_id($GLOBALS['connect_db']);
} else {
$row = mysqli_fetch_array($sql_user);
|