diff --git a/messages.pot b/messages.pot index 213d042..2d9ec47 100644 --- a/messages.pot +++ b/messages.pot @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: PROJECT VERSION\n" "Report-Msgid-Bugs-To: EMAIL@ADDRESS\n" -"POT-Creation-Date: 2023-09-07 22:40+0200\n" +"POT-Creation-Date: 2023-09-30 11:43+0200\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -206,24 +206,24 @@ msgstr "" msgid "You have received an invitation" msgstr "" -#: project/forms/admin.py:11 project/templates/layout.html:342 +#: project/forms/admin.py:11 project/templates/layout.html:344 #: project/views/root.py:55 msgid "Terms of service" msgstr "" -#: project/forms/admin.py:12 project/templates/layout.html:347 +#: project/forms/admin.py:12 project/templates/layout.html:349 #: project/views/root.py:67 msgid "Legal notice" msgstr "" #: project/forms/admin.py:13 project/templates/_macros.html:1490 -#: project/templates/layout.html:351 +#: project/templates/layout.html:353 #: project/templates/widget/event_suggestion/create.html:204 #: project/views/admin_unit.py:84 project/views/root.py:75 msgid "Contact" msgstr "" -#: project/forms/admin.py:14 project/templates/layout.html:355 +#: project/forms/admin.py:14 project/templates/layout.html:357 #: project/views/root.py:83 msgid "Privacy" msgstr "" @@ -263,7 +263,7 @@ msgstr "" msgid "Delete user" msgstr "" -#: project/forms/admin.py:35 project/forms/admin_unit.py:58 +#: project/forms/admin.py:35 project/forms/admin_unit.py:67 #: project/forms/admin_unit_member.py:12 project/forms/admin_unit_member.py:25 #: project/forms/admin_unit_member.py:30 project/forms/event.py:112 #: project/forms/event_suggestion.py:38 project/forms/organizer.py:33 @@ -324,12 +324,12 @@ msgstr "" #: project/forms/admin.py:76 project/templates/admin/delete_admin_unit.html:6 #: project/templates/admin_unit/request_deletion.html:6 -#: project/templates/admin_unit/update.html:94 +#: project/templates/admin_unit/update.html:113 msgid "Delete organization" msgstr "" -#: project/forms/admin.py:77 project/forms/admin_unit.py:147 -#: project/forms/admin_unit.py:152 project/forms/admin_unit.py:157 +#: project/forms/admin.py:77 project/forms/admin_unit.py:166 +#: project/forms/admin_unit.py:171 project/forms/admin_unit.py:176 #: project/forms/event.py:90 project/forms/event.py:119 #: project/forms/event_place.py:30 project/forms/event_place.py:56 #: project/forms/event_suggestion.py:26 project/forms/oauth2_client.py:66 @@ -368,166 +368,174 @@ msgstr "" msgid "Send newsletter" msgstr "" -#: project/forms/admin_unit.py:15 project/forms/event_place.py:13 +#: project/forms/admin_unit.py:22 project/forms/event_place.py:13 #: project/forms/organizer.py:13 msgid "Street" msgstr "" -#: project/forms/admin_unit.py:18 project/forms/event.py:470 +#: project/forms/admin_unit.py:25 project/forms/event.py:470 #: project/forms/event_date.py:52 project/forms/event_place.py:16 #: project/forms/organizer.py:16 project/forms/planning.py:44 msgid "Postal code" msgstr "" -#: project/forms/admin_unit.py:20 project/forms/event_place.py:18 +#: project/forms/admin_unit.py:28 project/forms/event_place.py:18 #: project/forms/organizer.py:18 msgid "City" msgstr "" -#: project/forms/admin_unit.py:21 project/forms/event_place.py:19 +#: project/forms/admin_unit.py:30 project/forms/event_place.py:19 #: project/forms/organizer.py:19 msgid "State" msgstr "" -#: project/forms/admin_unit.py:23 project/forms/event_place.py:21 +#: project/forms/admin_unit.py:32 project/forms/event_place.py:21 #: project/forms/organizer.py:21 msgid "Latitude" msgstr "" -#: project/forms/admin_unit.py:26 project/forms/event_place.py:24 +#: project/forms/admin_unit.py:35 project/forms/event_place.py:24 #: project/forms/organizer.py:24 msgid "Longitude" msgstr "" -#: project/forms/admin_unit.py:32 +#: project/forms/admin_unit.py:41 msgid "Name of organization" msgstr "" -#: project/forms/admin_unit.py:33 +#: project/forms/admin_unit.py:42 msgid "The full name of the organization" msgstr "" -#: project/forms/admin_unit.py:37 +#: project/forms/admin_unit.py:46 msgid "Short name for organization" msgstr "" -#: project/forms/admin_unit.py:38 +#: project/forms/admin_unit.py:47 msgid "The short name is used to create a unique identifier for your events" msgstr "" -#: project/forms/admin_unit.py:46 project/templates/_macros.html:1692 +#: project/forms/admin_unit.py:55 project/templates/_macros.html:1692 msgid "Short name must contain only letters numbers or underscore" msgstr "" -#: project/forms/admin_unit.py:53 project/forms/event.py:124 +#: project/forms/admin_unit.py:62 project/forms/event.py:124 #: project/forms/event_place.py:34 msgid "Description" msgstr "" -#: project/forms/admin_unit.py:54 +#: project/forms/admin_unit.py:63 msgid "Describe the organization in a few words" msgstr "" -#: project/forms/admin_unit.py:57 project/forms/event.py:111 +#: project/forms/admin_unit.py:66 project/forms/event.py:111 #: project/forms/event.py:129 project/forms/event_place.py:32 #: project/forms/organizer.py:32 project/templates/manage/organizers.html:21 msgid "Link URL" msgstr "" -#: project/forms/admin_unit.py:59 project/forms/event.py:113 +#: project/forms/admin_unit.py:68 project/forms/event.py:113 #: project/forms/event_suggestion.py:31 project/forms/organizer.py:34 #: project/templates/_macros.html:309 #: project/templates/manage/organizers.html:20 msgid "Phone" msgstr "" -#: project/forms/admin_unit.py:60 project/forms/event.py:114 +#: project/forms/admin_unit.py:69 project/forms/event.py:114 #: project/forms/organizer.py:35 project/templates/_macros.html:317 msgid "Fax" msgstr "" -#: project/forms/admin_unit.py:61 project/forms/organizer.py:36 +#: project/forms/admin_unit.py:70 project/forms/organizer.py:36 #: project/templates/manage/organizers.html:22 #: project/templates/manage/organizers.html:47 msgid "Logo" msgstr "" -#: project/forms/admin_unit.py:65 +#: project/forms/admin_unit.py:74 msgid "Allow verification requests" msgstr "" -#: project/forms/admin_unit.py:66 +#: project/forms/admin_unit.py:75 msgid "If set, unverified organizations may ask you for verification." msgstr "" -#: project/forms/admin_unit.py:72 +#: project/forms/admin_unit.py:81 msgid "Verification requests information" msgstr "" -#: project/forms/admin_unit.py:74 +#: project/forms/admin_unit.py:84 msgid "" "This text is shown to unverified organizations to help them decide " "whether they ask you for verification." msgstr "" -#: project/forms/admin_unit.py:90 +#: project/forms/admin_unit.py:89 +msgid "Verification requests postal codes" +msgstr "" + +#: project/forms/admin_unit.py:93 +msgid "Accept verification requests to organizations with these postal codes." +msgstr "" + +#: project/forms/admin_unit.py:109 msgid "Verify new organization" msgstr "" -#: project/forms/admin_unit.py:91 +#: project/forms/admin_unit.py:110 msgid "If set, events of the new organization are publicly visible." msgstr "" -#: project/forms/admin_unit.py:97 project/forms/reference_request.py:86 +#: project/forms/admin_unit.py:116 project/forms/reference_request.py:86 #: project/forms/verification_request.py:86 msgid "Verify reference requests automatically" msgstr "" -#: project/forms/admin_unit.py:98 +#: project/forms/admin_unit.py:117 msgid "" "If set, all upcoming reference requests of the new organization are " "verified automatically." msgstr "" -#: project/forms/admin_unit.py:109 project/templates/admin_unit/create.html:5 +#: project/forms/admin_unit.py:128 project/templates/admin_unit/create.html:5 #: project/templates/admin_unit/create.html:21 #: project/templates/manage/admin_units.html:32 msgid "Create organization" msgstr "" -#: project/forms/admin_unit.py:117 project/forms/admin_unit.py:142 +#: project/forms/admin_unit.py:136 project/forms/admin_unit.py:161 msgid "Update settings" msgstr "" -#: project/forms/admin_unit.py:122 +#: project/forms/admin_unit.py:141 msgid "Font" msgstr "" -#: project/forms/admin_unit.py:125 +#: project/forms/admin_unit.py:144 msgid "Background Color" msgstr "" -#: project/forms/admin_unit.py:131 +#: project/forms/admin_unit.py:150 msgid "Primary Color" msgstr "" -#: project/forms/admin_unit.py:137 +#: project/forms/admin_unit.py:156 msgid "Link Color" msgstr "" -#: project/forms/admin_unit.py:146 project/forms/user.py:17 +#: project/forms/admin_unit.py:165 project/forms/user.py:17 msgid "Request deletion" msgstr "" -#: project/forms/admin_unit.py:151 project/forms/user.py:22 +#: project/forms/admin_unit.py:170 project/forms/user.py:22 #: project/templates/admin_unit/cancel_deletion.html:6 -#: project/templates/admin_unit/update.html:26 +#: project/templates/admin_unit/update.html:44 #: project/templates/manage/events.html:49 project/templates/profile.html:13 #: project/templates/user/cancel_deletion.html:6 msgid "Cancel deletion" msgstr "" -#: project/forms/admin_unit.py:156 project/templates/layout.html:313 +#: project/forms/admin_unit.py:175 project/templates/layout.html:313 #: project/templates/manage/delete_membership.html:6 msgid "Leave organization" msgstr "" @@ -1052,7 +1060,7 @@ msgstr "" #: project/forms/event.py:463 project/forms/event_date.py:26 #: project/forms/planning.py:27 project/templates/_macros.html:324 #: project/templates/admin_unit/create.html:38 -#: project/templates/admin_unit/update.html:47 +#: project/templates/admin_unit/update.html:65 #: project/templates/event_place/create.html:41 #: project/templates/event_place/update.html:41 #: project/templates/manage/organizers.html:19 @@ -1099,7 +1107,7 @@ msgstr "" #: project/templates/admin_unit/cancel_deletion.html:13 #: project/templates/admin_unit/create.html:27 #: project/templates/admin_unit/request_deletion.html:15 -#: project/templates/admin_unit/update.html:36 +#: project/templates/admin_unit/update.html:54 #: project/templates/layout.html:265 #: project/templates/manage/delete_membership.html:13 #: project/templates/verification_request/delete.html:13 @@ -1658,11 +1666,11 @@ msgstr "" msgid "Enter list name" msgstr "" -#: project/templates/admin/admin_units.html:34 project/templates/home.html:25 +#: project/templates/admin/admin_units.html:34 project/templates/home.html:26 msgid "Manage" msgstr "" -#: project/templates/home.html:37 project/templates/layout.html:181 +#: project/templates/home.html:38 project/templates/layout.html:181 #: project/templates/manage/admin_units.html:28 #: project/templates/manage/verification_requests_outgoing.html:13 #: project/templates/manage/verification_requests_outgoing_create_select.html:13 @@ -1672,7 +1680,7 @@ msgstr "" msgid "Docs" msgstr "" -#: project/templates/home.html:40 +#: project/templates/home.html:41 msgid "Features" msgstr "" @@ -1814,7 +1822,7 @@ msgstr "" #: project/templates/admin/settings.html:4 #: project/templates/admin/settings.html:11 #: project/templates/admin_unit/update.html:6 -#: project/templates/admin_unit/update.html:30 +#: project/templates/admin_unit/update.html:48 #: project/templates/layout.html:296 project/templates/manage/widgets.html:11 #: project/templates/manage/widgets.html:15 project/templates/profile.html:32 msgid "Settings" @@ -1841,7 +1849,7 @@ msgid "Switch organization" msgstr "" #: project/templates/developer/read.html:4 -#: project/templates/developer/read.html:8 project/templates/layout.html:359 +#: project/templates/developer/read.html:8 project/templates/layout.html:361 #: project/templates/profile.html:45 msgid "Developer" msgstr "" @@ -1928,7 +1936,7 @@ msgid "Reset acceptance of terms of service and privacy" msgstr "" #: project/templates/admin_unit/create.html:51 -#: project/templates/admin_unit/update.html:67 +#: project/templates/admin_unit/update.html:85 #: project/templates/event/create.html:359 #: project/templates/event/update.html:216 #: project/templates/event_place/create.html:58 @@ -1954,12 +1962,12 @@ msgid "" "organization will be deleted. Until then, the deletion can be canceled." msgstr "" -#: project/templates/admin_unit/update.html:25 +#: project/templates/admin_unit/update.html:43 #: project/templates/manage/events.html:48 msgid "The organization is scheduled for deletion." msgstr "" -#: project/templates/admin_unit/update.html:80 +#: project/templates/admin_unit/update.html:98 #: project/templates/manage/verification_requests_outgoing_create_select.html:6 #: project/templates/manage/verification_requests_outgoing_create_select.html:11 msgid "Verification requests" @@ -2419,6 +2427,13 @@ msgstr "" msgid "Here you can find organizations that can verify other organizations." msgstr "" +#: project/templates/manage/verification_requests_outgoing_create_select.html:44 +#, python-format +msgid "" +"No organizations were found that can verify your organization with postal" +" code %(postal_code)s." +msgstr "" + #: project/templates/manage/widgets.html:87 msgid "Link, um Veranstaltungen vorzuschlagen" msgstr "" @@ -2522,7 +2537,7 @@ msgstr "" msgid "You do not have an account yet? Not a problem!" msgstr "" -#: project/templates/security/login_user.html:44 project/views/widget.py:157 +#: project/templates/security/login_user.html:44 project/views/widget.py:122 msgid "Register for free" msgstr "" @@ -2588,9 +2603,9 @@ msgstr "" msgid "Organization successfully updated" msgstr "" -#: project/views/admin.py:85 project/views/admin_unit.py:202 -#: project/views/admin_unit.py:235 project/views/manage.py:315 -#: project/views/verification_request.py:168 +#: project/views/admin.py:85 project/views/admin_unit.py:208 +#: project/views/admin_unit.py:241 project/views/manage.py:315 +#: project/views/verification_request.py:169 msgid "Entered name does not match organization name" msgstr "" @@ -2635,15 +2650,15 @@ msgstr "" msgid "Organization successfully created" msgstr "" -#: project/views/admin_unit.py:178 +#: project/views/admin_unit.py:184 msgid "AdminUnit successfully updated" msgstr "" -#: project/views/admin_unit.py:265 +#: project/views/admin_unit.py:271 msgid "Organization invitation accepted" msgstr "" -#: project/views/admin_unit.py:279 +#: project/views/admin_unit.py:285 msgid "Organization deletion requested" msgstr "" @@ -2899,17 +2914,17 @@ msgid "" " the invitation was sent to." msgstr "" -#: project/views/verification_request.py:132 +#: project/views/verification_request.py:133 msgid "" "Request successfully created. You will be notified after the other " "organization reviewed the request." msgstr "" -#: project/views/verification_request.py:173 +#: project/views/verification_request.py:174 msgid "Verification request successfully deleted" msgstr "" -#: project/views/verification_request.py:206 +#: project/views/verification_request.py:207 msgid "New verification request" msgstr "" @@ -2929,17 +2944,17 @@ msgstr "" msgid "Verification request review status updated" msgstr "" -#: project/views/widget.py:149 +#: project/views/widget.py:114 msgid "Thank you so much! The event is being verified." msgstr "" -#: project/views/widget.py:153 +#: project/views/widget.py:118 msgid "" "For more options and your own calendar of events, you can register for " "free." msgstr "" -#: project/views/widget.py:219 +#: project/views/widget.py:184 msgid "New event review" msgstr "" diff --git a/migrations/versions/c20d6d7575be_.py b/migrations/versions/c20d6d7575be_.py new file mode 100644 index 0000000..47bcfd0 --- /dev/null +++ b/migrations/versions/c20d6d7575be_.py @@ -0,0 +1,51 @@ +"""empty message + +Revision ID: c20d6d7575be +Revises: d2c04be821a7 +Create Date: 2023-09-29 22:41:02.008405 + +""" +import sqlalchemy as sa +import sqlalchemy_utils +from alembic import op +from sqlalchemy.dialects import postgresql + +from project import dbtypes + +# revision identifiers, used by Alembic. +revision = "c20d6d7575be" +down_revision = "d2c04be821a7" +branch_labels = None +depends_on = None + + +def upgrade(): + # ### commands auto generated by Alembic - please adjust! ### + op.add_column( + "adminunit", + sa.Column( + "incoming_verification_requests_postal_codes", + postgresql.ARRAY(sa.Unicode(length=255)), + server_default="{}", + nullable=False, + ), + ) + op.create_index( + "idx_adminunit_incoming_verification_requests_postal_codes", + "adminunit", + ["incoming_verification_requests_postal_codes"], + unique=False, + postgresql_using="gin", + ) + # ### end Alembic commands ### + + +def downgrade(): + # ### commands auto generated by Alembic - please adjust! ### + op.drop_index( + "idx_adminunit_incoming_verification_requests_postal_codes", + table_name="adminunit", + postgresql_using="gin", + ) + op.drop_column("adminunit", "incoming_verification_requests_postal_codes") + # ### end Alembic commands ### diff --git a/project/forms/admin_unit.py b/project/forms/admin_unit.py index bbb02c5..c722f3e 100644 --- a/project/forms/admin_unit.py +++ b/project/forms/admin_unit.py @@ -1,6 +1,13 @@ from flask_babel import lazy_gettext from flask_wtf import FlaskForm -from wtforms import DecimalField, FormField, StringField, SubmitField, TextAreaField +from wtforms import ( + DecimalField, + FormField, + SelectMultipleField, + StringField, + SubmitField, + TextAreaField, +) from wtforms.fields import BooleanField, EmailField, TelField, URLField from wtforms.validators import DataRequired, Length, Optional, Regexp from wtforms.widgets import ColorInput @@ -15,9 +22,11 @@ class AdminUnitLocationForm(FlaskForm): lazy_gettext("Street"), validators=[Optional(), Length(max=255)] ) postalCode = StringField( - lazy_gettext("Postal code"), validators=[Optional(), Length(max=255)] + lazy_gettext("Postal code"), validators=[DataRequired(), Length(max=10)] + ) + city = StringField( + lazy_gettext("City"), validators=[DataRequired(), Length(max=255)] ) - city = StringField(lazy_gettext("City"), validators=[Optional(), Length(max=255)]) state = StringField(lazy_gettext("State"), validators=[Optional(), Length(max=255)]) latitude = DecimalField( lazy_gettext("Latitude"), places=16, validators=[Optional()] @@ -71,10 +80,20 @@ class BaseAdminUnitForm(FlaskForm): incoming_verification_requests_text = TextAreaField( lazy_gettext("Verification requests information"), validators=[Optional()], + default=[], description=lazy_gettext( "This text is shown to unverified organizations to help them decide whether they ask you for verification." ), ) + incoming_verification_requests_postal_codes = SelectMultipleField( + lazy_gettext("Verification requests postal codes"), + validators=[Optional()], + validate_choice=False, + choices=[], + description=lazy_gettext( + "Limit verification requests to organizations with these postal codes." + ), + ) def populate_obj(self, obj): for name, field in self._fields.items(): diff --git a/project/forms/event_place.py b/project/forms/event_place.py index e4262d4..710373f 100644 --- a/project/forms/event_place.py +++ b/project/forms/event_place.py @@ -13,7 +13,7 @@ class EventPlaceLocationForm(FlaskForm): lazy_gettext("Street"), validators=[Optional(), Length(max=255)] ) postalCode = StringField( - lazy_gettext("Postal code"), validators=[Optional(), Length(max=255)] + lazy_gettext("Postal code"), validators=[Optional(), Length(max=10)] ) city = StringField(lazy_gettext("City"), validators=[Optional(), Length(max=255)]) state = StringField(lazy_gettext("State"), validators=[Optional(), Length(max=255)]) diff --git a/project/forms/organizer.py b/project/forms/organizer.py index 4e75d38..f2ab802 100644 --- a/project/forms/organizer.py +++ b/project/forms/organizer.py @@ -13,7 +13,7 @@ class OrganizerLocationForm(FlaskForm): lazy_gettext("Street"), validators=[Optional(), Length(max=255)] ) postalCode = StringField( - lazy_gettext("Postal code"), validators=[Optional(), Length(max=255)] + lazy_gettext("Postal code"), validators=[Optional(), Length(max=10)] ) city = StringField(lazy_gettext("City"), validators=[Optional(), Length(max=255)]) state = StringField(lazy_gettext("State"), validators=[Optional(), Length(max=255)]) diff --git a/project/models/admin_unit.py b/project/models/admin_unit.py index afa7417..ab51ccd 100644 --- a/project/models/admin_unit.py +++ b/project/models/admin_unit.py @@ -10,9 +10,11 @@ from sqlalchemy import ( UnicodeText, UniqueConstraint, and_, + cast, func, select, ) +from sqlalchemy.dialects import postgresql from sqlalchemy.event import listens_for from sqlalchemy.ext.hybrid import hybrid_property from sqlalchemy.ext.mutable import MutableList @@ -155,6 +157,14 @@ def before_saving_admin_unit_relation(mapper, connect, self): class AdminUnit(db.Model, TrackableMixin): __tablename__ = "adminunit" + __table_args__ = ( + db.Index( + "idx_adminunit_incoming_verification_requests_postal_codes", + "incoming_verification_requests_postal_codes", + postgresql_using="gin", + ), + ) + id = Column(Integer(), primary_key=True) name = Column(Unicode(255), unique=True) short_name = Column(Unicode(100), unique=True) @@ -279,6 +289,16 @@ class AdminUnit(db.Model, TrackableMixin): ) ) incoming_verification_requests_text = deferred(Column(UnicodeText())) + incoming_verification_requests_postal_codes = deferred( + Column( + postgresql.ARRAY(Unicode(255)), + nullable=False, + default=cast( + postgresql.array([], type_=Unicode(255)), postgresql.ARRAY(Unicode(255)) + ), + server_default="{}", + ) + ) can_invite_other = deferred( Column( Boolean(), diff --git a/project/services/admin_unit.py b/project/services/admin_unit.py index 1a8b2b0..83936dd 100644 --- a/project/services/admin_unit.py +++ b/project/services/admin_unit.py @@ -199,6 +199,15 @@ def get_admin_unit_query(params: AdminUnitSearchParams): ) query = query.filter(request_filter) + if params.incoming_verification_requests_postal_code: + request_filter = or_( + AdminUnit.incoming_verification_requests_postal_codes.contains( + [params.incoming_verification_requests_postal_code] + ), + AdminUnit.incoming_verification_requests_postal_codes == "{}", + ) + query = query.filter(request_filter) + query = params.get_trackable_query(query, AdminUnit) if params.keyword: diff --git a/project/services/search_params.py b/project/services/search_params.py index 6a618e4..e6a63f1 100644 --- a/project/services/search_params.py +++ b/project/services/search_params.py @@ -85,6 +85,7 @@ class AdminUnitSearchParams(TrackableSearchParams): self.include_unverified = False self.only_verifier = False self.reference_request_for_admin_unit_id = None + self.incoming_verification_requests_postal_code = None def load_from_request(self, **kwargs): super().load_from_request(**kwargs) diff --git a/project/services/verification.py b/project/services/verification.py index b881c53..2af39d3 100644 --- a/project/services/verification.py +++ b/project/services/verification.py @@ -16,6 +16,11 @@ def admin_unit_can_verify_admin_unit( target_admin_unit.id != source_admin_unit.id and target_admin_unit.can_verify_other and target_admin_unit.incoming_verification_requests_allowed + and ( + len(target_admin_unit.incoming_verification_requests_postal_codes) == 0 + or source_admin_unit.location.postalCode + in target_admin_unit.incoming_verification_requests_postal_codes + ) ) diff --git a/project/templates/admin_unit/update.html b/project/templates/admin_unit/update.html index df1be05..650ddf1 100644 --- a/project/templates/admin_unit/update.html +++ b/project/templates/admin_unit/update.html @@ -10,6 +10,24 @@ {{ render_manage_form_styles() }} {% endblock %} +{% block header_before_site_js %} + +{% endblock %} + {% block header %} {{ render_manage_form_scripts() }} {{ render_jquery_steps_header() }} @@ -82,6 +100,7 @@
{{ render_field_with_errors(form.incoming_verification_requests_allowed, ri="checkbox") }} {{ render_field_with_errors(form.incoming_verification_requests_text) }} + {{ render_field_with_errors(form.incoming_verification_requests_postal_codes, class="w-100") }}
{% endif %} diff --git a/project/templates/manage/verification_requests_outgoing_create_select.html b/project/templates/manage/verification_requests_outgoing_create_select.html index 3843491..3db7c84 100644 --- a/project/templates/manage/verification_requests_outgoing_create_select.html +++ b/project/templates/manage/verification_requests_outgoing_create_select.html @@ -39,6 +39,10 @@ render_link_prop, render_admin_unit_badges, render_pagination %} + {% else %} + {% endfor %}
{{ render_pagination(pagination) }}
diff --git a/project/translations/de/LC_MESSAGES/messages.mo b/project/translations/de/LC_MESSAGES/messages.mo index eae1d07..25b886b 100644 Binary files a/project/translations/de/LC_MESSAGES/messages.mo and b/project/translations/de/LC_MESSAGES/messages.mo differ diff --git a/project/translations/de/LC_MESSAGES/messages.po b/project/translations/de/LC_MESSAGES/messages.po index 8b6ffea..f29622b 100644 --- a/project/translations/de/LC_MESSAGES/messages.po +++ b/project/translations/de/LC_MESSAGES/messages.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: PROJECT VERSION\n" "Report-Msgid-Bugs-To: EMAIL@ADDRESS\n" -"POT-Creation-Date: 2023-09-07 22:40+0200\n" +"POT-Creation-Date: 2023-09-30 11:43+0200\n" "PO-Revision-Date: 2020-06-07 18:51+0200\n" "Last-Translator: FULL NAME \n" "Language: de\n" @@ -207,24 +207,24 @@ msgstr "message" msgid "You have received an invitation" msgstr "Du hast eine Einladung erhalten" -#: project/forms/admin.py:11 project/templates/layout.html:342 +#: project/forms/admin.py:11 project/templates/layout.html:344 #: project/views/root.py:55 msgid "Terms of service" msgstr "Nutzungsbedingungen" -#: project/forms/admin.py:12 project/templates/layout.html:347 +#: project/forms/admin.py:12 project/templates/layout.html:349 #: project/views/root.py:67 msgid "Legal notice" msgstr "Impressum" #: project/forms/admin.py:13 project/templates/_macros.html:1490 -#: project/templates/layout.html:351 +#: project/templates/layout.html:353 #: project/templates/widget/event_suggestion/create.html:204 #: project/views/admin_unit.py:84 project/views/root.py:75 msgid "Contact" msgstr "Kontakt" -#: project/forms/admin.py:14 project/templates/layout.html:355 +#: project/forms/admin.py:14 project/templates/layout.html:357 #: project/views/root.py:83 msgid "Privacy" msgstr "Datenschutz" @@ -264,7 +264,7 @@ msgstr "Nutzer aktualisieren" msgid "Delete user" msgstr "Nutzer löschen" -#: project/forms/admin.py:35 project/forms/admin_unit.py:58 +#: project/forms/admin.py:35 project/forms/admin_unit.py:67 #: project/forms/admin_unit_member.py:12 project/forms/admin_unit_member.py:25 #: project/forms/admin_unit_member.py:30 project/forms/event.py:112 #: project/forms/event_suggestion.py:38 project/forms/organizer.py:33 @@ -333,12 +333,12 @@ msgstr "Organisation aktualisieren" #: project/forms/admin.py:76 project/templates/admin/delete_admin_unit.html:6 #: project/templates/admin_unit/request_deletion.html:6 -#: project/templates/admin_unit/update.html:94 +#: project/templates/admin_unit/update.html:113 msgid "Delete organization" msgstr "Organisation löschen" -#: project/forms/admin.py:77 project/forms/admin_unit.py:147 -#: project/forms/admin_unit.py:152 project/forms/admin_unit.py:157 +#: project/forms/admin.py:77 project/forms/admin_unit.py:166 +#: project/forms/admin_unit.py:171 project/forms/admin_unit.py:176 #: project/forms/event.py:90 project/forms/event.py:119 #: project/forms/event_place.py:30 project/forms/event_place.py:56 #: project/forms/event_suggestion.py:26 project/forms/oauth2_client.py:66 @@ -377,108 +377,108 @@ msgstr "Nachricht" msgid "Send newsletter" msgstr "Newsletter senden" -#: project/forms/admin_unit.py:15 project/forms/event_place.py:13 +#: project/forms/admin_unit.py:22 project/forms/event_place.py:13 #: project/forms/organizer.py:13 msgid "Street" msgstr "Straße" -#: project/forms/admin_unit.py:18 project/forms/event.py:470 +#: project/forms/admin_unit.py:25 project/forms/event.py:470 #: project/forms/event_date.py:52 project/forms/event_place.py:16 #: project/forms/organizer.py:16 project/forms/planning.py:44 msgid "Postal code" msgstr "Postleitzahl" -#: project/forms/admin_unit.py:20 project/forms/event_place.py:18 +#: project/forms/admin_unit.py:28 project/forms/event_place.py:18 #: project/forms/organizer.py:18 msgid "City" msgstr "Stadt/Ort" -#: project/forms/admin_unit.py:21 project/forms/event_place.py:19 +#: project/forms/admin_unit.py:30 project/forms/event_place.py:19 #: project/forms/organizer.py:19 msgid "State" msgstr "Bundesland" -#: project/forms/admin_unit.py:23 project/forms/event_place.py:21 +#: project/forms/admin_unit.py:32 project/forms/event_place.py:21 #: project/forms/organizer.py:21 msgid "Latitude" msgstr "Breitengrad" -#: project/forms/admin_unit.py:26 project/forms/event_place.py:24 +#: project/forms/admin_unit.py:35 project/forms/event_place.py:24 #: project/forms/organizer.py:24 msgid "Longitude" msgstr "Längengrad" -#: project/forms/admin_unit.py:32 +#: project/forms/admin_unit.py:41 msgid "Name of organization" msgstr "Name der Organisation" -#: project/forms/admin_unit.py:33 +#: project/forms/admin_unit.py:42 msgid "The full name of the organization" msgstr "Vollständiger Name der Organisation" -#: project/forms/admin_unit.py:37 +#: project/forms/admin_unit.py:46 msgid "Short name for organization" msgstr "Kurzname für die Organisation" -#: project/forms/admin_unit.py:38 +#: project/forms/admin_unit.py:47 msgid "The short name is used to create a unique identifier for your events" msgstr "" "Der Kurzname wird verwendet, um die Veranstaltungen der Organisation " "eindeutig zu identifizieren. Der Kurzname darf nur Buchstaben, Nummern " "und Unterstriche enthalten." -#: project/forms/admin_unit.py:46 project/templates/_macros.html:1692 +#: project/forms/admin_unit.py:55 project/templates/_macros.html:1692 msgid "Short name must contain only letters numbers or underscore" msgstr "Der Kurzname darf nur Buchstaben, Nummern und Unterstriche enthalten" -#: project/forms/admin_unit.py:53 project/forms/event.py:124 +#: project/forms/admin_unit.py:62 project/forms/event.py:124 #: project/forms/event_place.py:34 msgid "Description" msgstr "Beschreibung" -#: project/forms/admin_unit.py:54 +#: project/forms/admin_unit.py:63 msgid "Describe the organization in a few words" msgstr "Beschreibe die Organisation in wenigen Worten" -#: project/forms/admin_unit.py:57 project/forms/event.py:111 +#: project/forms/admin_unit.py:66 project/forms/event.py:111 #: project/forms/event.py:129 project/forms/event_place.py:32 #: project/forms/organizer.py:32 project/templates/manage/organizers.html:21 msgid "Link URL" msgstr "Link URL" -#: project/forms/admin_unit.py:59 project/forms/event.py:113 +#: project/forms/admin_unit.py:68 project/forms/event.py:113 #: project/forms/event_suggestion.py:31 project/forms/organizer.py:34 #: project/templates/_macros.html:309 #: project/templates/manage/organizers.html:20 msgid "Phone" msgstr "Telefon" -#: project/forms/admin_unit.py:60 project/forms/event.py:114 +#: project/forms/admin_unit.py:69 project/forms/event.py:114 #: project/forms/organizer.py:35 project/templates/_macros.html:317 msgid "Fax" msgstr "Fax" -#: project/forms/admin_unit.py:61 project/forms/organizer.py:36 +#: project/forms/admin_unit.py:70 project/forms/organizer.py:36 #: project/templates/manage/organizers.html:22 #: project/templates/manage/organizers.html:47 msgid "Logo" msgstr "Logo" -#: project/forms/admin_unit.py:65 +#: project/forms/admin_unit.py:74 msgid "Allow verification requests" msgstr "Verifizierungsanfragen erlauben" -#: project/forms/admin_unit.py:66 +#: project/forms/admin_unit.py:75 msgid "If set, unverified organizations may ask you for verification." msgstr "" "Wenn gesetzt, können nicht verifizierte Organisationen um eine " "Verifizierung bitten." -#: project/forms/admin_unit.py:72 +#: project/forms/admin_unit.py:81 msgid "Verification requests information" msgstr "Text für Verifizierungsanfragen" -#: project/forms/admin_unit.py:74 +#: project/forms/admin_unit.py:84 msgid "" "This text is shown to unverified organizations to help them decide " "whether they ask you for verification." @@ -486,22 +486,30 @@ msgstr "" "Dieser Text wird nicht verifizierten Organisationen angezeigt, um ihnen " "bei der Entscheidung zu helfen, ob sie um eine Verifizierung bitten." -#: project/forms/admin_unit.py:90 +#: project/forms/admin_unit.py:89 +msgid "Verification requests postal codes" +msgstr "Postleitzahlen für Verifizierungsanfragen" + +#: project/forms/admin_unit.py:93 +msgid "Limit verification requests to organizations with these postal codes." +msgstr "Limitiere Verifizierungsanfragen auf Oranisationen mit diesen Postleitzahlen" + +#: project/forms/admin_unit.py:109 msgid "Verify new organization" msgstr "Neue Organisation verifizieren" -#: project/forms/admin_unit.py:91 +#: project/forms/admin_unit.py:110 msgid "If set, events of the new organization are publicly visible." msgstr "" "Wenn gesetzt, sind Veranstaltungen der neuen Organisation öffentlich " "sichtbar." -#: project/forms/admin_unit.py:97 project/forms/reference_request.py:86 +#: project/forms/admin_unit.py:116 project/forms/reference_request.py:86 #: project/forms/verification_request.py:86 msgid "Verify reference requests automatically" msgstr "Empfehlungsanfragen automatisch verifizieren" -#: project/forms/admin_unit.py:98 +#: project/forms/admin_unit.py:117 msgid "" "If set, all upcoming reference requests of the new organization are " "verified automatically." @@ -509,45 +517,45 @@ msgstr "" "Wenn gesetzt, werden alle zukünftigen Empfehlungsanfragen der neuen " "Organisation automatisch verifiziert." -#: project/forms/admin_unit.py:109 project/templates/admin_unit/create.html:5 +#: project/forms/admin_unit.py:128 project/templates/admin_unit/create.html:5 #: project/templates/admin_unit/create.html:21 #: project/templates/manage/admin_units.html:32 msgid "Create organization" msgstr "Organisation erstellen" -#: project/forms/admin_unit.py:117 project/forms/admin_unit.py:142 +#: project/forms/admin_unit.py:136 project/forms/admin_unit.py:161 msgid "Update settings" msgstr "Einstellungen speichern" -#: project/forms/admin_unit.py:122 +#: project/forms/admin_unit.py:141 msgid "Font" msgstr "Schriftart" -#: project/forms/admin_unit.py:125 +#: project/forms/admin_unit.py:144 msgid "Background Color" msgstr "Hintergrundfarbe" -#: project/forms/admin_unit.py:131 +#: project/forms/admin_unit.py:150 msgid "Primary Color" msgstr "Hauptfarbe" -#: project/forms/admin_unit.py:137 +#: project/forms/admin_unit.py:156 msgid "Link Color" msgstr "Linkfarbe" -#: project/forms/admin_unit.py:146 project/forms/user.py:17 +#: project/forms/admin_unit.py:165 project/forms/user.py:17 msgid "Request deletion" msgstr "Löschung beantragen" -#: project/forms/admin_unit.py:151 project/forms/user.py:22 +#: project/forms/admin_unit.py:170 project/forms/user.py:22 #: project/templates/admin_unit/cancel_deletion.html:6 -#: project/templates/admin_unit/update.html:26 +#: project/templates/admin_unit/update.html:44 #: project/templates/manage/events.html:49 project/templates/profile.html:13 #: project/templates/user/cancel_deletion.html:6 msgid "Cancel deletion" msgstr "Löschen abbrechen" -#: project/forms/admin_unit.py:156 project/templates/layout.html:313 +#: project/forms/admin_unit.py:175 project/templates/layout.html:313 #: project/templates/manage/delete_membership.html:6 msgid "Leave organization" msgstr "Organisation verlassen" @@ -1100,7 +1108,7 @@ msgstr "Kategorie" #: project/forms/event.py:463 project/forms/event_date.py:26 #: project/forms/planning.py:27 project/templates/_macros.html:324 #: project/templates/admin_unit/create.html:38 -#: project/templates/admin_unit/update.html:47 +#: project/templates/admin_unit/update.html:65 #: project/templates/event_place/create.html:41 #: project/templates/event_place/update.html:41 #: project/templates/manage/organizers.html:19 @@ -1147,7 +1155,7 @@ msgstr "Veranstaltungen finden" #: project/templates/admin_unit/cancel_deletion.html:13 #: project/templates/admin_unit/create.html:27 #: project/templates/admin_unit/request_deletion.html:15 -#: project/templates/admin_unit/update.html:36 +#: project/templates/admin_unit/update.html:54 #: project/templates/layout.html:265 #: project/templates/manage/delete_membership.html:13 #: project/templates/verification_request/delete.html:13 @@ -1719,11 +1727,11 @@ msgstr "Veranstalter eingeben" msgid "Enter list name" msgstr "Listenname eingeben" -#: project/templates/admin/admin_units.html:34 project/templates/home.html:25 +#: project/templates/admin/admin_units.html:34 project/templates/home.html:26 msgid "Manage" msgstr "Verwaltung" -#: project/templates/home.html:37 project/templates/layout.html:181 +#: project/templates/home.html:38 project/templates/layout.html:181 #: project/templates/manage/admin_units.html:28 #: project/templates/manage/verification_requests_outgoing.html:13 #: project/templates/manage/verification_requests_outgoing_create_select.html:13 @@ -1733,7 +1741,7 @@ msgstr "Verwaltung" msgid "Docs" msgstr "Doku" -#: project/templates/home.html:40 +#: project/templates/home.html:41 msgid "Features" msgstr "Features" @@ -1875,7 +1883,7 @@ msgstr "Organisationseinladungen" #: project/templates/admin/settings.html:4 #: project/templates/admin/settings.html:11 #: project/templates/admin_unit/update.html:6 -#: project/templates/admin_unit/update.html:30 +#: project/templates/admin_unit/update.html:48 #: project/templates/layout.html:296 project/templates/manage/widgets.html:11 #: project/templates/manage/widgets.html:15 project/templates/profile.html:32 msgid "Settings" @@ -1902,7 +1910,7 @@ msgid "Switch organization" msgstr "Organisation wechseln" #: project/templates/developer/read.html:4 -#: project/templates/developer/read.html:8 project/templates/layout.html:359 +#: project/templates/developer/read.html:8 project/templates/layout.html:361 #: project/templates/profile.html:45 msgid "Developer" msgstr "Entwickler" @@ -1989,7 +1997,7 @@ msgid "Reset acceptance of terms of service and privacy" msgstr "Akzeptanz der Nutzungsbedingungen und des Datenschutzes zurücksetzen" #: project/templates/admin_unit/create.html:51 -#: project/templates/admin_unit/update.html:67 +#: project/templates/admin_unit/update.html:85 #: project/templates/event/create.html:359 #: project/templates/event/update.html:216 #: project/templates/event_place/create.html:58 @@ -2017,12 +2025,12 @@ msgstr "" "Die Organisation wird nicht sofort gelöscht. Nach einer Frist wird die " "Organisation gelöscht. Bis dahin kann die Löschung abgebrochen werden." -#: project/templates/admin_unit/update.html:25 +#: project/templates/admin_unit/update.html:43 #: project/templates/manage/events.html:48 msgid "The organization is scheduled for deletion." msgstr "Die Organisation ist zur Löschung vorgesehen." -#: project/templates/admin_unit/update.html:80 +#: project/templates/admin_unit/update.html:98 #: project/templates/manage/verification_requests_outgoing_create_select.html:6 #: project/templates/manage/verification_requests_outgoing_create_select.html:11 msgid "Verification requests" @@ -2495,6 +2503,13 @@ msgstr "" "Hier findest du Organisationen, die deine Organisationen verifizieren " "können." +#: project/templates/manage/verification_requests_outgoing_create_select.html:44 +#, python-format +msgid "" +"No organizations were found that can verify your organization with postal" +" code %(postal_code)s." +msgstr "Es wurden keine Organisationen gefunden, die deine Organisation mit der Postleitzahl %(postal_code)s verifizieren können." + #: project/templates/manage/widgets.html:87 msgid "Link, um Veranstaltungen vorzuschlagen" msgstr "Link, um Veranstaltungen vorzuschlagen" @@ -2598,7 +2613,7 @@ msgstr "Angemeldet bleiben" msgid "You do not have an account yet? Not a problem!" msgstr "Du hast noch keinen Account? Kein Problem!" -#: project/templates/security/login_user.html:44 project/views/widget.py:157 +#: project/templates/security/login_user.html:44 project/views/widget.py:122 msgid "Register for free" msgstr "Kostenlos registrieren" @@ -2666,9 +2681,9 @@ msgstr "Vorschau" msgid "Organization successfully updated" msgstr "Organisation erfolgreich aktualisiert" -#: project/views/admin.py:85 project/views/admin_unit.py:202 -#: project/views/admin_unit.py:235 project/views/manage.py:315 -#: project/views/verification_request.py:168 +#: project/views/admin.py:85 project/views/admin_unit.py:208 +#: project/views/admin_unit.py:241 project/views/manage.py:315 +#: project/views/verification_request.py:169 msgid "Entered name does not match organization name" msgstr "Der eingegebene Name entspricht nicht dem Namen der Organisation" @@ -2716,15 +2731,15 @@ msgstr "" msgid "Organization successfully created" msgstr "Organisation erfolgreich erstellt" -#: project/views/admin_unit.py:178 +#: project/views/admin_unit.py:184 msgid "AdminUnit successfully updated" msgstr "Organisation erfolgreich aktualisiert" -#: project/views/admin_unit.py:265 +#: project/views/admin_unit.py:271 msgid "Organization invitation accepted" msgstr "Organisationseinladung akzeptiert" -#: project/views/admin_unit.py:279 +#: project/views/admin_unit.py:285 msgid "Organization deletion requested" msgstr "Löschung der Organisation beantragt" @@ -2993,7 +3008,7 @@ msgstr "" "Die Einladung wurde für einen anderen Nutzer ausgestellt. Melde dich mit " "der Email-Adresse an, an die die Einladung geschickt wurde." -#: project/views/verification_request.py:132 +#: project/views/verification_request.py:133 msgid "" "Request successfully created. You will be notified after the other " "organization reviewed the request." @@ -3001,11 +3016,11 @@ msgstr "" "Verifizierungsanfrage erfolgreich erstellt. Du wirst benachrichtigt, " "nachdem die andere Organisation die Anfrage geprüft hat." -#: project/views/verification_request.py:173 +#: project/views/verification_request.py:174 msgid "Verification request successfully deleted" msgstr "Verifizierungsanfrage erfolgreich gelöscht" -#: project/views/verification_request.py:206 +#: project/views/verification_request.py:207 msgid "New verification request" msgstr "Neue Verifizierungsanfrage" @@ -3025,11 +3040,11 @@ msgstr "Verifizierungsanfrage erfolgreich aktualisiert" msgid "Verification request review status updated" msgstr "Prüfungsstatus der Verifizierungsanfrage aktualisiert" -#: project/views/widget.py:149 +#: project/views/widget.py:114 msgid "Thank you so much! The event is being verified." msgstr "Vielen Dank! Die Veranstaltung wird geprüft." -#: project/views/widget.py:153 +#: project/views/widget.py:118 msgid "" "For more options and your own calendar of events, you can register for " "free." @@ -3037,7 +3052,7 @@ msgstr "" "Für mehr Optionen und einen eigenen Veranstaltungskalender, kannst du " "dich kostenlos registrieren." -#: project/views/widget.py:219 +#: project/views/widget.py:184 msgid "New event review" msgstr "Neue Veranstaltung zu prüfen" diff --git a/project/translations/en/LC_MESSAGES/messages.mo b/project/translations/en/LC_MESSAGES/messages.mo index bf57962..9a79561 100644 Binary files a/project/translations/en/LC_MESSAGES/messages.mo and b/project/translations/en/LC_MESSAGES/messages.mo differ diff --git a/project/translations/en/LC_MESSAGES/messages.po b/project/translations/en/LC_MESSAGES/messages.po index c93f4be..bba3a7b 100644 --- a/project/translations/en/LC_MESSAGES/messages.po +++ b/project/translations/en/LC_MESSAGES/messages.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: PROJECT VERSION\n" "Report-Msgid-Bugs-To: EMAIL@ADDRESS\n" -"POT-Creation-Date: 2023-09-07 22:40+0200\n" +"POT-Creation-Date: 2023-09-30 11:43+0200\n" "PO-Revision-Date: 2021-04-30 15:04+0200\n" "Last-Translator: FULL NAME \n" "Language: en\n" @@ -207,24 +207,24 @@ msgstr "" msgid "You have received an invitation" msgstr "" -#: project/forms/admin.py:11 project/templates/layout.html:342 +#: project/forms/admin.py:11 project/templates/layout.html:344 #: project/views/root.py:55 msgid "Terms of service" msgstr "" -#: project/forms/admin.py:12 project/templates/layout.html:347 +#: project/forms/admin.py:12 project/templates/layout.html:349 #: project/views/root.py:67 msgid "Legal notice" msgstr "" #: project/forms/admin.py:13 project/templates/_macros.html:1490 -#: project/templates/layout.html:351 +#: project/templates/layout.html:353 #: project/templates/widget/event_suggestion/create.html:204 #: project/views/admin_unit.py:84 project/views/root.py:75 msgid "Contact" msgstr "" -#: project/forms/admin.py:14 project/templates/layout.html:355 +#: project/forms/admin.py:14 project/templates/layout.html:357 #: project/views/root.py:83 msgid "Privacy" msgstr "" @@ -264,7 +264,7 @@ msgstr "" msgid "Delete user" msgstr "" -#: project/forms/admin.py:35 project/forms/admin_unit.py:58 +#: project/forms/admin.py:35 project/forms/admin_unit.py:67 #: project/forms/admin_unit_member.py:12 project/forms/admin_unit_member.py:25 #: project/forms/admin_unit_member.py:30 project/forms/event.py:112 #: project/forms/event_suggestion.py:38 project/forms/organizer.py:33 @@ -325,12 +325,12 @@ msgstr "" #: project/forms/admin.py:76 project/templates/admin/delete_admin_unit.html:6 #: project/templates/admin_unit/request_deletion.html:6 -#: project/templates/admin_unit/update.html:94 +#: project/templates/admin_unit/update.html:113 msgid "Delete organization" msgstr "" -#: project/forms/admin.py:77 project/forms/admin_unit.py:147 -#: project/forms/admin_unit.py:152 project/forms/admin_unit.py:157 +#: project/forms/admin.py:77 project/forms/admin_unit.py:166 +#: project/forms/admin_unit.py:171 project/forms/admin_unit.py:176 #: project/forms/event.py:90 project/forms/event.py:119 #: project/forms/event_place.py:30 project/forms/event_place.py:56 #: project/forms/event_suggestion.py:26 project/forms/oauth2_client.py:66 @@ -369,166 +369,174 @@ msgstr "" msgid "Send newsletter" msgstr "" -#: project/forms/admin_unit.py:15 project/forms/event_place.py:13 +#: project/forms/admin_unit.py:22 project/forms/event_place.py:13 #: project/forms/organizer.py:13 msgid "Street" msgstr "" -#: project/forms/admin_unit.py:18 project/forms/event.py:470 +#: project/forms/admin_unit.py:25 project/forms/event.py:470 #: project/forms/event_date.py:52 project/forms/event_place.py:16 #: project/forms/organizer.py:16 project/forms/planning.py:44 msgid "Postal code" msgstr "" -#: project/forms/admin_unit.py:20 project/forms/event_place.py:18 +#: project/forms/admin_unit.py:28 project/forms/event_place.py:18 #: project/forms/organizer.py:18 msgid "City" msgstr "" -#: project/forms/admin_unit.py:21 project/forms/event_place.py:19 +#: project/forms/admin_unit.py:30 project/forms/event_place.py:19 #: project/forms/organizer.py:19 msgid "State" msgstr "" -#: project/forms/admin_unit.py:23 project/forms/event_place.py:21 +#: project/forms/admin_unit.py:32 project/forms/event_place.py:21 #: project/forms/organizer.py:21 msgid "Latitude" msgstr "" -#: project/forms/admin_unit.py:26 project/forms/event_place.py:24 +#: project/forms/admin_unit.py:35 project/forms/event_place.py:24 #: project/forms/organizer.py:24 msgid "Longitude" msgstr "" -#: project/forms/admin_unit.py:32 +#: project/forms/admin_unit.py:41 msgid "Name of organization" msgstr "" -#: project/forms/admin_unit.py:33 +#: project/forms/admin_unit.py:42 msgid "The full name of the organization" msgstr "" -#: project/forms/admin_unit.py:37 +#: project/forms/admin_unit.py:46 msgid "Short name for organization" msgstr "" -#: project/forms/admin_unit.py:38 +#: project/forms/admin_unit.py:47 msgid "The short name is used to create a unique identifier for your events" msgstr "" -#: project/forms/admin_unit.py:46 project/templates/_macros.html:1692 +#: project/forms/admin_unit.py:55 project/templates/_macros.html:1692 msgid "Short name must contain only letters numbers or underscore" msgstr "" -#: project/forms/admin_unit.py:53 project/forms/event.py:124 +#: project/forms/admin_unit.py:62 project/forms/event.py:124 #: project/forms/event_place.py:34 msgid "Description" msgstr "" -#: project/forms/admin_unit.py:54 +#: project/forms/admin_unit.py:63 msgid "Describe the organization in a few words" msgstr "" -#: project/forms/admin_unit.py:57 project/forms/event.py:111 +#: project/forms/admin_unit.py:66 project/forms/event.py:111 #: project/forms/event.py:129 project/forms/event_place.py:32 #: project/forms/organizer.py:32 project/templates/manage/organizers.html:21 msgid "Link URL" msgstr "" -#: project/forms/admin_unit.py:59 project/forms/event.py:113 +#: project/forms/admin_unit.py:68 project/forms/event.py:113 #: project/forms/event_suggestion.py:31 project/forms/organizer.py:34 #: project/templates/_macros.html:309 #: project/templates/manage/organizers.html:20 msgid "Phone" msgstr "" -#: project/forms/admin_unit.py:60 project/forms/event.py:114 +#: project/forms/admin_unit.py:69 project/forms/event.py:114 #: project/forms/organizer.py:35 project/templates/_macros.html:317 msgid "Fax" msgstr "" -#: project/forms/admin_unit.py:61 project/forms/organizer.py:36 +#: project/forms/admin_unit.py:70 project/forms/organizer.py:36 #: project/templates/manage/organizers.html:22 #: project/templates/manage/organizers.html:47 msgid "Logo" msgstr "" -#: project/forms/admin_unit.py:65 +#: project/forms/admin_unit.py:74 msgid "Allow verification requests" msgstr "" -#: project/forms/admin_unit.py:66 +#: project/forms/admin_unit.py:75 msgid "If set, unverified organizations may ask you for verification." msgstr "" -#: project/forms/admin_unit.py:72 +#: project/forms/admin_unit.py:81 msgid "Verification requests information" msgstr "" -#: project/forms/admin_unit.py:74 +#: project/forms/admin_unit.py:84 msgid "" "This text is shown to unverified organizations to help them decide " "whether they ask you for verification." msgstr "" -#: project/forms/admin_unit.py:90 +#: project/forms/admin_unit.py:89 +msgid "Verification requests postal codes" +msgstr "" + +#: project/forms/admin_unit.py:93 +msgid "Accept verification requests to organizations with these postal codes." +msgstr "" + +#: project/forms/admin_unit.py:109 msgid "Verify new organization" msgstr "" -#: project/forms/admin_unit.py:91 +#: project/forms/admin_unit.py:110 msgid "If set, events of the new organization are publicly visible." msgstr "" -#: project/forms/admin_unit.py:97 project/forms/reference_request.py:86 +#: project/forms/admin_unit.py:116 project/forms/reference_request.py:86 #: project/forms/verification_request.py:86 msgid "Verify reference requests automatically" msgstr "" -#: project/forms/admin_unit.py:98 +#: project/forms/admin_unit.py:117 msgid "" "If set, all upcoming reference requests of the new organization are " "verified automatically." msgstr "" -#: project/forms/admin_unit.py:109 project/templates/admin_unit/create.html:5 +#: project/forms/admin_unit.py:128 project/templates/admin_unit/create.html:5 #: project/templates/admin_unit/create.html:21 #: project/templates/manage/admin_units.html:32 msgid "Create organization" msgstr "" -#: project/forms/admin_unit.py:117 project/forms/admin_unit.py:142 +#: project/forms/admin_unit.py:136 project/forms/admin_unit.py:161 msgid "Update settings" msgstr "" -#: project/forms/admin_unit.py:122 +#: project/forms/admin_unit.py:141 msgid "Font" msgstr "" -#: project/forms/admin_unit.py:125 +#: project/forms/admin_unit.py:144 msgid "Background Color" msgstr "" -#: project/forms/admin_unit.py:131 +#: project/forms/admin_unit.py:150 msgid "Primary Color" msgstr "" -#: project/forms/admin_unit.py:137 +#: project/forms/admin_unit.py:156 msgid "Link Color" msgstr "" -#: project/forms/admin_unit.py:146 project/forms/user.py:17 +#: project/forms/admin_unit.py:165 project/forms/user.py:17 msgid "Request deletion" msgstr "" -#: project/forms/admin_unit.py:151 project/forms/user.py:22 +#: project/forms/admin_unit.py:170 project/forms/user.py:22 #: project/templates/admin_unit/cancel_deletion.html:6 -#: project/templates/admin_unit/update.html:26 +#: project/templates/admin_unit/update.html:44 #: project/templates/manage/events.html:49 project/templates/profile.html:13 #: project/templates/user/cancel_deletion.html:6 msgid "Cancel deletion" msgstr "" -#: project/forms/admin_unit.py:156 project/templates/layout.html:313 +#: project/forms/admin_unit.py:175 project/templates/layout.html:313 #: project/templates/manage/delete_membership.html:6 msgid "Leave organization" msgstr "" @@ -1053,7 +1061,7 @@ msgstr "" #: project/forms/event.py:463 project/forms/event_date.py:26 #: project/forms/planning.py:27 project/templates/_macros.html:324 #: project/templates/admin_unit/create.html:38 -#: project/templates/admin_unit/update.html:47 +#: project/templates/admin_unit/update.html:65 #: project/templates/event_place/create.html:41 #: project/templates/event_place/update.html:41 #: project/templates/manage/organizers.html:19 @@ -1100,7 +1108,7 @@ msgstr "" #: project/templates/admin_unit/cancel_deletion.html:13 #: project/templates/admin_unit/create.html:27 #: project/templates/admin_unit/request_deletion.html:15 -#: project/templates/admin_unit/update.html:36 +#: project/templates/admin_unit/update.html:54 #: project/templates/layout.html:265 #: project/templates/manage/delete_membership.html:13 #: project/templates/verification_request/delete.html:13 @@ -1666,11 +1674,11 @@ msgstr "" msgid "Enter list name" msgstr "" -#: project/templates/admin/admin_units.html:34 project/templates/home.html:25 +#: project/templates/admin/admin_units.html:34 project/templates/home.html:26 msgid "Manage" msgstr "" -#: project/templates/home.html:37 project/templates/layout.html:181 +#: project/templates/home.html:38 project/templates/layout.html:181 #: project/templates/manage/admin_units.html:28 #: project/templates/manage/verification_requests_outgoing.html:13 #: project/templates/manage/verification_requests_outgoing_create_select.html:13 @@ -1680,7 +1688,7 @@ msgstr "" msgid "Docs" msgstr "" -#: project/templates/home.html:40 +#: project/templates/home.html:41 msgid "Features" msgstr "" @@ -1822,7 +1830,7 @@ msgstr "" #: project/templates/admin/settings.html:4 #: project/templates/admin/settings.html:11 #: project/templates/admin_unit/update.html:6 -#: project/templates/admin_unit/update.html:30 +#: project/templates/admin_unit/update.html:48 #: project/templates/layout.html:296 project/templates/manage/widgets.html:11 #: project/templates/manage/widgets.html:15 project/templates/profile.html:32 msgid "Settings" @@ -1849,7 +1857,7 @@ msgid "Switch organization" msgstr "" #: project/templates/developer/read.html:4 -#: project/templates/developer/read.html:8 project/templates/layout.html:359 +#: project/templates/developer/read.html:8 project/templates/layout.html:361 #: project/templates/profile.html:45 msgid "Developer" msgstr "" @@ -1936,7 +1944,7 @@ msgid "Reset acceptance of terms of service and privacy" msgstr "" #: project/templates/admin_unit/create.html:51 -#: project/templates/admin_unit/update.html:67 +#: project/templates/admin_unit/update.html:85 #: project/templates/event/create.html:359 #: project/templates/event/update.html:216 #: project/templates/event_place/create.html:58 @@ -1962,12 +1970,12 @@ msgid "" "organization will be deleted. Until then, the deletion can be canceled." msgstr "" -#: project/templates/admin_unit/update.html:25 +#: project/templates/admin_unit/update.html:43 #: project/templates/manage/events.html:48 msgid "The organization is scheduled for deletion." msgstr "" -#: project/templates/admin_unit/update.html:80 +#: project/templates/admin_unit/update.html:98 #: project/templates/manage/verification_requests_outgoing_create_select.html:6 #: project/templates/manage/verification_requests_outgoing_create_select.html:11 msgid "Verification requests" @@ -2427,6 +2435,13 @@ msgstr "" msgid "Here you can find organizations that can verify other organizations." msgstr "" +#: project/templates/manage/verification_requests_outgoing_create_select.html:44 +#, python-format +msgid "" +"No organizations were found that can verify your organization with postal" +" code %(postal_code)s." +msgstr "" + #: project/templates/manage/widgets.html:87 msgid "Link, um Veranstaltungen vorzuschlagen" msgstr "" @@ -2530,7 +2545,7 @@ msgstr "" msgid "You do not have an account yet? Not a problem!" msgstr "" -#: project/templates/security/login_user.html:44 project/views/widget.py:157 +#: project/templates/security/login_user.html:44 project/views/widget.py:122 msgid "Register for free" msgstr "" @@ -2596,9 +2611,9 @@ msgstr "" msgid "Organization successfully updated" msgstr "" -#: project/views/admin.py:85 project/views/admin_unit.py:202 -#: project/views/admin_unit.py:235 project/views/manage.py:315 -#: project/views/verification_request.py:168 +#: project/views/admin.py:85 project/views/admin_unit.py:208 +#: project/views/admin_unit.py:241 project/views/manage.py:315 +#: project/views/verification_request.py:169 msgid "Entered name does not match organization name" msgstr "" @@ -2643,15 +2658,15 @@ msgstr "" msgid "Organization successfully created" msgstr "" -#: project/views/admin_unit.py:178 +#: project/views/admin_unit.py:184 msgid "AdminUnit successfully updated" msgstr "" -#: project/views/admin_unit.py:265 +#: project/views/admin_unit.py:271 msgid "Organization invitation accepted" msgstr "" -#: project/views/admin_unit.py:279 +#: project/views/admin_unit.py:285 msgid "Organization deletion requested" msgstr "" @@ -2907,17 +2922,17 @@ msgid "" " the invitation was sent to." msgstr "" -#: project/views/verification_request.py:132 +#: project/views/verification_request.py:133 msgid "" "Request successfully created. You will be notified after the other " "organization reviewed the request." msgstr "" -#: project/views/verification_request.py:173 +#: project/views/verification_request.py:174 msgid "Verification request successfully deleted" msgstr "" -#: project/views/verification_request.py:206 +#: project/views/verification_request.py:207 msgid "New verification request" msgstr "" @@ -2937,17 +2952,17 @@ msgstr "" msgid "Verification request review status updated" msgstr "" -#: project/views/widget.py:149 +#: project/views/widget.py:114 msgid "Thank you so much! The event is being verified." msgstr "" -#: project/views/widget.py:153 +#: project/views/widget.py:118 msgid "" "For more options and your own calendar of events, you can register for " "free." msgstr "" -#: project/views/widget.py:219 +#: project/views/widget.py:184 msgid "New event review" msgstr "" diff --git a/project/views/admin_unit.py b/project/views/admin_unit.py index 3792235..b044dd4 100644 --- a/project/views/admin_unit.py +++ b/project/views/admin_unit.py @@ -169,6 +169,12 @@ def admin_unit_update(id): return permission_missing(url_for("manage_admin_unit", id=admin_unit.id)) form = UpdateAdminUnitForm(obj=admin_unit) + form.incoming_verification_requests_postal_codes.data = sorted( + form.incoming_verification_requests_postal_codes.data + ) + form.incoming_verification_requests_postal_codes.choices = ( + form.incoming_verification_requests_postal_codes.data + ) if form.validate_on_submit(): update_admin_unit_with_form(admin_unit, form) diff --git a/project/views/verification_request.py b/project/views/verification_request.py index aa8090a..9301e61 100644 --- a/project/views/verification_request.py +++ b/project/views/verification_request.py @@ -86,6 +86,7 @@ def manage_admin_unit_verification_requests_outgoing_create_select(id): params = AdminUnitSearchParams() params.only_verifier = True + params.incoming_verification_requests_postal_code = admin_unit.location.postalCode admin_units = get_admin_unit_query(params).paginate() return render_template(