Refactor to be more DRY

This commit is contained in:
Chris Hill-Scott
2018-05-09 13:22:41 +01:00
parent 220e11ccdd
commit f8546c8611
2 changed files with 9 additions and 15 deletions

View File

@@ -472,6 +472,14 @@ class AgreementInfo:
else:
return 'Cant tell'
@property
def as_jinja_template(self):
if self.crown_status is None:
return 'agreement-choose'
if self.agreement_signed:
return 'agreement-signed'
return 'agreement'
def as_terms_of_use_paragraph(self, **kwargs):
return Markup(self._as_terms_of_use_paragraph(**kwargs))