Updated to latest Index as well as some minor bug fixes.

This commit is contained in:
flash 2025-03-24 00:20:41 +00:00 committed by flash
parent ad89d45cf0
commit 5ba8b30047
77 changed files with 900 additions and 937 deletions

View file

@ -7,7 +7,7 @@
{% block content %}
<form class="container auth__container auth__login js-login-form" method="post" action="{{ url('auth-login') }}">
{{ input_csrf() }}
{{ input_hidden('login[redirect]', login_redirect) }}
{{ input_hidden('redirect', login_redirect) }}
<div class="container__title">
<div class="container__title__background"></div>
@ -45,7 +45,7 @@
Username
</div>
<div class="auth__label__value">
{{ input_text('login[username]', 'auth__label__input js-login-username', login_username, 'text', '', true, null, 1, not login_welcome) }}
{{ input_text('username', 'auth__label__input js-login-username', login_username, 'text', '', true, null, 1, not login_welcome) }}
</div>
</label>
@ -57,7 +57,7 @@
{% endif %}
</div>
<div class="auth__label__value">
{{ input_text('login[password]', 'auth__label__input', '', 'password', '', true, null, 2, login_welcome) }}
{{ input_text('password', 'auth__label__input', '', 'password', '', true, null, 2, login_welcome) }}
</div>
</label>

View file

@ -24,7 +24,7 @@
E-mail
</div>
<div class="auth__label__value">
{{ input_text('forgot[email]', 'auth__label__input', password_email, 'text', '', true, null, 1) }}
{{ input_text('email', 'auth__label__input', password_email, 'text', '', true, null, 1) }}
</div>
</label>

View file

@ -8,7 +8,7 @@
<form class="container auth__container auth__password" method="post" action="{{ url('auth-reset') }}">
{{ container_title('<i class="fas fa-user-lock fa-fw"></i> Resetting password for ' ~ password_user.name) }}
{{ input_hidden('reset[user]', password_user.id) }}
{{ input_hidden('user', password_user.id) }}
{{ input_csrf() }}
{% if password_notices|length > 0 %}
@ -28,14 +28,14 @@
{% endif %}
{% if password_verification|length == 12 %}
{{ input_hidden('reset[verification]', password_verification) }}
{{ input_hidden('verification', password_verification) }}
{% else %}
<label class="auth__label">
<div class="auth__label__text">
Verification Code
</div>
<div class="auth__label__value">
{{ input_text('reset[verification]', 'input__text--monospace auth__label__input', '', 'text', '', true, {'maxlength':12}, 1) }}
{{ input_text('verification', 'input__text--monospace auth__label__input', '', 'text', '', true, {'maxlength':12}, 1) }}
</div>
</label>
{% endif %}
@ -45,7 +45,7 @@
New Password
</div>
<div class="auth__label__value">
{{ input_text('reset[password][new]', 'auth__label__input', '', 'password', '', true, null, 2) }}
{{ input_text('password_new', 'auth__label__input', '', 'password', '', true, null, 2) }}
</div>
</label>
@ -54,7 +54,7 @@
Confirm Password
</div>
<div class="auth__label__value">
{{ input_text('reset[password][confirm]', 'auth__label__input', '', 'password', '', true, null, 3) }}
{{ input_text('password_confirm', 'auth__label__input', '', 'password', '', true, null, 3) }}
</div>
</label>

View file

@ -55,7 +55,7 @@
Username
</div>
<div class="auth__label__value">
{{ input_text('register[username]', 'auth__label__input', register_username, 'text', '', true, null, 10, true) }}
{{ input_text('username', 'auth__label__input', register_username, 'text', '', true, null, 10, true) }}
</div>
</label>
@ -64,7 +64,7 @@
Password
</div>
<div class="auth__label__value">
{{ input_text('register[password]', 'auth__label__input', '', 'password', '', true, null, 20) }}
{{ input_text('password', 'auth__label__input', '', 'password', '', true, null, 20) }}
</div>
</label>
@ -73,7 +73,7 @@
Confirm Password
</div>
<div class="auth__label__value">
{{ input_text('register[password_confirm]', 'auth__label__input', '', 'password', '', true, null, 30) }}
{{ input_text('password_confirm', 'auth__label__input', '', 'password', '', true, null, 30) }}
</div>
</label>
@ -82,7 +82,7 @@
E-mail
</div>
<div class="auth__label__value">
{{ input_text('register[email]', 'auth__label__input', register_email, 'text', '', true, null, 40) }}
{{ input_text('email', 'auth__label__input', register_email, 'text', '', true, null, 40) }}
</div>
</label>
@ -91,7 +91,7 @@
What is the outcome of nine plus ten?
</div>
<div class="auth__label__value">
{{ input_text('register[question]', 'auth__label__input', '', 'text', '', true, null, 50) }}
{{ input_text('question', 'auth__label__input', '', 'text', '', true, null, 50) }}
</div>
</label>

View file

@ -9,8 +9,8 @@
{{ container_title('<i class="fas fa-user-shield fa-fw"></i> Two Factor Authentication') }}
{{ input_csrf() }}
{{ input_hidden('twofactor[redirect]', twofactor_redirect) }}
{{ input_hidden('twofactor[token]', twofactor_token) }}
{{ input_hidden('redirect', twofactor_redirect) }}
{{ input_hidden('token', twofactor_token) }}
{% if twofactor_notices|length > 0 %}
<div class="warning auth__warning">
@ -27,7 +27,7 @@
Code
</div>
<div class="auth__label__value">
{{ input_text('twofactor[code]', 'input__text--monospace input__text--centre auth__label__input', '', 'text', '', true, {'maxlength': 6, 'inputmode': 'numeric'}, 1) }}
{{ input_text('code', 'input__text--monospace input__text--centre auth__label__input', '', 'text', '', true, {'maxlength': 6, 'inputmode': 'numeric'}, 1) }}
</div>
</label>

View file

@ -8,15 +8,15 @@
{% set is_opening = not is_reply or posting_post.isOriginalPost|default(false) %}
{% block content %}
<form method="post" action="{{ url('forum-' ~ (is_reply ? 'post' : 'topic') ~ '-create') }}" class="js-forum-posting">
{{ input_hidden('post[' ~ (is_reply ? 'topic' : 'forum') ~ ']', is_reply ? posting_topic.id : posting_forum.id) }}
{{ input_hidden('post[mode]', posting_mode) }}
<form method="post" action="{{ url('forum-' ~ (is_reply ? 'post' : 'topic') ~ '-create') }}" class="js-forum-posting" enctype="multipart/form-data">
{{ input_hidden((is_reply ? 'topic' : 'forum'), is_reply ? posting_topic.id : posting_forum.id) }}
{{ input_hidden('mode', posting_mode) }}
{{ input_csrf() }}
{{ forum_header(
is_reply and not is_opening
? posting_topic.title
: input_text(
'post[title]',
'title',
'forum__header__input',
posting_defaults.title|default(posting_topic.title|default('')),
'text',
@ -30,7 +30,7 @@
) }}
{% if posting_post is defined %}
{{ input_hidden('post[id]', posting_post.info.id) }}
{{ input_hidden('id', posting_post.info.id) }}
{% endif %}
{% if posting_notices|length > 0 %}
@ -74,25 +74,25 @@
{% endif %}
</span>
</div>
<textarea name="post[text]" class="forum__post__text forum__post__text--edit js-forum-posting-text js-ctrl-enter-submit" placeholder="Type your post content here...">{{ posting_defaults.text|default(posting_post.info.body|default('')) }}</textarea>
<textarea name="text" class="forum__post__text forum__post__text--edit js-forum-posting-text js-ctrl-enter-submit" placeholder="Type your post content here...">{{ posting_defaults.text|default(posting_post.info.body|default('')) }}</textarea>
<div class="forum__post__text js-forum-posting-preview" hidden></div>
<div class="forum__post__actions js-forum-posting-actions"></div>
<div class="forum__post__options">
<div class="forum__post__settings">
{{ input_select(
'post[parser]', parser_options(),
'parser', parser_options(),
posting_defaults.parser|default(posting_post.info.bodyFormat|default(posting_user_preferred_parser)).value,
null, null, false, 'forum__post__dropdown js-forum-posting-parser'
) }}
{% if is_opening and posting_types|length > 1 %}
<select class="input__select forum__post__dropdown" name="post[type]">
<select class="input__select forum__post__dropdown" name="type">
{% for type_name, type_title in posting_types %}
<option value="{{ type_name }}"{% if type_name == posting_topic.typeString|default('discussion') %} selected{% endif %}>{{ type_title }}</option>
{% endfor %}
</select>
{% endif %}
{{ input_checkbox(
'post[signature]',
'signature',
'Display Signature',
posting_defaults.signature is not null
? posting_defaults.signature : (

View file

@ -6,7 +6,7 @@
<div class="container">
{{ container_title('<i class="fas fa-ban fa-fw"></i> Issuing a ban on user #' ~ ban_user.id ~ ' ' ~ ban_user.name) }}
<form method="post" enctype="multipart/form-data" action="{{ url('manage-users-ban', {'user': ban_user.id}) }}" class="manage__ban">
<form method="post" action="{{ url('manage-users-ban', {'user': ban_user.id}) }}" class="manage__ban">
{{ input_csrf() }}
<div class="manage__ban__field">

View file

@ -6,7 +6,7 @@
<div class="container">
{{ container_title('<i class="fas fa-sticky-note fa-fw"></i> ' ~ (note_new ? ('Adding mod note to ' ~ note_user.name) : ('Editing mod note #' ~ note_info.id))) }}
<form method="post" enctype="multipart/form-data" action="{{ url('manage-users-note', note_new ? {'user': note_user.id} : {'note': note_info.id}) }}" class="manage__note {{ note_new ? 'manage__note--edit' : 'manage__note--view' }}">
<form method="post" action="{{ url('manage-users-note', note_new ? {'user': note_user.id} : {'note': note_info.id}) }}" class="manage__note {{ note_new ? 'manage__note--edit' : 'manage__note--view' }}">
{{ input_csrf() }}
<div class="manage__note__header">

View file

@ -6,7 +6,7 @@
<div class="container">
{{ container_title('<i class="fas fa-exclamation-circle fa-fw"></i> Issuing a warning to user #' ~ warn_user.id ~ ' ' ~ warn_user.name) }}
<form method="post" enctype="multipart/form-data" action="{{ url('manage-users-warning', {'user': warn_user.id}) }}" class="manage__warning">
<form method="post" action="{{ url('manage-users-warning', {'user': warn_user.id}) }}" class="manage__warning">
{{ input_csrf() }}
<div class="manage__warning__field">

View file

@ -16,7 +16,7 @@
Select
</label>
{{ input_checkbox_raw('avatar[delete]', false, 'profile__header__avatar__check', '', false, {'id':'avatar-delete'}) }}
{{ input_checkbox_raw('avatar_delete', false, 'profile__header__avatar__check', null, false, {'id':'avatar-delete'}) }}
<label class="input__button profile__header__avatar__option profile__header__avatar__option--delete"
for="avatar-delete">
Remove

View file

@ -15,7 +15,7 @@
{{ input_csrf() }}
{% if perms.edit_avatar %}
{{ input_file_raw('avatar[file]', 'profile__hidden', ['image/png', 'image/jpeg', 'image/gif'], {'id':'avatar-selection'}) }}
{{ input_file_raw('avatar_file', 'profile__hidden', ['image/png', 'image/jpeg', 'image/gif'], {'id':'avatar-selection'}) }}
<script>
function updateAvatarPreview(name, url, preview) {
@ -120,7 +120,7 @@
</div>
{% if profile_is_editing %}
{{ input_text('profile[' ~ fieldInfo.name ~ ']', 'profile__accounts__input', profile_fields_raw_values[fieldInfo.name]|default('')) }}
{{ input_text('profile_' ~ fieldInfo.name, 'profile__accounts__input', profile_fields_raw_values[fieldInfo.name]|default('')) }}
{% else %}
<div class="profile__accounts__value">
{% if profile_fields_link_values[fieldInfo.name] is defined %}
@ -212,14 +212,14 @@
<div class="profile__birthdate__title">
Day
</div>
{{ input_select('birthdate[day]', ['-']|merge(range(1, 31)), birthdate_info.day|default(0), '', '', true, 'profile__birthdate__select profile__birthdate__select--day') }}
{{ input_select('birth_day', ['-']|merge(range(1, 31)), birthdate_info.day|default(0), '', '', true, 'profile__birthdate__select profile__birthdate__select--day') }}
</label>
<label class="profile__birthdate__label">
<div class="profile__birthdate__title">
Month
</div>
{{ input_select('birthdate[month]', ['-']|merge(range(1, 12)), birthdate_info.month|default(0), '', '', true, 'profile__birthdate__select profile__birthdate__select--month') }}
{{ input_select('birth_month', ['-']|merge(range(1, 12)), birthdate_info.month|default(0), '', '', true, 'profile__birthdate__select profile__birthdate__select--month') }}
</label>
</div>
@ -228,7 +228,7 @@
<div class="profile__birthdate__title">
Year (may be left empty)
</div>
{{ input_select('birthdate[year]', ['-']|merge(range(null|date('Y'), null|date('Y') - 100)), birthdate_info.year|default(0), '', '', true, 'profile__birthdate__select profile__birthdate__select--year') }}
{{ input_select('birth_year', ['-']|merge(range(null|date('Y'), null|date('Y') - 100)), birthdate_info.year|default(0), '', '', true, 'profile__birthdate__select profile__birthdate__select--year') }}
</label>
</div>
</div>