@@ -12,7 +12,7 @@ class Forms::WelshTranslationInput < Forms::MarkCompleteInput
1212 attribute :support_phone_cy
1313 attribute :support_url_cy
1414 attribute :support_url_text_cy
15- attribute :declaration_text_cy
15+ attribute :declaration_markdown_cy
1616 attribute :what_happens_next_markdown_cy
1717 attribute :payment_url_cy
1818
@@ -35,8 +35,8 @@ class Forms::WelshTranslationInput < Forms::MarkCompleteInput
3535 validates :support_url_text_cy , presence : true , if : -> { marked_complete? && form_has_support_url? }
3636 validates :support_url_text_cy , length : { maximum : 120 } , if : -> { support_url_text_cy . present? }
3737
38- validates :declaration_text_cy , presence : true , if : -> { marked_complete? && form_has_declaration? }
39- validates :declaration_text_cy , length : { maximum : 2000 } , if : -> { declaration_text_cy . present? }
38+ validates :declaration_markdown_cy , presence : true , if : -> { marked_complete? && form_has_declaration? }
39+ validates :declaration_markdown_cy , length : { maximum : 2000 } , if : -> { declaration_markdown_cy . present? }
4040
4141 validates :what_happens_next_markdown_cy , presence : true , if : -> { marked_complete? && form . what_happens_next_markdown . present? }
4242 validates :what_happens_next_markdown_cy , markdown : { allow_headings : false } , if : -> { what_happens_next_markdown_cy . present? }
@@ -74,8 +74,7 @@ def submit
7474 return false if invalid?
7575
7676 form . name_cy = name_cy
77- form . declaration_text_cy = form_has_declaration? ? declaration_text_cy : nil
78- form . declaration_markdown_cy = form_has_declaration? ? MarkdownConversionService . new ( form . declaration_text_cy ) . to_markdown : nil
77+ form . declaration_markdown_cy = form_has_declaration? ? declaration_markdown_cy : nil
7978 form . payment_url_cy = form_has_payment_url? ? payment_url_cy : nil
8079 form . privacy_policy_url_cy = privacy_policy_url_cy
8180 form . support_email_cy = form_has_support_email? ? support_email_cy : nil
@@ -111,7 +110,7 @@ def assign_form_values
111110 self . support_phone_cy = form . support_phone_cy
112111 self . support_url_cy = form . support_url_cy
113112 self . support_url_text_cy = form . support_url_text_cy
114- self . declaration_text_cy = form . declaration_text_cy
113+ self . declaration_markdown_cy = form . declaration_markdown_cy
115114 self . what_happens_next_markdown_cy = form . what_happens_next_markdown_cy
116115 self . payment_url_cy = form . payment_url_cy
117116
@@ -125,7 +124,7 @@ def assign_form_values
125124 end
126125
127126 def form_has_declaration?
128- form . declaration_text . present?
127+ form . declaration_markdown . present?
129128 end
130129
131130 def form_has_payment_url?
0 commit comments