Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 7 additions & 1 deletion hypha/apply/funds/blocks.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
from hypha.addressfield.fields import ADDRESS_FIELDS_ORDER, AddressField
from hypha.apply.categories.blocks import CategoryQuestionBlock
from hypha.apply.stream_forms.blocks import FormFieldsBlock
from hypha.apply.users.models import User
from hypha.apply.utils.blocks import (
CustomFormFieldsBlock,
MustIncludeFieldBlock,
Expand All @@ -27,7 +28,6 @@ class ApplicationMustIncludeFieldBlock(MustIncludeFieldBlock):
class TitleBlock(ApplicationMustIncludeFieldBlock):
name = "title"
description = "The title of the project"
widget = forms.TextInput()
field_label = blocks.CharBlock(
label=_("Label"), default=_("What is the title of your application?")
)
Expand Down Expand Up @@ -132,6 +132,12 @@ class FullNameBlock(ApplicationMustIncludeFieldBlock):
),
)

def get_field_kwargs(self, struct_value):
kwargs = super().get_field_kwargs(struct_value)
# Pull the max length from the full_name db field
kwargs["max_length"] = User._meta.get_field("full_name").max_length
return kwargs

class Meta:
label = _("Full name")
icon = "user"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ <h5>{% blocktrans with stage=object.previous.stage %}Your {{ stage }} applicatio
<relative-time datetime={{ object.submit_time|date:"c" }} class="font-semibold">
{{ object.submit_time|date:"SHORT_DATETIME_FORMAT" }}
</relative-time>
{% trans "by" %} <strong class="font-semibold">{% display_submission_author %}</strong>
{% trans "by" %} <strong class="max-w-md font-semibold line-clamp-2">{% display_submission_author %}</strong>
</span>

<span class="self-center">
Expand All @@ -103,7 +103,7 @@ <h5>{% blocktrans with stage=object.previous.stage %}Your {{ stage }} applicatio
{{ object.live_revision.timestamp|date:"SHORT_DATETIME_FORMAT" }}
</relative-time>
{% trans "by" %}
<strong class="font-semibold">
<strong class="max-w-md font-semibold line-clamp-2">
{% display_submission_author True %}
</strong>)
</span>
Expand All @@ -121,7 +121,6 @@ <h5>{% blocktrans with stage=object.previous.stage %}Your {{ stage }} applicatio
{% trans "Edit" %}
</a>
{% endif %}

{% can "delete_submission" object as can_delete_submission %}
{% if can_delete_submission %}
<a
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -72,14 +72,14 @@
<div class="pt-1">
<p class="m-0 text-xs">
#{{ s.application_id }}
submitted <relative-time datetime="{{ s.submit_time|date:"c" }}">{{ s.submit_time|date:"SHORT_DATE_FORMAT" }}</relative-time>
{% if s|show_applicant_identity:request.user %}by <a
{% trans "submitted" %} <relative-time datetime="{{ s.submit_time|date:"c" }}">{{ s.submit_time|date:"SHORT_DATE_FORMAT" }}</relative-time>
{% if s|show_applicant_identity:request.user %}{% trans "by" %} <a
href="{% url "apply:submissions:list" %}{% modify_query "only_query_string" "page" applicants=s.user.id %}"
hx-get="{% url "apply:submissions:list" %}{% modify_query "only_query_string" "page" applicants=s.user.id %}"
hx-target="#main"
hx-push-url="true"
hx-swap="outerHTML transition:true"
class="link link-muted text-inherit"
class="inline-flex max-w-sm link link-muted text-inherit text-inherit truncate"
>{{ s.user }}</a>{% endif %} • {{ s.stage }} •


Expand Down Expand Up @@ -135,17 +135,17 @@
<div
data-tippy-content="Assigned to {{ s.lead }}"
data-tippy-placement="left"
class="flex gap-1 truncate"
class="flex gap-1"
>
{% comment %} <span class="block mb-1 text-xs text-fg-muted">Lead: </span> {% endcomment %}
{% heroicon_micro "user-circle" aria_hidden="true" size=16 class="fill-fg-muted" %}
{% heroicon_micro "user-circle" aria_hidden="true" size=16 class="fill-fg-muted min-w-[16px]" %}
<a
hx-get="{% url "apply:submissions:list" %}{% modify_query "only_query_string" "page" leads=s.lead.id %}"
href="{% url "apply:submissions:list" %}{% modify_query "only_query_string" "page" leads=s.lead.id %}"
hx-target="#main"
hx-push-url="true"
hx-swap="outerHTML transition:true"
class="link link-muted text-inherit"
class="max-w-sm link link-muted text-inherit truncate"
>
{{ s.lead }}
</a>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@
hx-target="#main"
hx-push-url="true"
hx-swap="outerHTML transition:true"
class="link link-muted text-inherit"
class="max-w-lg text-center link link-muted text-inherit line-clamp-2"
>
{{ s.user }}
</a>
Expand Down Expand Up @@ -122,7 +122,7 @@
hx-target="#main"
hx-push-url="true"
hx-swap="outerHTML transition:true"
class="link link-muted text-inherit"
class="max-w-lg text-center link link-muted text-inherit line-clamp-2"
>{{ s.lead }}</a>
</td>
{% endif %}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
hx-get="{% url 'funds:submissions:lead_update' pk=submission.pk %}"
hx-target="#htmx-modal"
>
{% trans "Lead" %}: {{ submission.lead }}
<div class="inline-flex max-w-lg"><span class="truncate">{% trans "Lead" %}: {{ submission.lead }}</span></div>
{% heroicon_micro "pencil-square" class="inline ms-1" aria_hidden=true %}
</a>
{% elif request.user.is_org_faculty or not HIDE_STAFF_IDENTITY %}
Expand Down
Loading