Преглед изворни кода

Don't assume we are the first form on the page

pdontthink пре 17 година
родитељ
комит
94a7db1ba4
2 измењених фајлова са 2 додато и 2 уклоњено
  1. 1 1
      include/options/display.php
  2. 1 1
      src/options.php

+ 1 - 1
include/options/display.php

@@ -197,7 +197,7 @@ function load_optpage_data_display() {
                            SMPREF_JS_ON         => _("Always"),
                            SMPREF_JS_OFF        => _("Never")),
         'save'    => 'save_option_javascript_autodetect',
-        'extra_attributes' => array('onclick' => 'document.forms[0].new_js_autodetect_results.value = \'' . SMPREF_JS_ON . '\';'),
+        'extra_attributes' => array('onclick' => 'document.option_form.new_js_autodetect_results.value = \'' . SMPREF_JS_ON . '\';'),
     );
 
     $optvals[SMOPT_GRP_GENERAL][] = array(

+ 1 - 1
src/options.php

@@ -424,7 +424,7 @@ if ($optpage == SMOPT_PAGE_MAIN) {
     }
 
     // Begin output form
-    echo addForm('options.php', 'post', 'f')
+    echo addForm('options.php', 'post', 'option_form')
        . create_optpage_element($optpage)
        . create_optmode_element(SMOPT_MODE_SUBMIT);