]> git.openstreetmap.org Git - osqa.git/blobdiff - forum/skins/default/templates/question_edit.html
fixes OSQA-439. IE should work again. Sorry about that. Thanks for the patches...
[osqa.git] / forum / skins / default / templates / question_edit.html
index 402a0eb56b27a8e48214ad35c0053b8fe07564e4..69bf688ef6df0bae9bd98768e5c1c5a5f3fb585a 100644 (file)
             tag = $("input#id_tags")[0].value;
         });
 
-        function submitClicked(e) {
+        function submitClicked(e, f) {
             if(!(browserTester('chrome') || browserTester('safari'))) {
                 $("input.submit")[0].disabled=true;
                 $("input.submit")[1].disabled=true;
             }
             window.removeEventListener('beforeunload', beforeUnload, true);
+            if (f) {
+                f.submit();
+            }
         }
 
         function beforeUnload(e) {
                 {{ form.summary.help_text }}
             </div>
             <div class="error" ></div>
-            <input type="submit" value="{% trans "Save edit" %}" class="submit" onclick="submitClicked(event)" />
-            <input type="button" value="{% trans "Cancel" %}" class="submit" onclick="history.back(-1);submitClicked(event)" />
+            <input type="button" value="{% trans "Save edit" %}" class="submit" onclick="submitClicked(event, this.form)" />
+            <input type="button" value="{% trans "Cancel" %}" class="submit" onclick="submitClicked(event, null); history.back(-1);" />
         </form>
     </div>
 </div>