qualif: limit 'copies' support to mails
This commit is contained in:
parent
d6b0e5e9d0
commit
bed4ded73e
|
@ -21,6 +21,7 @@
|
|||
<button class="add">{% trans 'Add' %}</button>
|
||||
</div>
|
||||
|
||||
{% if source_type_name == 'mail' %}
|
||||
<!-- special alfortville stuff, this should be factored out -->
|
||||
<div id="copies">
|
||||
<p><strong>Copies</strong> (<a rel="popup" data-inplace-submit="true" href="{% url 'alfortville-copies' pk=source_pk %}">{% trans 'Edit' %}</a>)</p>
|
||||
|
@ -29,6 +30,7 @@
|
|||
<p class="mandatory_avis">Pour avis bloquant : <span>...</span></p>
|
||||
<script>$('#copies').trigger('welco:load-copies');</script>
|
||||
</div>
|
||||
{% endif %}
|
||||
|
||||
{% if associations|length %}
|
||||
<button class="done" data-action-url="{% url 'qualif-done' %}">{% trans 'Submit' %}</button>
|
||||
|
|
|
@ -71,6 +71,8 @@ class Qualification(TemplateView):
|
|||
context = super(Qualification, self).get_context_data(**kwargs)
|
||||
context['form'] = QualificationForm()
|
||||
context['source_type'] = self.request.GET['source_type']
|
||||
source_type = ContentType.objects.get(id=self.request.GET['source_type'])
|
||||
context['source_type_name'] = source_type.model
|
||||
context['source_pk'] = self.request.GET['source_pk']
|
||||
if self.request.GET.get('source_pk'):
|
||||
context['associations'] = Association.objects.filter(
|
||||
|
|
Loading…
Reference in New Issue