{% extends 'base_software.html' %} {% from 'host/common.html' import edit_field %} {% from 'host/common.html' import alert_duplicate %} {% if request.endpoint.endswith('edit') %} {% set isEdit = True %} {% else %} {% set isEdit = False %} {% endif %} {% block head %} {% endblock %} {% block main %}
{% if isEdit %}Edit User{% else %}Create User{% endif %} {{ alert_duplicate(form.username.data, duplicate_error) }} {% if isEdit %} {% set extra_field =' ' %} {{ edit_field(form.username, readonly=True, field_width="col-sm-6", maxlength=100, class="form-control", extra_field=extra_field ) }} {% else %} {{ edit_field(form.username, field_width="col-sm-6", maxlength=100, class="form-control") }} {% endif %}
{% if isEdit %} {{ edit_field(form.password, autocomplete="off", field_width="col-sm-6", maxlength=100, class="form-control", placeholder="Use Password on File") }} {% else %} {{ edit_field(form.password, autocomplete="off", field_width="col-sm-6", maxlength=100, class="form-control") }} {% endif %}
{{ edit_field(form.privilege, class="form-control") }}
Information {{ edit_field(form.fullname, class="form-control") }} {{ edit_field(form.email, class="form-control") }}
{% endblock %}