Browse Source
			
			
			
			
				
		* reset managing org for sheme * only display schemes with managing org id * only display relevant answers in show scheme page * tests * check arrangement type from saved scheme if incoming params for it is nil * don't override managing org id if it's coming through as nil * convert to use values that won't change for checks * Revert "convert to use values that won't change for checks" because the value coming through from the params is the value and not a key This reverts commit 50053ec0cf233e3a6c36db9af2528c354d3d60e7. * Test * check constant values * Add test case for controller, check if the scheme is confirmed before displaying * validate all the required scheme questions are answered * fix ui * fix test * Add test, change error message wording * Display error message next to the relevant field * update context and query * lint Co-authored-by: Dushan Despotovic <dushan@madetech.com>pull/782/head
				 15 changed files with 210 additions and 144 deletions
			
			
		@ -0,0 +1,4 @@ | 
				
			|||||||
 | 
					.app-summary-list__value--error { | 
				
			||||||
 | 
					  border-left: $govuk-border-width solid $govuk-error-colour; | 
				
			||||||
 | 
					  padding-left: govuk-spacing(3); | 
				
			||||||
 | 
					} | 
				
			||||||
@ -0,0 +1,22 @@ | 
				
			|||||||
 | 
					<div class="<%= "govuk-summary-list__row #{scheme.confirmed? && attribute[:name] != 'Name' ? 'govuk-summary-list__row--no-actions' : ''}" %>"> | 
				
			||||||
 | 
					    <dt class="govuk-summary-list__key"> | 
				
			||||||
 | 
					        <%= attribute[:name].to_s %> | 
				
			||||||
 | 
					    </dt> | 
				
			||||||
 | 
					    <% if scheme.errors[attribute[:id].to_sym].count > 0 %> | 
				
			||||||
 | 
					        <dd class="govuk-summary-list__value app-summary-list__value--error"> | 
				
			||||||
 | 
					            <p class="govuk-error-message"> | 
				
			||||||
 | 
					                <span class="govuk-error-message govuk-visually-hidden">Error:</span> <%= scheme.errors[attribute[:id].to_sym][0] %> | 
				
			||||||
 | 
					            </p> | 
				
			||||||
 | 
					            <%= details_html(attribute) %> | 
				
			||||||
 | 
					        </dd> | 
				
			||||||
 | 
					    <% else %> | 
				
			||||||
 | 
					        <dd class="govuk-summary-list__value"> | 
				
			||||||
 | 
					            <%= details_html(attribute) %> | 
				
			||||||
 | 
					        </dd> | 
				
			||||||
 | 
					    <% end %> | 
				
			||||||
 | 
					    <% if !scheme.confirmed? || attribute[:name] == "Name" %> | 
				
			||||||
 | 
					        <dd class="govuk-summary-list__actions"> | 
				
			||||||
 | 
					            <a class="govuk-link" href="<%= change_link %>">Change</a> | 
				
			||||||
 | 
					        </dd> | 
				
			||||||
 | 
					    <% end %> | 
				
			||||||
 | 
					</div> | 
				
			||||||
					Loading…
					
					
				
		Reference in new issue