'Add an honor code field to a form description.
Arguments:
form_desc: A form description
Keyword Arguments:
required (bool): Whether this field is required; defaults to True'

def _add_honor_code_field(self, form_desc, required=True):

    if self._is_field_visible('terms_of_service'):
        terms_label = _(u'Honor    Code')
        terms_link = marketing_link('HONOR')
        terms_text = _(u'Review    the    Honor    Code')
    else:
        terms_label = _(u'Terms    of    Service    and    Honor    Code')
        terms_link = marketing_link('HONOR')
        terms_text = _(u'Review    the    Terms    of    Service    and    Honor    Code')
    label = _(u'I    agree    to    the    {platform_name}    {terms_of_service}').format(platform_name=configuration_helpers.get_value('PLATFORM_NAME', settings.PLATFORM_NAME), terms_of_service=terms_label)
    error_msg = _(u'You    must    agree    to    the    {platform_name}    {terms_of_service}').format(platform_name=configuration_helpers.get_value('PLATFORM_NAME', settings.PLATFORM_NAME), terms_of_service=terms_label)
    form_desc.add_field('honor_code', label=label, field_type='checkbox', default=False, required=required, error_messages={'required': error_msg}, supplementalLink=terms_link, supplementalText=terms_text)
