Add files via upload

This commit is contained in:
Harold Finch
2023-04-10 07:23:44 +02:00
committed by GitHub
parent 047f85e92d
commit ae35dc5986
56 changed files with 11982 additions and 0 deletions

View File

@@ -0,0 +1,74 @@
{% extends "layout_user.html" %}
{% from "macros/form_inputs.html" import
input_csrf_token
with context
%}
{% from "macros/general.html" import
display_subnav,
highlight_username_in_mail,
display_filter_by_first_char,
display_list_access_policy_name,
show_pages
with context
%}
{% from "macros/sql.html" import
display_mls
with context
%}
{% from "macros/msg_handlers.html" import maillist_msg_handler with context %}
{% block title %}{{ _('Mailing Lists') }}{% endblock %}
{% block navlinks_manageml %}class="active"{% endblock %}
{% block main %}
{# Show system message #}
{{ maillist_msg_handler(msg) }}
{% if maillists %}
{{ display_filter_by_first_char(baseurl=ctx.homepath + '/self-service/mls',
account_type="managed_ml",
available_chars=all_first_chars,
first_char=first_char,
disabled_only=False) }}
{% endif %}
<div class="content-box">
<div class="box-body">
<div class="box-header clear">
<h2>
{{ _('Managed mailing lists.') }}
{% if total > 0 %}
({{ (cur_page-1) * page_size_limit + 1 }}-{{ (cur_page-1) * page_size_limit + (maillists |length) }}/{{total}})
{% endif %}
</h2>
</div>
{# List all mailing lists. #}
<form name="maillists" id="list_table" action="{{ctx.homepath}}/self-service/mls" method="post">
{{ input_csrf_token() }}
{{ display_mls(maillists=maillists,
profile_base_url=ctx.homepath + "/self-service/ml/profile",
domain=None) }}
{% if maillists %}
<div class="tab-footer clear f1">
{% set baseurl = ctx.homepath + '/self-service/mls' %}
{% set url_suffix = '' %}
{% if first_char %}
{% set url_suffix = '?starts_with=' + first_char %}
{% endif %}
{{ show_pages(baseurl=baseurl, total=total, cur_page=cur_page, url_suffix=url_suffix) }}
</div>
{% endif %}
</form>
</div>{# -- box-body -- #}
</div>{# -- content-body -- #}
{% endblock main %}

View File

@@ -0,0 +1,127 @@
{% extends "layout_user.html" %}
{% from "macros/form_inputs.html" import
input_submit,
input_csrf_token
with context
%}
{% from "macros/general.html" import
display_subnav,
display_input_cn,
with context
%}
{% from "macros/mlmmj.html" import
display_maillist_basic_profile,
display_modal_add_subscribers,
display_maillist_subscribers,
display_modal_newsletter_html_code,
display_maillist_newsletter_profile
with context
%}
{% from "macros/msg_handlers.html" import maillist_msg_handler with context %}
{% block title %}{{ _('Edit account profile') }}{% endblock %}
{% block navlinks_manageml %}class="active"{% endblock %}
{% block main %}
{# Show system message #}
{{ maillist_msg_handler(msg) }}
{% set navlinks = [
('general', _('General'), [true]),
('members', _('Members'), [true]),
('newsletter', _('Newsletter'), [true]),
]
%}
{# modal window used to add subscriber #}
{% set form_post_url = ctx.homepath + "/self-service/ml/profile/add_subscribers/" + mail %}
{{ display_modal_add_subscribers(form_post_url=form_post_url) }}
{% if profile.mlid %}
{{ display_modal_newsletter_html_code(mlid=profile.mlid) }}
{% endif %}
<div class="content-box">
<div class="box-body">
<div class="box-header clear">
<h2>{{ _('Profile of mailing list:') }} {{ mail }} ({{ subscribers | length }} {{ _('Members') }})</h2>
<ul class="tabs clear">
{% for nav in navlinks %}
{% if not false in nav[2] and not none in nav[2] %}
<li><a href="#profile_{{ nav[0] }}">{{ nav[1] }}</a></li>
{% endif %}
{% endfor %}
</ul>
</div>{# -- box-header -- #}
<div class="box-wrap clear">
<div id="profile_general">
<form name="general" method="post" action="{{ctx.homepath}}/self-service/ml/profile/general/{{mail}}">
{{ input_csrf_token() }}
<div class="columns clear">
<div class="col2-3 clear">
{{ display_input_cn(value=profile.name, input_name='name') }}
</div>
<div class="col1-3 lastcol">
{% if profile.active %}
<div class="mark_blue bt-space10">
<p class="bt-space"><i class="fa fa-plus fa-lg"></i> <a href="#add_subscribers" class="modal-link"><span class="text">{{ _('Add new members') }}</span></a></p>
</div>
{% else %}
<div class="notification note-attention">
<p class="bt-space"> {{ _('To add new members, please enable mailing list account first.') }}</p>
</div>
{% endif %}
</div>
</div>
<div class="columns clear">
{{ display_maillist_basic_profile(profile=profile, access_policy=profile.accesspolicy, mail=mail) }}
</div>
{{ input_submit() }}
</form>
</div>{# #profile_general #}
{#
# Members
#}
<div id="profile_members" style="margin-left: -10px; margin-right: -10px; margin-bottom: -10px;">
<form name="members" method="post" action="{{ctx.homepath}}/self-service/ml/profile/members/{{mail}}">
{{ input_csrf_token() }}
{{ display_maillist_subscribers(mail=mail, subscribers=subscribers, account_is_enabled=profile.active) }}
</form>
</div>{# #profile_general #}
<div id="profile_newsletter">
<form name="newsletter" method="post" action="{{ctx.homepath}}/self-service/ml/profile/newsletter/{{mail}}">
{{ input_csrf_token() }}
{{ display_maillist_newsletter_profile(is_newsletter=profile.is_newsletter,
description=profile.description) }}
{{ input_submit() }}
</form>
</div>{# #profile_newsletter #}
</div>{#-- .box-wrap --#}
</div>{#-- .box-body --#}
</div>{#-- .content-box --#}
{% endblock main %}
{% block extra_js %}
<script type="text/javascript">
$(document).ready(function(){
$(".tabs li").idTabs("profile_{{ profile_type }}");
$('#subscriber_search').quickfilter('#subscribers_tbody tr');
});
</script>
{% endblock extra_js %}

View File

@@ -0,0 +1,138 @@
{% extends "layout_user.html" %}
{% from "macros/form_inputs.html" import
input_submit,
input_csrf_token
with context
%}
{% from "macros/general.html" import
display_subnav,
set_account_activity_img,
display_progress_bar,
display_input_cn,
display_preferred_language,
display_timezones,
display_account_status,
display_reset_password,
display_random_password,
display_user_forwarding
with context
%}
{% from "macros/msg_handlers.html" import user_msg_handler with context %}
{% block title %}{{ _('Preferences') }}{% endblock %}
{% block navlinks_preferences %}class="active"{% endblock %}
{% block main %}
{# Show system message #}
{% if msg %}
{% if msg.startswith('PW_') %}
{% set _pw_errors = msg.split(',') %}
{% for _err in _pw_errors %}
{{ user_msg_handler(_err) }}
{% endfor %}
{% else %}
{{ user_msg_handler(msg) }}
{% endif %}
{% endif %}
{% set navlinks = [('general', _('General'), [true]),
('forwarding', _('Forwarding'), ['forwarding' not in disabled_user_preferences]),
('password', _('Password'), ['password' not in disabled_user_preferences])]
%}
<div class="content-box">
<div class="box-body">
<div class="box-header clear">
<ul class="tabs clear">
{% for nav in navlinks %}
{% if not false in nav[2] and not none in nav[2] %}
<li><a href="#profile_{{nav[0]}}">{{ nav[1] }}</a></li>
{% endif %}
{% endfor %}
</ul>
<h2>{{ _('Preferences') }}</h2>
</div>
<div class="box-wrap clear">
<div id="profile_general">
<form name="profile" method="post" action="{{ctx.homepath}}/preferences/general">
{{ input_csrf_token() }}
<div class="columns clear">
<div class="col2-3">
{% if 'personal_info' not in disabled_user_preferences %}
{{ display_input_cn(value=profile.name) }}
{% endif %}
{{ display_preferred_language(value=profile.get('language'), languagemaps=languagemaps) }}
{{ display_timezones(value=user_settings.get('timezone'), timezones=timezones) }}
</div>
{% if profile.quota %}
<div class="col1-3 lastcol">
<div class="mark_blue bt-space10">
{% set percent = used_quota_bytes |convert_to_percentage(profile.quota |int * 1024 * 1024) %}
<h4>{{ _('Mailbox Quota') }} ({{ profile.quota | file_size_format(base_mb=True) }}, {{ percent }}% {{ _('Used') }})</h4>
{{ display_progress_bar(percent, style='thin', show_zero=true, width='70%') }}
<div>&nbsp;</div>
</div>
</div>
{% endif %}
</div>
{{ input_submit() }}
</form>
</div>
{% if 'forwarding' not in disabled_user_preferences %}
<div id="profile_forwarding">
<form name="profile" method="post" action="{{ctx.homepath}}/preferences/forwarding">
{{ input_csrf_token() }}
<div class="columns clear">
{{ display_user_forwarding(mail=mail,
enabled=profile.alias_active,
forwarding_addresses=profile.forwardings) }}
</div>{#-- .columns --#}
{{ input_submit() }}
</form>
</div>
{% endif %}
{% if 'password' not in disabled_user_preferences %}
<div id="profile_password">
<form name="profile" method="post" action="{{ctx.homepath}}/preferences/password">
{{ input_csrf_token() }}
<div class="columns clear">
<div class="col2-3">
{{ display_reset_password(show_confirmpw=true,
min_passwd_length=min_passwd_length,
max_passwd_length=max_passwd_length,
store_password_in_plain_text=store_password_in_plain_text) }}
</div>
<div class="col1-3 lastcol">
{{ display_random_password(password_length=min_passwd_length,
password_policies=password_policies) }}
</div>
</div>
{{ input_submit() }}
</form>
</div>
{% endif %}
</div>
</div>
</div>
{% endblock main %}
{% block extra_js %}
<script type="text/javascript">
$(document).ready(function() {
$(".tabs li").idTabs("profile_{{ profile_type }}")
});
</script>
{% endblock extra_js %}