]> projects.mako.cc - scuttle/blobdiff - templates/editbookmark.tpl.php
Revert Thomas Niepraschk's tag autocomplete feature (3 commits)
[scuttle] / templates / editbookmark.tpl.php
index a590d818aa54fa0806de91ce25879ce80c3b02e2..16b56c7fd0ad47274ad852bcc850e50843ea47ec 100644 (file)
@@ -17,12 +17,6 @@ switch ($row['bStatus']) {
 }
 ?>
 
-<script type="text/javascript">
-window.onload = function() {
-    document.getElementById("address").focus();
-}
-</script>
-
 <form action="<?php echo $formaction; ?>" method="post">
 <table>
 <tr>
@@ -60,27 +54,24 @@ window.onload = function() {
     <td></td>
     <td>
         <input type="submit" name="submitted" value="<?php echo $btnsubmit; ?>" />
-        <?php
-        if ($showdelete) {
-        ?>
-        <input type="submit" name="delete" value="<?php echo T_('Delete Bookmark'); ?>" />
-        <?php
-        }
-        if ($popup) {
-        ?>
-        <input type="hidden" name="popup" value="1" />
-        <?php
-        } elseif ($referrer) {
-        ?>
-        <input type="hidden" name="referrer" value="<?php echo $referrer; ?>" />
-        <?php
-        }
-        ?>
+        <?php if ($showdelete): ?>
+          <input type="submit" name="delete" value="<?php echo T_('Delete Bookmark'); ?>" />
+        <?php endif; ?>
+        <?php if ($popup): ?>
+          <input type="hidden" name="popup" value="1" />
+        <?php elseif ($referrer): ?>
+          <input type="hidden" name="referrer" value="<?php echo $referrer; ?>" />
+        <?php endif; ?>
     </td>
     <td></td>
 </tr>
 </table>
 </form>
+<script type="text/javascript">
+$(function() {
+  $("#address").focus();
+});
+</script>
 
 <?php
 // Dynamic tag selection

Benjamin Mako Hill || Want to submit a patch?