Remove profile field editor from manage and add return links.
This commit is contained in:
parent
0998e5d69c
commit
238d454464
6 changed files with 23 additions and 20 deletions
|
@ -194,10 +194,6 @@ switch ($_GET['v'] ?? null) {
|
||||||
$updatePassword->execute();
|
$updatePassword->execute();
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!empty($_POST['profile']) && is_array($_POST['profile'])) {
|
|
||||||
user_profile_fields_set($userId, $_POST['profile']);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (isset($_POST['add_role'])) {
|
if (isset($_POST['add_role'])) {
|
||||||
user_role_add($manageUser['user_id'], $_POST['add_role']['role']);
|
user_role_add($manageUser['user_id'], $_POST['add_role']['role']);
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,9 +1,11 @@
|
||||||
|
{% set in_manage = manage_menu is defined %}
|
||||||
|
|
||||||
<nav class="header">
|
<nav class="header">
|
||||||
<div class="header__wrapper">
|
<div class="header__wrapper">
|
||||||
<div class="header__icons">
|
<div class="header__icons">
|
||||||
<label class="header__icon header__icon--menu" for="toggle-mobile-header-menu"></label>
|
<label class="header__icon header__icon--menu" for="toggle-mobile-header-menu"></label>
|
||||||
|
|
||||||
<a class="header__logo{% if manage_menu is defined %} header__logo--manage{% endif %}" href="/">
|
<a class="header__logo{% if in_manage %} header__logo--manage{% endif %}" href="/">
|
||||||
{{ globals.site_name }}
|
{{ globals.site_name }}
|
||||||
</a>
|
</a>
|
||||||
|
|
||||||
|
@ -70,7 +72,11 @@
|
||||||
</li>
|
</li>
|
||||||
{% if has_manage_access %}
|
{% if has_manage_access %}
|
||||||
<li class="header__user__action">
|
<li class="header__user__action">
|
||||||
|
{% if in_manage %}
|
||||||
|
<a class="header__user__link" href="{{ site_link|default('/') }}">Return</a>
|
||||||
|
{% else %}
|
||||||
<a class="header__user__link" href="{{ manage_link|default('/manage/index.php') }}">Manage</a>
|
<a class="header__user__link" href="{{ manage_link|default('/manage/index.php') }}">Manage</a>
|
||||||
|
{% endif %}
|
||||||
</li>
|
</li>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
<li class="header__user__action">
|
<li class="header__user__action">
|
||||||
|
|
|
@ -1,5 +1,9 @@
|
||||||
{% extends 'manage/changelog/master.twig' %}
|
{% extends 'manage/changelog/master.twig' %}
|
||||||
|
|
||||||
|
{% if edit_change is defined %}
|
||||||
|
{% set site_link = '/changelog.php?c=' ~ edit_change.change_id %}
|
||||||
|
{% endif %}
|
||||||
|
|
||||||
{% block manage_content %}
|
{% block manage_content %}
|
||||||
<div class="container">
|
<div class="container">
|
||||||
<form action="?v=change{{ edit_change is defined ? '&c=' ~ edit_change.change_id : '' }}" method="post">
|
<form action="?v=change{{ edit_change is defined ? '&c=' ~ edit_change.change_id : '' }}" method="post">
|
||||||
|
|
|
@ -1 +1,5 @@
|
||||||
{% extends 'manage/master.twig' %}
|
{% extends 'manage/master.twig' %}
|
||||||
|
|
||||||
|
{% if site_link is not defined %}
|
||||||
|
{% set site_link = '/changelog.php' %}
|
||||||
|
{% endif %}
|
||||||
|
|
|
@ -1 +1,5 @@
|
||||||
{% extends 'manage/master.twig' %}
|
{% extends 'manage/master.twig' %}
|
||||||
|
|
||||||
|
{% if site_link is not defined %}
|
||||||
|
{% set site_link = '/members.php' %}
|
||||||
|
{% endif %}
|
||||||
|
|
|
@ -1,6 +1,8 @@
|
||||||
{% extends 'manage/users/master.twig' %}
|
{% extends 'manage/users/master.twig' %}
|
||||||
{% from 'manage/macros.twig' import permissions_table %}
|
{% from 'manage/macros.twig' import permissions_table %}
|
||||||
|
|
||||||
|
{% set site_link = '/profile.php?u=' ~ view_user.user_id %}
|
||||||
|
|
||||||
{% block manage_content %}
|
{% block manage_content %}
|
||||||
{% if can_manage_users %}
|
{% if can_manage_users %}
|
||||||
<form method="post" enctype="multipart/form-data" action="">
|
<form method="post" enctype="multipart/form-data" action="">
|
||||||
|
@ -102,19 +104,6 @@
|
||||||
</label>
|
</label>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="container">
|
|
||||||
<div class="container__title">Profile fields</div>
|
|
||||||
|
|
||||||
{% for name, props in profile_fields %}
|
|
||||||
<label class="form__label">
|
|
||||||
<div class="form__label__text">{{ props.name }}</div>
|
|
||||||
<div class="form__label__input">
|
|
||||||
<input class="input__text" type="{{ props.type|default('text') }}" value="{{ view_user['user_' ~ name] }}" name="profile[{{ name }}]">
|
|
||||||
</div>
|
|
||||||
</label>
|
|
||||||
{% endfor %}
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="container">
|
<div class="container">
|
||||||
<div class="container__title">Colour</div>
|
<div class="container__title">Colour</div>
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue