-
Notifications
You must be signed in to change notification settings - Fork 690
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #5629 from freedomofpress/4280-set-org-name
Adds option to set and use an organization name
- Loading branch information
Showing
23 changed files
with
496 additions
and
55 deletions.
There are no files selected for viewing
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
32 changes: 32 additions & 0 deletions
32
securedrop/alembic/versions/92fba0be98e9_added_organization_name_field_in_.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 @@ | ||
"""Added organization_name field in instance_config table | ||
Revision ID: 92fba0be98e9 | ||
Revises: 48a75abc0121 | ||
Create Date: 2020-11-15 19:36:20.351993 | ||
""" | ||
from alembic import op | ||
import sqlalchemy as sa | ||
|
||
|
||
# revision identifiers, used by Alembic. | ||
revision = '92fba0be98e9' | ||
down_revision = '48a75abc0121' | ||
branch_labels = None | ||
depends_on = None | ||
|
||
|
||
def upgrade(): | ||
# ### commands auto generated by Alembic - please adjust! ### | ||
with op.batch_alter_table('instance_config', schema=None) as batch_op: | ||
batch_op.add_column(sa.Column('organization_name', sa.String(length=255), nullable=True)) | ||
|
||
# ### end Alembic commands ### | ||
|
||
|
||
def downgrade(): | ||
# ### commands auto generated by Alembic - please adjust! ### | ||
with op.batch_alter_table('instance_config', schema=None) as batch_op: | ||
batch_op.drop_column('organization_name') | ||
|
||
# ### end Alembic commands ### |
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
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
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
This file was deleted.
Oops, something went wrong.
19 changes: 19 additions & 0 deletions
19
securedrop/journalist_templates/preferences_saved_flash.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,19 @@ | ||
{% if prefs_filter is defined and prefs_filter|length %} | ||
{% with messages = get_flashed_messages(with_categories=True, category_filter=prefs_filter) %} | ||
{% for category, message in messages %} | ||
{# Get the end of the of the category message which | ||
contains the category status.(success/error/notification)#} | ||
{% set category_status = category.split('-')|last %} | ||
<div class="flash {{ category_status }}"> | ||
{% if category_status == "success" %} | ||
<img src="{{ url_for('static', filename='i/success_checkmark.png') }}" height="17" width="20"> | ||
{% elif category_status == "error" %} | ||
<img src="{{ url_for('static', filename='i/font-awesome/exclamation-triangle-black.png') }}" height="17" width="20"> | ||
{% elif category_status == "notification" %} | ||
<img src="{{ url_for('static', filename='i/font-awesome/info-circle-black.png') }}" height="16" width="20"> | ||
{% endif %} | ||
{{ message }} | ||
</div> | ||
{% endfor %} | ||
{% endwith %} | ||
{% endif %} |
11 changes: 0 additions & 11 deletions
11
securedrop/journalist_templates/submission_preferences_saved_flash.html
This file was deleted.
Oops, something went wrong.
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
Oops, something went wrong.