Skip to content

Commit

Permalink
Org: Move and change description of field "delete_when_expired"
Browse files Browse the repository at this point in the history
TYPE: Feature
LINK: OGC-1764
  • Loading branch information
BreathingFlesh authored Aug 5, 2024
1 parent 733965c commit 7a64136
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 3 deletions.
2 changes: 1 addition & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ repos:
exclude: .pre-commit-config.yaml
- id: pt_structure
- repo: https://github.com/PyCQA/flake8
rev: 7.1.0
rev: 7.1.1
hooks:
- id: flake8
files: '^(src|stubs|tests).*\.py'
Expand Down
2 changes: 1 addition & 1 deletion src/onegov/org/locale/de_CH/LC_MESSAGES/onegov.org.po
Original file line number Diff line number Diff line change
Expand Up @@ -2622,7 +2622,7 @@ msgid "Sidebar links"
msgstr "Links in der Sidebar"

msgid "Delete content when expired"
msgstr "Inhalt löschen wenn er abgelaufen ist"
msgstr "Inhalt löschen nachdem abgelaufen"

msgid "This content is automatically deleted if the end date is in the past"
msgstr ""
Expand Down
10 changes: 9 additions & 1 deletion src/onegov/org/views/directory.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
from onegov.directory.errors import MissingFileError
from onegov.directory.errors import ValidationError
from onegov.directory.models.directory import EntrySubscription
from onegov.form import FormCollection, as_internal_id
from onegov.form import FormCollection, as_internal_id, move_fields
from onegov.form.errors import (
InvalidFormSyntax, MixedTypeError, DuplicateLabelError)
from onegov.form.fields import UploadField
Expand Down Expand Up @@ -102,6 +102,14 @@ def on_request(self) -> None:
self.publication_start.validators[0] = InputRequired()
self.publication_end.validators[0] = InputRequired()

move_fields(
InternalNotesAndOptionalMapPublicationForm,
fields=(
'delete_when_expired',
),
after='publication_end'
)

return InternalNotesAndOptionalMapPublicationForm


Expand Down

0 comments on commit 7a64136

Please sign in to comment.