{% import "github.com/bouncepaw/mycorrhiza/user" %} {% func LoginHTML() %}
{% if user.AuthUsed %}

Login

Use the data you were given by an administrator.

Username
Password

By submitting this form you give this wiki a permission to store cookies in your browser. It lets the engine associate your edits with you. You will stay logged in until you log out.

Cancel
{% else %}

Administrator of this wiki have not configured any authorization method. You can make edits anonymously.

← Go home

{% endif %}
{% endfunc %} {% func LoginErrorHTML(err string) %}
{% switch err %} {% case "unknown username" %}

Unknown username.

{% case "wrong password" %}

Wrong password.

{% default %}

{%s err %}

{% endswitch %}

← Try again

{% endfunc %} {% func LogoutHTML(can bool) %}
{% if can %}

Log out?

Confirm

Cancel

{% else %}

You cannot log out because you are not logged in.

Login

← Home

{% endif %}
{% endfunc %}