﻿id	summary	reporter	owner	description	type	status	component	version	severity	resolution	keywords	cc	stage	has_patch	needs_docs	needs_tests	needs_better_patch	easy	ui_ux
25766	"adding javascript ""this.disabled"" invalidate ManyToManyField"	liwee	nobody	"With just models.py and admin.py, I was able to save a poll without any problems.
But if you add onClick=""this.disabled=true; this.form.submit()"", trying to save the poll will cause a problem. 

submit_line.html

{{{
{% if show_save_and_continue %}<input onClick=""this.disabled=true; this.form.submit();"" type=""submit"" value=""{% trans 'Save and continue editing' %}"" name=""_continue"" />{% endif %}
}}}



models.py

{{{
from django.db import models

class Question(models.Model):
    qn = models.CharField(max_length=200)

    def __unicode__(self):
        return self.qn
			
class Poll(models.Model):
    name = models.CharField(max_length=200)
    qn = models.ManyToManyField(Question)

}}}

admin.py

{{{
from django.contrib import admin
from .models import *

class PollAdmin(admin.ModelAdmin):
	filter_horizontal = ('qn',)

admin.site.register(Poll, PollAdmin)
admin.site.register(Question)
}}}"	Bug	new	contrib.admin	1.7	Normal				Unreviewed	0	0	0	0	0	0
