Skip to content

Commit 850e1b9

Browse files
JacobCoffeeclaude
andcommitted
fix: regenerate button styling, revision numbering, lock guard
- Regenerate only visible when sponsorship is unlocked - New contract revision = count of historical contracts (not always 0) - Regenerate/Cancel buttons use all:unset for consistent sizing - Add Assets download and Sponsor View buttons to detail page Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent 83b8d67 commit 850e1b9

1 file changed

Lines changed: 9 additions & 7 deletions

File tree

apps/sponsors/templates/sponsors/manage/sponsorship_detail.html

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -348,13 +348,15 @@ <h2>Contract</h2>
348348
</div>
349349

350350
<!-- Regenerate confirmation -->
351-
<div id="regenerate-confirm" style="display:none;margin-top:12px;padding:12px;background:#fff8dc;border:1px solid #ffd43b;border-radius:4px;">
352-
<p style="font-size:13px;margin:0 0 8px;">This will mark the current contract as outdated and create a new draft from the current sponsorship data.</p>
353-
<form method="post" action="{% url 'manage_contract_regenerate' sponsorship.pk %}" style="display:inline;">
354-
{% csrf_token %}
355-
<button type="submit" class="btn btn-sm btn-gold">Regenerate Contract</button>
356-
</form>
357-
<button type="button" onclick="this.parentElement.style.display='none'" style="font-size:12px;margin-left:8px;background:none;border:none;color:#999;cursor:pointer;">Cancel</button>
351+
<div id="regenerate-confirm" style="display:none;margin-top:12px;padding:12px 16px;background:#fff8dc;border:1px solid #ffd43b;border-radius:4px;">
352+
<p style="font-size:13px;margin:0 0 10px;color:#555;">This will mark the current contract as outdated and create a new draft from the current sponsorship data.</p>
353+
<div style="display:flex;gap:8px;align-items:center;">
354+
<form method="post" action="{% url 'manage_contract_regenerate' sponsorship.pk %}" style="display:inline;">
355+
{% csrf_token %}
356+
<button type="submit" style="all:unset !important;display:inline-flex !important;align-items:center !important;height:34px !important;padding:0 16px !important;font-size:13px !important;font-weight:600 !important;background:#ffd43b !important;color:#1a1a2e !important;border-radius:4px !important;cursor:pointer !important;font-family:inherit !important;">Regenerate</button>
357+
</form>
358+
<button type="button" onclick="this.closest('#regenerate-confirm').style.display='none'" style="all:unset !important;display:inline-flex !important;align-items:center !important;height:34px !important;padding:0 16px !important;font-size:13px !important;font-weight:600 !important;background:#f0f0f0 !important;color:#333 !important;border-radius:4px !important;cursor:pointer !important;font-family:inherit !important;">Cancel</button>
359+
</div>
358360
</div>
359361
</div>
360362

0 commit comments

Comments
 (0)