Allows us to manage additional speakers from the admin (#58)
* Allows us to manage additional speakers from the admin * Show speaker e-mail addresses. Fixes #57 * Denotes fields as required.
This commit is contained in:
		
							parent
							
								
									a7fe10a8d9
								
							
						
					
					
						commit
						504cf77574
					
				
					 6 changed files with 34 additions and 7 deletions
				
			
		|  | @ -1,7 +1,17 @@ | ||||||
| from django.contrib import admin | from django.contrib import admin | ||||||
| 
 | 
 | ||||||
| import models | import models | ||||||
|  | from symposion.proposals import models as symposion_models | ||||||
| 
 | 
 | ||||||
| admin.site.register(models.TalkProposal) | 
 | ||||||
| admin.site.register(models.TutorialProposal) | @admin.register(models.TalkProposal) | ||||||
| admin.site.register(models.MiniconfProposal) | @admin.register(models.TutorialProposal) | ||||||
|  | @admin.register(models.MiniconfProposal) | ||||||
|  | class CategoryAdmin(admin.ModelAdmin): | ||||||
|  | 
 | ||||||
|  |     class AdditionalSpeakerInline(admin.TabularInline): | ||||||
|  |         model = symposion_models.AdditionalSpeaker | ||||||
|  | 
 | ||||||
|  |     inlines = [ | ||||||
|  |         AdditionalSpeakerInline, | ||||||
|  |     ] | ||||||
|  |  | ||||||
|  | @ -3,6 +3,8 @@ | ||||||
|   <br/> |   <br/> | ||||||
| {% endif %} | {% endif %} | ||||||
| 
 | 
 | ||||||
|  | <p>Fields marked with <strong>(*)</strong> are required.</p> | ||||||
|  | 
 | ||||||
| {% for field in form %} | {% for field in form %} | ||||||
|   {% if not field.is_hidden %} |   {% if not field.is_hidden %} | ||||||
|     <div class="fieldWrapper"> |     <div class="fieldWrapper"> | ||||||
|  |  | ||||||
|  | @ -1,3 +1,8 @@ | ||||||
| <h4><label for="{{ field.id_for_label }}">{{ field.label }}</label></h4> | <h4> | ||||||
|  |   <label for="{{ field.id_for_label }}">{{ field.label }}</label> | ||||||
|  |   {% if field.field.required %} | ||||||
|  |     (*) | ||||||
|  |   {% endif %} | ||||||
|  | </h4> | ||||||
| {{ field.errors }} | {{ field.errors }} | ||||||
| <div class="form-field {{ widget_class }}">{{ field }}</div> | <div class="form-field {{ widget_class }}">{{ field }}</div> | ||||||
|  |  | ||||||
|  | @ -1,4 +1,9 @@ | ||||||
| <h4><label for="{{ field.id_for_label }}">{{ field.label }}</label></h4> | <h4> | ||||||
|  |   <label for="{{ field.id_for_label }}">{{ field.label }}</label> | ||||||
|  |   {% if field.field.required %} | ||||||
|  |     (*) | ||||||
|  |   {% endif %} | ||||||
|  | </h4> | ||||||
| <ul class="form-field boolean-group"> | <ul class="form-field boolean-group"> | ||||||
|   {% for item in field %} |   {% for item in field %} | ||||||
|   LA |   LA | ||||||
|  |  | ||||||
|  | @ -1,7 +1,12 @@ | ||||||
| <ul class="form-field boolean-group"> | <ul class="form-field boolean-group"> | ||||||
|   <li class="boolean-group--row"> |   <li class="boolean-group--row"> | ||||||
|     {{ field }} |     {{ field }} | ||||||
|     <label for="{{ field.id_for_label }}"><strong>{{ field.label }}</strong></label> |     <label for="{{ field.id_for_label }}"> | ||||||
|  |       <strong>{{ field.label }}</strong> | ||||||
|  |       {% if field.field.required %} | ||||||
|  |         (*) | ||||||
|  |       {% endif %} | ||||||
|  |     </label> | ||||||
|   </li> |   </li> | ||||||
| </ul> | </ul> | ||||||
| {{ field.errors }} | {{ field.errors }} | ||||||
|  |  | ||||||
|  | @ -2,7 +2,7 @@ | ||||||
| {% load lca2017_tags %} | {% load lca2017_tags %} | ||||||
| 
 | 
 | ||||||
|     <h4>{% trans "Submitted by" %}</h4> |     <h4>{% trans "Submitted by" %}</h4> | ||||||
|     <p>{{ proposal.speaker }}</p> |     <p>{{ proposal.speaker }} <{{ proposal.speaker.email }}></p> | ||||||
| 
 | 
 | ||||||
|     <h4>{% trans "Proposal Type" %}</h4> |     <h4>{% trans "Proposal Type" %}</h4> | ||||||
|     <p>{{ proposal.kind.name|capfirst }}</p> |     <p>{{ proposal.kind.name|capfirst }}</p> | ||||||
|  |  | ||||||
		Loading…
	
	Add table
		
		Reference in a new issue
	
	 Christopher Neugebauer
						Christopher Neugebauer