Index: django/contrib/admin/media/js/actions.min.js
===================================================================
--- django/contrib/admin/media/js/actions.min.js	(revision 12814)
+++ django/contrib/admin/media/js/actions.min.js	(working copy)
@@ -1,5 +1 @@
-(function(a){a.fn.actions=function(g){var b=a.extend({},a.fn.actions.defaults,g),e=a(this);checker=function(c){c?showQuestion():reset();a(e).attr("checked",c).parent().parent().toggleClass(b.selectedClass,c)};updateCounter=function(){var c=a(e).filter(":checked").length;a("span._acnt").html(c);a(b.allToggle).attr("checked",function(){if(c==e.length){value=true;showQuestion()}else{value=false;clearAcross()}return value})};showQuestion=function(){a(b.acrossClears).hide();a(b.acrossQuestions).show();
-a(b.allContainer).hide()};showClear=function(){a(b.acrossClears).show();a(b.acrossQuestions).hide();a(b.actionContainer).toggleClass(b.selectedClass);a(b.allContainer).show();a(b.counterContainer).hide()};reset=function(){a(b.acrossClears).hide();a(b.acrossQuestions).hide();a(b.allContainer).hide();a(b.counterContainer).show()};clearAcross=function(){reset();a(b.acrossInput).val(0);a(b.actionContainer).removeClass(b.selectedClass)};a(b.counterContainer).show();a(this).filter(":checked").each(function(){a(this).parent().parent().toggleClass(b.selectedClass);
-updateCounter();a(b.acrossInput).val()==1&&showClear()});a(b.allToggle).show().click(function(){checker(a(this).attr("checked"));updateCounter()});a("div.actions span.question a").click(function(c){c.preventDefault();a(b.acrossInput).val(1);showClear()});a("div.actions span.clear a").click(function(c){c.preventDefault();a(b.allToggle).attr("checked",false);clearAcross();checker(0);updateCounter()});lastChecked=null;a(e).click(function(c){if(!c)c=window.event;var d=c.target?c.target:c.srcElement;if(lastChecked&&
-a.data(lastChecked)!=a.data(d)&&c.shiftKey==true){var f=false;a(lastChecked).attr("checked",d.checked).parent().parent().toggleClass(b.selectedClass,d.checked);a(e).each(function(){if(a.data(this)==a.data(lastChecked)||a.data(this)==a.data(d))f=f?false:true;f&&a(this).attr("checked",d.checked).parent().parent().toggleClass(b.selectedClass,d.checked)})}a(d).parent().parent().toggleClass(b.selectedClass,d.checked);lastChecked=d;updateCounter()})};a.fn.actions.defaults={actionContainer:"div.actions",
-counterContainer:"span.action-counter",allContainer:"div.actions span.all",acrossInput:"div.actions input.select-across",acrossQuestions:"div.actions span.question",acrossClears:"div.actions span.clear",allToggle:"#action-toggle",selectedClass:"selected"}})(jQuery);
+(function($){$.fn.actions=function(opts){var options=$.extend({},$.fn.actions.defaults,opts);var actionCheckboxes=$(this);var list_editable_changed=false;checker=function(checked){if(checked){showQuestion();}else{reset();}$(actionCheckboxes).attr("checked",checked).parent().parent().toggleClass(options.selectedClass,checked);};updateCounter=function(){var count=$(actionCheckboxes).filter(":checked").length;$("span._acnt").html(count);$(options.allToggle).attr("checked",function(){if(count==actionCheckboxes.length){value=true;showQuestion();}else{value=false;clearAcross();}return value;});};showQuestion=function(){$(options.acrossClears).hide();$(options.acrossQuestions).show();$(options.allContainer).hide();};showClear=function(){$(options.acrossClears).show();$(options.acrossQuestions).hide();$(options.actionContainer).toggleClass(options.selectedClass);$(options.allContainer).show();$(options.counterContainer).hide();};reset=function(){$(options.acrossClears).hide();$(options.acrossQuestions).hide();$(options.allContainer).hide();$(options.counterContainer).show();};clearAcross=function(){reset();$(options.acrossInput).val(0);$(options.actionContainer).removeClass(options.selectedClass);};$(options.counterContainer).show();$(this).filter(":checked").each(function(i){$(this).parent().parent().toggleClass(options.selectedClass);updateCounter();if($(options.acrossInput).val()==1){showClear();}});$(options.allToggle).show().click(function(){checker($(this).attr("checked"));updateCounter();});$("div.actions span.question a").click(function(event){event.preventDefault();$(options.acrossInput).val(1);showClear();});$("div.actions span.clear a").click(function(event){event.preventDefault();$(options.allToggle).attr("checked",false);clearAcross();checker(0);updateCounter();});lastChecked=null;$(actionCheckboxes).click(function(event){if(!event){var event=window.event;}var target=event.target?event.target:event.srcElement;if(lastChecked&&$.data(lastChecked)!=$.data(target)&&event.shiftKey==true){var inrange=false;$(lastChecked).attr("checked",target.checked).parent().parent().toggleClass(options.selectedClass,target.checked);$(actionCheckboxes).each(function(){if($.data(this)==$.data(lastChecked)||$.data(this)==$.data(target)){inrange=(inrange)?false:true;}if(inrange){$(this).attr("checked",target.checked).parent().parent().toggleClass(options.selectedClass,target.checked);}});}$(target).parent().parent().toggleClass(options.selectedClass,target.checked);lastChecked=target;updateCounter();});$("form#changelist-form table#result_list tr").find("td:gt(0) :input").change(function(){list_editable_changed=true;});$('form#changelist-form button[name="index"]').click(function(event){if(list_editable_changed){answer=confirm("You have unsaved changes on individual editable fields. If you run this action, your unsaved changes will be lost.");if(answer){return true;}else{return false;}}});$('form#changelist-form input[name="_save"]').click(function(event){var action_changed=false;$("div.actions select option:selected").each(function(){if($(this).val()!=""){action_changed=true;}});if(action_changed&&!list_editable_changed){answer=confirm("You have selected an action, and you haven't made any changes on individual fields. You're probably looking for the Go button rather than the Save button.");if(answer){return true;}else{return false;}}if(action_changed&&list_editable_changed){answer=confirm("You have selected an action, but you haven't saved your changes to individual fields yet. Please click OK to save. You'll need to re-run the action.");if(answer){return true;}else{return false;}}});};$.fn.actions.defaults={actionContainer:"div.actions",counterContainer:"span.action-counter",allContainer:"div.actions span.all",acrossInput:"div.actions input.select-across",acrossQuestions:"div.actions span.question",acrossClears:"div.actions span.clear",allToggle:"#action-toggle",selectedClass:"selected"};})(jQuery);
Index: django/contrib/admin/media/js/actions.js
===================================================================
--- django/contrib/admin/media/js/actions.js	(revision 12814)
+++ django/contrib/admin/media/js/actions.js	(working copy)
@@ -2,6 +2,7 @@
 	$.fn.actions = function(opts) {
 		var options = $.extend({}, $.fn.actions.defaults, opts);
 		var actionCheckboxes = $(this);
+		var list_editable_changed = false;
 		checker = function(checked) {
 			if (checked) {
 				showQuestion();
@@ -96,6 +97,34 @@
 			lastChecked = target;
 			updateCounter();
 		});
+		$('form#changelist-form table#result_list tr').find('td:gt(0) :input').change(function() {
+		    list_editable_changed = true;
+		});
+		$('form#changelist-form button[name="index"]').click(function(event) {
+		    if (list_editable_changed) {
+		        answer = confirm('You have unsaved changes on individual editable fields. If you run this action, your unsaved changes will be lost.');
+		        if (answer) { return true }
+		        else { return false };
+		    }
+		});
+		$('form#changelist-form input[name="_save"]').click(function(event) {
+		    var action_changed = false;
+		    $('div.actions select option:selected').each(function() {
+		        if ($(this).val() != "") {
+		            action_changed = true;
+		        }
+		    });
+		    if (action_changed && !list_editable_changed) {
+		        answer = confirm("You have selected an action, and you haven't made any changes on individual fields. You're probably looking for the Go button rather than the Save button.");
+		        if (answer) { return true }
+		        else { return false };
+		    }
+		    if (action_changed && list_editable_changed) {
+		        answer = confirm("You have selected an action, but you haven't saved your changes to individual fields yet. Please click OK to save. You'll need to re-run the action.");
+		        if (answer) { return true }
+		        else { return false };
+		    }
+		});
 	}
 	/* Setup plugin defaults */
 	$.fn.actions.defaults = {
Index: django/contrib/admin/options.py
===================================================================
--- django/contrib/admin/options.py	(revision 12814)
+++ django/contrib/admin/options.py	(working copy)
@@ -732,7 +732,7 @@
 
             # Get the list of selected PKs. If nothing's selected, we can't
             # perform an action on it, so bail. Except we want to perform
-            # the action explicitely on all objects.
+            # the action explicitly on all objects.
             selected = request.POST.getlist(helpers.ACTION_CHECKBOX_NAME)
             if not selected and not select_across:
                 # Reminder that something needs to be selected or nothing will happen
@@ -756,6 +756,7 @@
         else:
             msg = _("No action selected.")
             self.message_user(request, msg)
+            return None
 
     @csrf_protect_m
     @transaction.commit_on_success
@@ -974,20 +975,41 @@
             return HttpResponseRedirect(request.path + '?' + ERROR_FLAG + '=1')
 
         # If the request was POSTed, this might be a bulk action or a bulk edit.
-        # Try to look up an action or confirmation first, but if this isn't an
-        # action the POST will fall through to the bulk edit check, below.
-        if actions and request.method == 'POST' and (helpers.ACTION_CHECKBOX_NAME in request.POST or 'index' in request.POST):
-            response = self.response_action(request, queryset=cl.get_query_set())
-            if response:
-                return response
+        # Try to look up an action or confirmation first, but if this isn't an action the POST
+        # will fall through to the bulk edit check, below.
 
+        action_failed = False
+
+        # Actions with no confirmation
+        if actions and request.method == 'POST' and 'index' in request.POST and '_save' not in request.POST:
+            if len(request.POST.get(helpers.ACTION_CHECKBOX_NAME, [])):
+                response = self.response_action(request, queryset=cl.get_query_set())
+                if response:
+                    return response
+                else:
+                    action_failed = True
+            else:
+                msg = _("Items must be selected in order to perform actions on them. No items have been changed.")
+                self.message_user(request, msg)
+                action_failed = True
+
+        # Actions with confirmation
+        if actions and request.method == 'POST' and helpers.ACTION_CHECKBOX_NAME in request.POST and 'index' not in request.POST and '_save' not in request.POST:
+            if len(request.POST.get(helpers.ACTION_CHECKBOX_NAME, [])):
+                response = self.response_action(request, queryset=cl.get_query_set())
+                if response:
+                    return response
+                else:
+                    action_failed = True
+
+
         # If we're allowing changelist editing, we need to construct a formset
         # for the changelist given all the fields to be edited. Then we'll
         # use the formset to validate/process POSTed data.
         formset = cl.formset = None
 
         # Handle POSTed bulk-edit data.
-        if request.method == "POST" and self.list_editable:
+        if request.method == "POST" and self.list_editable and '_save' in request.POST and not action_failed:
             FormSet = self.get_changelist_formset(request)
             formset = cl.formset = FormSet(request.POST, request.FILES, queryset=cl.result_list)
             if formset.is_valid():
Index: django/contrib/admin/templates/admin/change_list.html
===================================================================
--- django/contrib/admin/templates/admin/change_list.html	(revision 12814)
+++ django/contrib/admin/templates/admin/change_list.html	(working copy)
@@ -82,7 +82,7 @@
         {% endif %}
       {% endblock %}
       
-      <form action="" method="post"{% if cl.formset.is_multipart %} enctype="multipart/form-data"{% endif %}>{% csrf_token %}
+      <form id="changelist-form" action="" method="post"{% if cl.formset.is_multipart %} enctype="multipart/form-data"{% endif %}>{% csrf_token %}
       {% if cl.formset %}
         {{ cl.formset.management_form }}
       {% endif %}
Index: django/contrib/admin/templates/admin/change_list_results.html
===================================================================
--- django/contrib/admin/templates/admin/change_list_results.html	(revision 12814)
+++ django/contrib/admin/templates/admin/change_list_results.html	(working copy)
@@ -1,5 +1,5 @@
 {% if results %}
-<table cellspacing="0">
+<table cellspacing="0" id="result_list">
 <thead>
 <tr>
 {% for header in result_headers %}<th{{ header.class_attrib }}>
Index: tests/regressiontests/admin_views/tests.py
===================================================================
--- tests/regressiontests/admin_views/tests.py	(revision 12814)
+++ tests/regressiontests/admin_views/tests.py	(working copy)
@@ -1085,6 +1085,8 @@
             "form-2-alive": "checked",
             "form-2-gender": "1",
             "form-2-id": "3",
+
+            "_save": "Save",
         }
         response = self.client.post('/test_admin/admin/admin_views/person/',
                                     data, follow=True)
@@ -1105,6 +1107,8 @@
             "form-2-alive": "checked",
             "form-2-gender": "1",
             "form-2-id": "3",
+
+            "_save": "Save",
         }
         self.client.post('/test_admin/admin/admin_views/person/', data)
 
@@ -1124,6 +1128,8 @@
             "form-1-id": "3",
             "form-1-gender": "1",
             "form-1-alive": "checked",
+
+            "_save": "Save",
         }
         self.client.post('/test_admin/admin/admin_views/person/?gender__exact=1', data)
 
@@ -1136,7 +1142,9 @@
             "form-MAX_NUM_FORMS": "0",
 
             "form-0-id": "1",
-            "form-0-gender": "1"
+            "form-0-gender": "1",
+
+            "_save": "Save",
         }
         self.client.post('/test_admin/admin/admin_views/person/?q=mauchly', data)
 
@@ -1152,6 +1160,10 @@
             "form-0-id": "2",
             "form-0-alive": "1",
             "form-0-gender": "2",
+
+            # Ensure that the form processing understands this as a list_editable "Save"
+            # and not an action "Go".
+            "_save": "Save",
         }
         response = self.client.post('/test_admin/admin/admin_views/person/', data)
         self.assertContains(response, "Grace is not a Zombie")
@@ -1166,6 +1178,8 @@
             "form-0-id": "2",
             "form-0-alive": "1",
             "form-0-gender": "2",
+
+            "_save": "Save",
         }
         response = self.client.post('/test_admin/admin/admin_views/person/', data)
         non_form_errors = response.context['cl'].formset.non_form_errors()
@@ -1201,6 +1215,10 @@
             "form-3-order": "0",
             "form-3-id": "4",
             "form-3-collector": "1",
+
+            # Ensure that the form processing understands this as a list_editable "Save"
+            # and not an action "Go".
+            "_save": "Save",
         }
         response = self.client.post('/test_admin/admin/admin_views/category/', data)
         # Successful post will redirect
@@ -1212,6 +1230,63 @@
         self.failUnlessEqual(Category.objects.get(id=3).order, 1)
         self.failUnlessEqual(Category.objects.get(id=4).order, 0)
 
+    def test_list_editable_action_submit(self):
+        # List editable changes should not be executed if the action "Go" button is
+        # used to submit the form.
+        data = {
+            "form-TOTAL_FORMS": "3",
+            "form-INITIAL_FORMS": "3",
+            "form-MAX_NUM_FORMS": "0",
+
+            "form-0-gender": "1",
+            "form-0-id": "1",
+
+            "form-1-gender": "2",
+            "form-1-id": "2",
+
+            "form-2-alive": "checked",
+            "form-2-gender": "1",
+            "form-2-id": "3",
+
+            "index": "0",
+            "_selected_action": [u'3'],
+            "action": [u'', u'delete_selected'],
+        }
+        self.client.post('/test_admin/admin/admin_views/person/', data)
+
+        self.failUnlessEqual(Person.objects.get(name="John Mauchly").alive, True)
+        self.failUnlessEqual(Person.objects.get(name="Grace Hopper").gender, 1)
+
+    def test_list_editable_action_choices(self):
+        # List editable changes should be executed if the "Save" button is
+        # used to submit the form - any action choices should be ignored.
+        data = {
+            "form-TOTAL_FORMS": "3",
+            "form-INITIAL_FORMS": "3",
+            "form-MAX_NUM_FORMS": "0",
+
+            "form-0-gender": "1",
+            "form-0-id": "1",
+
+            "form-1-gender": "2",
+            "form-1-id": "2",
+
+            "form-2-alive": "checked",
+            "form-2-gender": "1",
+            "form-2-id": "3",
+
+            "_save": "Save",
+            "_selected_action": [u'1'],
+            "action": [u'', u'delete_selected'],
+        }
+        self.client.post('/test_admin/admin/admin_views/person/', data)
+
+        self.failUnlessEqual(Person.objects.get(name="John Mauchly").alive, False)
+        self.failUnlessEqual(Person.objects.get(name="Grace Hopper").gender, 2)
+
+
+
+
 class AdminSearchTest(TestCase):
     fixtures = ['admin-views-users','multiple-child-classes']
 
