fix: change chexbox positions
This commit is contained in:
+20
-46
@@ -51,14 +51,24 @@ class ProjectBriefAdmin(admin.ModelAdmin):
|
||||
(
|
||||
"Brief",
|
||||
{
|
||||
"description": (
|
||||
"Each field has its own lock and website visibility controls. "
|
||||
"Lock prevents client edits; Show on website includes the field "
|
||||
"on the public card when the project is published."
|
||||
),
|
||||
"fields": (
|
||||
"client",
|
||||
"title",
|
||||
"category",
|
||||
"locked",
|
||||
"show_on_website",
|
||||
("title", "lock_title", "show_title_on_website"),
|
||||
("category", "lock_category", "show_category_on_website"),
|
||||
"description",
|
||||
"budget_range",
|
||||
"desired_deadline",
|
||||
("lock_description", "show_description_on_website"),
|
||||
("budget_range", "lock_budget_range", "show_budget_on_website"),
|
||||
("desired_deadline", "lock_desired_deadline", "show_deadline_on_website"),
|
||||
"reference_links",
|
||||
("lock_reference_links", "show_references_on_website"),
|
||||
("lock_attachments", "show_attachments_on_website"),
|
||||
),
|
||||
},
|
||||
),
|
||||
@@ -75,34 +85,13 @@ class ProjectBriefAdmin(admin.ModelAdmin):
|
||||
},
|
||||
),
|
||||
(
|
||||
"Client editing locks",
|
||||
"Website showcase overrides",
|
||||
{
|
||||
"description": (
|
||||
"Lock individual fields so the client cannot change them while "
|
||||
"the brief is still editable. 'Lock entire project' blocks all "
|
||||
"client edits regardless of status."
|
||||
"Optional public-facing content. Leave blank to fall back to the "
|
||||
"brief field values above."
|
||||
),
|
||||
"fields": (
|
||||
"locked",
|
||||
"lock_title",
|
||||
"lock_category",
|
||||
"lock_description",
|
||||
"lock_budget_range",
|
||||
"lock_desired_deadline",
|
||||
"lock_reference_links",
|
||||
"lock_attachments",
|
||||
),
|
||||
},
|
||||
),
|
||||
(
|
||||
"Website showcase",
|
||||
{
|
||||
"description": (
|
||||
"Control whether this project appears on the public website and "
|
||||
"which fields are visible on the website card."
|
||||
),
|
||||
"fields": (
|
||||
"show_on_website",
|
||||
"public_title",
|
||||
"public_summary",
|
||||
"public_tags",
|
||||
@@ -112,28 +101,13 @@ class ProjectBriefAdmin(admin.ModelAdmin):
|
||||
),
|
||||
},
|
||||
),
|
||||
(
|
||||
"Website field visibility",
|
||||
{
|
||||
"description": (
|
||||
"Each field can be independently shown or hidden on the website card."
|
||||
),
|
||||
"fields": (
|
||||
"show_title_on_website",
|
||||
"show_category_on_website",
|
||||
"show_description_on_website",
|
||||
"show_budget_on_website",
|
||||
"show_deadline_on_website",
|
||||
"show_references_on_website",
|
||||
"show_attachments_on_website",
|
||||
),
|
||||
"classes": ("collapse",),
|
||||
},
|
||||
),
|
||||
)
|
||||
inlines = [ProjectBriefAttachmentInline, ProjectInternalNoteInline]
|
||||
date_hierarchy = "submitted_at"
|
||||
|
||||
class Media:
|
||||
css = {"all": ("css/project-brief-admin.css",)}
|
||||
|
||||
def save_formset(self, request, form, formset, change):
|
||||
instances = formset.save(commit=False)
|
||||
for instance in instances:
|
||||
|
||||
@@ -93,6 +93,7 @@ class ProjectBrief(models.Model):
|
||||
)
|
||||
locked = models.BooleanField(
|
||||
default=False,
|
||||
verbose_name="Lock project",
|
||||
help_text="Lock the whole project so the client cannot edit it at all.",
|
||||
)
|
||||
lock_title = models.BooleanField(default=False, help_text="Lock title for the client.")
|
||||
|
||||
Reference in New Issue
Block a user