Commit e084a59e authored by Gabriel Detraz's avatar Gabriel Detraz

Revert "Le droit imprimeur permet de lancer les impressions en A3"

This reverts commit 0be37a6d.
parent 7e71c56d
......@@ -134,12 +134,6 @@ class PrintForm(forms.Form):
del champ # Gruiiik
copies.widget.attrs["onKeyUp"] = javascript_function
def __init__(self,*args,**kwargs):
full_choice_paper = kwargs.pop('full_choice_paper')
super(PrintForm,self).__init__(*args,**kwargs)
if full_choice_paper:
self.fields['format'].choices = [('A4', u'A4'), ('A3', u'A3')]
def clean(self):
"""Certains valeurs des paramètres sont incompatibles."""
out = forms.Form.clean(self)
......
......@@ -14,7 +14,6 @@ from django.shortcuts import render_to_response,render
from django.views.generic.detail import DetailView
from django.utils.translation import ugettext_lazy as _
from django.forms import formset_factory
from functools import partial, wraps
# Paginateur , afin d'éviter de trop longues pages
from django.core.paginator import Paginator, EmptyPage, PageNotAnInteger
......@@ -164,7 +163,7 @@ def view(request):
if uploadform.is_valid():
initial_data = [{'filenom': form.cleaned_data["fichier"].name,
'pageno' : form.cleaned_data["pageno"],} for form in uploadform if form.cleaned_data.has_key("fichier")]
printform = formset_factory(wraps(PrintForm)(partial(PrintForm, full_choice_paper=is_imprimeur(request))), extra=0)
printform = formset_factory(PrintForm, extra=0)
printform = printform(initial=initial_data)
return render(request, "impressions/print.html",
{'printform': printform,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment