diff --git a/calendars/__pycache__/forms.cpython-313.pyc b/calendars/__pycache__/forms.cpython-313.pyc index 3152b2e..33e203b 100644 Binary files a/calendars/__pycache__/forms.cpython-313.pyc and b/calendars/__pycache__/forms.cpython-313.pyc differ diff --git a/calendars/forms.py b/calendars/forms.py index 092d222..af669f9 100644 --- a/calendars/forms.py +++ b/calendars/forms.py @@ -50,5 +50,5 @@ class GameResultForm(forms.ModelForm): guest_team = game.team.name for i in range(1, game.number_of_innings + 1): - self.fields[f'inning_{i}_home'] = forms.IntegerField(label=f'Inning {i} ({home_team})', required=False) - self.fields[f'inning_{i}_guest'] = forms.IntegerField(label=f'Inning {i} ({guest_team})', required=False) + self.fields[f'inning_{i}_home'] = forms.IntegerField(label=f'Inning {i} ({home_team})', required=False, widget=forms.NumberInput(attrs={'class': 'inning-score-input'})) + self.fields[f'inning_{i}_guest'] = forms.IntegerField(label=f'Inning {i} ({guest_team})', required=False, widget=forms.NumberInput(attrs={'class': 'inning-score-input'})) diff --git a/calendars/templates/calendars/record_results.html b/calendars/templates/calendars/record_results.html index 6f2a46c..7940ac0 100644 --- a/calendars/templates/calendars/record_results.html +++ b/calendars/templates/calendars/record_results.html @@ -17,10 +17,11 @@ {% for item in form_fields_by_inning %} {{ item.inning }} {% endfor %} + Total - + {% if game.is_home_game %} {{ game.team.name }} (Home) @@ -31,8 +32,9 @@ {% for item in form_fields_by_inning %} {{ item.home }} {% endfor %} + 0 - + {% if not game.is_home_game %} {{ game.team.name }} (Guest) @@ -43,6 +45,7 @@ {% for item in form_fields_by_inning %} {{ item.guest }} {% endfor %} + 0 @@ -53,3 +56,36 @@ {% endblock %} + +{% block javascript %} + +{% endblock %} \ No newline at end of file diff --git a/db.sqlite3 b/db.sqlite3 index 95ffdda..5098404 100644 Binary files a/db.sqlite3 and b/db.sqlite3 differ diff --git a/templates/base.html b/templates/base.html index 4abc5c9..f311321 100644 --- a/templates/base.html +++ b/templates/base.html @@ -19,6 +19,10 @@ background-color: #fff3cd; /* light yellow background */ border-color: #ffc107; /* yellow border */ } + .inning-score-input { + width: 50px; /* Adjust as needed */ + text-align: center; + }