-
Notifications
You must be signed in to change notification settings - Fork 20
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
#1281 wip draftPlan.users.extend(managers)
- Loading branch information
1 parent
73b2169
commit 6ce6447
Showing
6 changed files
with
128 additions
and
3 deletions.
There are no files selected for viewing
32 changes: 32 additions & 0 deletions
32
migrations/versions/c4c7bbe1acdc_feature_can_assign_users_to_plans_.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
"""feature_can_assign_users_to_plans settings | ||
Revision ID: c4c7bbe1acdc | ||
Revises: ac23e0d75b27 | ||
Create Date: 2024-02-26 09:06:42.508631 | ||
""" | ||
from alembic import op | ||
import sqlalchemy as sa | ||
|
||
|
||
# revision identifiers, used by Alembic. | ||
revision = "c4c7bbe1acdc" | ||
down_revision = "ac23e0d75b27" | ||
branch_labels = None | ||
depends_on = None | ||
|
||
|
||
def upgrade(): | ||
with op.batch_alter_table("setting", schema=None) as batch_op: | ||
batch_op.add_column( | ||
sa.Column( | ||
"feature_can_assign_users_to_plans", | ||
sa.Boolean(), | ||
nullable=True, | ||
default=False, | ||
) | ||
) | ||
|
||
|
||
def downgrade(): | ||
pass |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
54 changes: 54 additions & 0 deletions
54
...ueprints/admin/templates/admin/settings/feature_assign_users_to_plans_enable_disable.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
{% extends "admin/layout.html" %} | ||
{% block title %} {{ _('Assign Manager(s) to plans feature enable/disable') }} {% endblock %} | ||
|
||
{% block body %} | ||
|
||
<h2 class="text-center text-dark mb-3">{{ _('Assign Manager(s) to plans feature enable/disable') }}</h2> | ||
|
||
<div class="container"> | ||
<ul class="breadcrumb"> | ||
<li class="breadcrumb-item"><a href="/">Shop</a></li> | ||
<li class="breadcrumb-item"><a href="{{ url_for('admin.dashboard') }}">Manage My Shop</a></li> | ||
<li class="breadcrumb-item active" aria-current="page">{{ _('Assign Manager(s) to plans feature enable/disable') }}</li> | ||
</ul> | ||
</div> | ||
|
||
<main> | ||
<div class="section"> | ||
<div class="container"> | ||
|
||
<div class="row row-cols-1 row-cols-md-2"> | ||
<div class="col-md-7"> | ||
<h2>{{ _('Assign Manager(s) to plans feature') }}</h2> | ||
<p>{{ _('Enable this feature to allow you to assign admins to manage plans. If you have a lot of plans/subscribers, this makes it easier to divide the work of managing groups of subscribers. This is especially useful for large clubs and membership organisations where you might not know all of the subscribers in your organisaton, but other coworkers know and manage them.') }}</p> | ||
|
||
<form action="" method="POST" action="/"> | ||
<div class="form-group"> | ||
<div class="form-check"> | ||
<input class="form-check-input" type="radio" name="feature_can_assign_users_to_plans" value="1" id="yes" {% if settings.feature_can_assign_users_to_plans is sameas True %}checked {% endif %}> | ||
<label class="form-check-label" for="yes"> | ||
{{ _('Enable') }} | ||
</label> | ||
</div> | ||
<br /> | ||
<div class="form-check"> | ||
<input class="form-check-input" type="radio" name="feature_can_assign_users_to_plans" value="0" id="no" {% if settings.feature_can_assign_users_to_plans is sameas False %}checked {% endif %}> | ||
<label class="form-check-label" for="no"> | ||
{{ _('Disable') }} | ||
</label> | ||
</div> | ||
</div> | ||
<br /> | ||
<button type="submit" class="btn btn-primary btn-block mb-3">{{ _('Save') }}</button> | ||
</form> | ||
</div> | ||
|
||
</div> | ||
|
||
</div> <!-- end container--> | ||
</div> <!-- end section--> | ||
</main> | ||
|
||
|
||
|
||
{% endblock %} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters