Первый фоллен на хелле (wildkin) wrote in changelog,
Первый фоллен на хелле
wildkin
changelog

[livejournal] r17790: LJSUP-7440: Disable button "Yes, i want ...

Committer: dnikolaev
LJSUP-7440: Disable button "Yes, i want to load" when communities are loading

U   trunk/htdocs/admin/browse/load_all_structure.bml
Modified: trunk/htdocs/admin/browse/load_all_structure.bml
===================================================================
--- trunk/htdocs/admin/browse/load_all_structure.bml	2010-11-26 04:11:01 UTC (rev 17789)
+++ trunk/htdocs/admin/browse/load_all_structure.bml	2010-11-26 04:20:00 UTC (rev 17790)
@@ -111,11 +111,11 @@
 
     my @verticals = LJ::Vertical->load_all();
 
-    $ret .= "<form method='POST' enctype='multipart/form-data'>\n";
+    $ret .= "<form method='POST' enctype='multipart/form-data' onsubmit=' this.load.disabled=true; '>\n";
     $ret .= LJ::form_auth();
 
-    $ret .= "<p><input type='file' size='50' name='all_structure'></p>";
-    $ret .= "<p><br/><input type='submit' name='load' onclick='this.disabled=true;' value='Load'></p>";
+    $ret .= "<p><input type='file' name='all_structure'></p>";
+    $ret .= "<p><br/><input type='submit' name='load' onclick='this.parentNode.insertBefore( document.createTextNode(\" Loading...\"), this.nextSibling);' value='Yes, I want to load'></p>";
 
     $ret .= "</form>";
     $ret .= "<p><a href='/admin/browse/'>Back to main page</a></p>";

Tags: bml, livejournal, wildkin
Subscribe
  • Post a new comment

    Error

    Anonymous comments are disabled in this journal

    default userpic

    Your reply will be screened

    Your IP address will be recorded 

  • 0 comments