{% extends "domain_base.html" %} {% block domain_content %} {% if join_settings != None %}

{{ _('Information') }}

{{ _('User can join this domain by visiting the following URL') }}:

{{ handler.ui_context['url_prefix'] }}{{ reverse_url('domain_join') }}
{% if join_settings['method'] == vj4.constant.domain.JOIN_METHOD_CODE %}

{{ _('Or, with automatically filled invitation code') }}:

{{ handler.ui_context['url_prefix'] }}{{ reverse_url('domain_join') }}?code={{ join_settings['code']|urlencode }}
{% endif %} {% if join_settings['expire'] != None %}
{{ (_('The link will be expired at {0}').format(datetime_span(join_settings['expire'], relative=false)))|safe }}
{% endif %}
{% endif %}

{{ _('Settings') }}

{{ form.form_radio( options=vj4.constant.domain.JOIN_METHOD_RANGE.items(), label='Method', name='method', value=join_settings['method']|default(vj4.constant.domain.JOIN_METHOD_NONE), columns=8) }} {{ form.form_select( options=roles_with_text, label='Role Assignment', name='role', help_text='The role to assign when user joining the domain.', value=join_settings['role']|default('')) }} {{ form.form_select( options=expirations.items(), label='Expire', name='expire', help_text='User will no longer be allowed to join the domain after expiration.' ) }} {{ form.form_text( label='Invitation Code', name='invitation_code', help_text='The invitation code to enter to successfully join the domain. You can only use letters and numbers in the code and it should not be longer than 64 characters.', value=join_settings['code']|default('')) }}
{% endblock %}