Add a "Back" button to the guided_registration stages
"Next" is green, indicating that it's the default path, the way forward. "Back" is available but blue. For extra consistency, the initial "Get ticket" button is now also a btn-success
This commit is contained in:
		
							parent
							
								
									4605ee0d98
								
							
						
					
					
						commit
						e51ad76384
					
				
					 3 changed files with 9 additions and 2 deletions
				
			
		|  | @ -43,7 +43,7 @@ | ||||||
|             </div> |             </div> | ||||||
|             <div class="panel-body"> |             <div class="panel-body"> | ||||||
|               <p>To attend the conference, you must register an attendee profile and purchase your ticket</p> |               <p>To attend the conference, you must register an attendee profile and purchase your ticket</p> | ||||||
|               <a class="btn btn-lg btn-primary" role="button" href="{% url "guided_registration" %}">Get your ticket</a> |               <a class="btn btn-lg btn-success" role="button" href="{% url "guided_registration" %}">Get your ticket</a> | ||||||
|             </div> |             </div> | ||||||
|           </div> |           </div> | ||||||
|         {% else %} |         {% else %} | ||||||
|  |  | ||||||
|  | @ -45,7 +45,10 @@ | ||||||
|     {% endfor %} |     {% endfor %} | ||||||
| 
 | 
 | ||||||
|     <div class="btn-group"> |     <div class="btn-group"> | ||||||
|       <input class="btn btn-primary" type="submit" value="Next Step" /> |       {% if current_step > 1 %} | ||||||
|  |       <a class="btn btn-primary" role="button" href="{{ previous_step }}">Back</a> | ||||||
|  |       {% endif %} | ||||||
|  |       <input class="btn btn-success" type="submit" value="Next Step" /> | ||||||
|     </div> |     </div> | ||||||
|   </form> |   </form> | ||||||
| 
 | 
 | ||||||
|  |  | ||||||
							
								
								
									
										4
									
								
								vendor/registrasion/registrasion/views.py
									
										
									
									
										vendored
									
									
								
							
							
						
						
									
										4
									
								
								vendor/registrasion/registrasion/views.py
									
										
									
									
										vendored
									
									
								
							|  | @ -94,6 +94,7 @@ def guided_registration(request, page_number=None): | ||||||
|             with the following data:: |             with the following data:: | ||||||
| 
 | 
 | ||||||
|                 { |                 { | ||||||
|  |                     "previous_step": int(),  # Previous step | ||||||
|                     "current_step": int(),  # The current step in the |                     "current_step": int(),  # The current step in the | ||||||
|                                             # registration |                                             # registration | ||||||
|                     "sections": sections,   # A list of |                     "sections": sections,   # A list of | ||||||
|  | @ -152,6 +153,8 @@ def guided_registration(request, page_number=None): | ||||||
| 
 | 
 | ||||||
|     page_number = int(page_number) |     page_number = int(page_number) | ||||||
| 
 | 
 | ||||||
|  |     prev_step = page_number - 1 | ||||||
|  | 
 | ||||||
|     next_step = redirect("guided_registration", page_number + 1) |     next_step = redirect("guided_registration", page_number + 1) | ||||||
| 
 | 
 | ||||||
|     with BatchController.batch(request.user): |     with BatchController.batch(request.user): | ||||||
|  | @ -206,6 +209,7 @@ def guided_registration(request, page_number=None): | ||||||
|                 return next_step |                 return next_step | ||||||
| 
 | 
 | ||||||
|     data = { |     data = { | ||||||
|  |         "previous_step": prev_step, | ||||||
|         "current_step": page_number, |         "current_step": page_number, | ||||||
|         "sections": sections, |         "sections": sections, | ||||||
|         "title": title, |         "title": title, | ||||||
|  |  | ||||||
		Loading…
	
	Add table
		
		Reference in a new issue
	
	 James Polley
						James Polley