diff --git a/core/admin/mailu/ui/templates/domain/create.html b/core/admin/mailu/ui/templates/domain/create.html index 7589d8e6..d67e3e89 100644 --- a/core/admin/mailu/ui/templates/domain/create.html +++ b/core/admin/mailu/ui/templates/domain/create.html @@ -13,6 +13,7 @@ {{ macros.form_field(form.max_quota_bytes, step=1000000000, max=50000000000, prepend=''+((form.max_quota_bytes.data//1000000000).__str__() if form.max_quota_bytes.data else '∞')+' GiB', oninput='$("#quota").text(this.value == 0 ? "∞" : this.value/1000000000);') }} + {{ macros.form_field(form.signup_enabled) }} {{ macros.form_field(form.comment) }} {{ macros.form_field(form.submit) }} diff --git a/core/admin/migrations/versions/423155f8fc15_.py b/core/admin/migrations/versions/423155f8fc15_.py new file mode 100644 index 00000000..c14d8488 --- /dev/null +++ b/core/admin/migrations/versions/423155f8fc15_.py @@ -0,0 +1,24 @@ +""" Enable signup per domain + +Revision ID: 423155f8fc15 +Revises: 77aa22ad72e2 +Create Date: 2017-12-02 15:07:40.052320 + +""" + +# revision identifiers, used by Alembic. +revision = '423155f8fc15' +down_revision = '77aa22ad72e2' + +from alembic import op +import sqlalchemy as sa + + +def upgrade(): + with op.batch_alter_table('domain') as batch: + batch.add_column(sa.Column('signup_enabled', sa.Boolean(), nullable=False, server_default=sa.sql.expression.false())) + + +def downgrade(): + with op.batch_alter_table('domain') as batch: + batch.drop_column('signup_enabled')