Explorar el Código

Added Warning Class

own3mall hace 8 años
padre
commit
c8b6cc7400
Se han modificado 3 ficheros con 7 adiciones y 4 borrados
  1. 3 3
      includes/html_functions.php
  2. 3 0
      js/modules/user_games.js
  3. 1 1
      modules/user_games/edit_home.php

+ 3 - 3
includes/html_functions.php

@@ -22,9 +22,9 @@
  *
  */
 
-function print_failure($text)
+function print_failure($text, $class="failure")
 {
-    echo '<p class="failure">'.$text.'</p>';
+    echo '<p class="' . $class . '">'.$text.'</p>';
 }
 
 function print_success($text)
@@ -155,4 +155,4 @@ function check_theme_image($base_image_path)
 						'themes/'.$settings['theme'] . "/" . $base_image_path :
 						$base_image_path;
 }
-?>
+?>

+ 3 - 0
js/modules/user_games.js

@@ -162,6 +162,9 @@ $(document).ready(function() {
 					}
 				}
 				$("#result").html('<p class="'+data.result+'">'+data.info+'</p>');
+				if(data.result == "success"){
+					$("p.warning").remove();
+				}
 			}, "json");
 		}
 	});

+ 1 - 1
modules/user_games/edit_home.php

@@ -677,7 +677,7 @@ function exec_ogp_module()
 			 "</form><button data-path=\"".str_replace('"', "&quot;", $home_info['home_path'])."\" data-home-id='".$home_id."' id='browse'>".
 			  browse ."</button>";
 			  if($servers_with_same_path > 1){
-				print_failure(get_lang('other_servers_exist_with_path_please_change'));
+				print_failure(get_lang('other_servers_exist_with_path_please_change'), "warning");
 			  }
 		echo "</td></tr>".
 			 "<tr><td colspan='2' class='info'>". change_home_info ."</td></tr>";