- Kompletna Go implementacija licencnog servera (19 Go fajlova) - Klijentski API: activate, deactivate, validate - Admin API: CRUD licence, stats, audit log - Admin dashboard: htmx + Go templates - RSA-2048 potpisivanje licencnih podataka - Rate limiting i API key autentifikacija - MySQL migracije i seed podaci (ESIR, ARV, LIGHT_TICKET) - Unit testovi: keygen, crypto, model, middleware (24 testa) - Dokumentacija: SPEC.md, ARCHITECTURE.md, SETUP.md, API.md, TESTING.md, README.md Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
67 lines
2.1 KiB
HTML
67 lines
2.1 KiB
HTML
{{define "license-new.html"}}{{template "app" .}}{{end}}
|
|
{{define "page-title"}}Nova licenca - DAL License Server{{end}}
|
|
{{define "page-content"}}
|
|
<h1>Nova licenca</h1>
|
|
|
|
{{if .Error}}<div class="alert alert-error">{{.Error}}</div>{{end}}
|
|
|
|
<form method="POST" action="/licenses" class="form-card">
|
|
<div class="form-row">
|
|
<div class="form-group">
|
|
<label>Proizvod</label>
|
|
<select name="product_id" required>
|
|
{{range .Products}}
|
|
<option value="{{.ID}}">{{.Name}} ({{.Code}})</option>
|
|
{{end}}
|
|
</select>
|
|
</div>
|
|
<div class="form-group">
|
|
<label>Tip licence</label>
|
|
<select name="license_type" required>
|
|
<option value="MONTHLY">Mesecna (30 dana)</option>
|
|
<option value="ANNUAL">Godisnja (365 dana)</option>
|
|
<option value="PERPETUAL">Trajna</option>
|
|
<option value="TRIAL">Trial (30 dana)</option>
|
|
</select>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="form-row">
|
|
<div class="form-group">
|
|
<label>Firma</label>
|
|
<input type="text" name="customer_name" required>
|
|
</div>
|
|
<div class="form-group">
|
|
<label>PIB</label>
|
|
<input type="text" name="customer_pib">
|
|
</div>
|
|
</div>
|
|
|
|
<div class="form-group">
|
|
<label>Email</label>
|
|
<input type="email" name="customer_email">
|
|
</div>
|
|
|
|
<div class="form-row">
|
|
<div class="form-group">
|
|
<label>Limiti (JSON)</label>
|
|
<input type="text" name="limits" placeholder='{"max_operators": 3}'>
|
|
</div>
|
|
<div class="form-group">
|
|
<label>Grace period (dani)</label>
|
|
<input type="number" name="grace_days" value="30">
|
|
</div>
|
|
</div>
|
|
|
|
<div class="form-group">
|
|
<label>Napomena</label>
|
|
<textarea name="notes" rows="2"></textarea>
|
|
</div>
|
|
|
|
<div class="form-actions">
|
|
<button type="submit" class="btn btn-primary">Kreiraj licencu</button>
|
|
<a href="/licenses" class="btn">Otkazi</a>
|
|
</div>
|
|
</form>
|
|
{{end}}
|