Style the coach news form's photo picker, reword the footer note

The bare native file input (browser-chrome "Choose Files" button) clashed
with every other styled field on the screen -- new .m-file-input component
class mirrors management's own .file-input treatment, recolored for the
mobile palette. Also "Linked to {team}" reads clearer than "Posted for
{team}" now that the field is a hard-locked link, not a free-text audience.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This commit is contained in:
2026-08-23 17:51:00 +02:00
parent 148f3a24c9
commit c4069f73c7
4 changed files with 53 additions and 2 deletions

View File

@@ -668,6 +668,7 @@ class CoachCreateNewsView(CoachScopeMixin, LoginRequiredMixin, TemplateView):
def build_photo_form(self, data=None, files=None):
photo_form = NewsPhotoUploadForm(data, files)
photo_form.fields["images"].required = False
photo_form.fields["images"].widget.attrs["class"] = "m-file-input"
return photo_form
def get_context_data(self, **kwargs):

View File

@@ -50,6 +50,6 @@
{% for error in photo_form.images.errors %}<p class="mt-1 text-xs text-club-dark">{{ error }}</p>{% endfor %}
</div>
<p class="px-1 text-xs text-dim">{% blocktrans with team=active_team.name %}Posted for {{ team }} and sent to an editor for review before it goes out to families -- they can widen who it reaches if needed.{% endblocktrans %}</p>
<p class="px-1 text-xs text-dim">{% blocktrans with team=active_team.name %}Linked to {{ team }} and sent to an editor for review before it goes out to families -- they can widen who it reaches if needed.{% endblocktrans %}</p>
</form>
{% endblock content %}