Эх сурвалжийг харах

Default Settings - Edit: Revise and simplify javascript.

Nate 5 жил өмнө
parent
commit
81e7d28470

+ 3 - 10
core/default_settings/default_setting_edit.php

@@ -723,16 +723,9 @@
 	}
 
 	echo "<script>\n";
-	//capture enter key to submit form
-		if (!($category == "theme" && $subcategory == "custom_css_code" && $name == "text" )) {
-			echo "	$(window).on('keypress',function(event){\n";
-			echo "		if (event.which == 13) { submit_form(); }\n";
-			echo "	});\n";
-		}
-	//hide/convert password fields then submit form
+	//hide password fields before submit
 		echo "	function submit_form() {\n";
-		echo "		$('input:password').css('visibility','hidden');\n";
-		echo "		$('input:password').attr({type:'text'});\n";
+		echo "		hide_password_fields();\n";
 		echo "		$('form#frm').submit();\n";
 		echo "	}\n";
 	//define lowercase class
@@ -746,4 +739,4 @@
 //include the footer
 	require_once "resources/footer.php";
 
-?>
+?>