Phase 2.9 complete
This commit is contained in:
@@ -66,6 +66,38 @@
|
||||
<button type="submit" class="btn btn-primary"><i class="fas fa-check"></i> Save changes</button>
|
||||
</div>
|
||||
</form>
|
||||
|
||||
{% if project.category == 'non_pack' %}
|
||||
<div class="card" style="margin-top: 20px;">
|
||||
<h2><i class="fas fa-film"></i> Animation Director ID</h2>
|
||||
<p class="bio-help">The <code>animationframework.id</code> that applications use to check for updates.</p>
|
||||
<form method="post" action="{% url 'library:regenerate_metadata' project.slug %}">
|
||||
{% csrf_token %}
|
||||
<div class="form-row">
|
||||
<div class="form-group">
|
||||
<label for="edit_af_namespace">Namespace</label>
|
||||
<input type="text" id="edit_af_namespace" name="af_namespace" value="{{ anim_edit.namespace }}" autocomplete="off">
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="edit_af_pack_id">Pack ID</label>
|
||||
<input type="text" id="edit_af_pack_id" name="af_pack_id" value="{{ anim_edit.pack_id }}" autocomplete="off">
|
||||
</div>
|
||||
</div>
|
||||
<p class="bio-help">
|
||||
Current ID:
|
||||
{% if anim_edit.current %}
|
||||
<code>{{ anim_edit.current }}</code>
|
||||
{% else %}
|
||||
<em>none</em>
|
||||
{% endif %}
|
||||
· Full ID: <code id="edit-af-preview">{{ anim_edit.namespace }}:{{ anim_edit.pack_id }}</code>
|
||||
</p>
|
||||
<div class="form-actions">
|
||||
<button type="submit" class="btn btn-secondary"><i class="fas fa-sync"></i> Regenerate metadata</button>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
{% endif %}
|
||||
{% endblock %}
|
||||
|
||||
{% block extra_js %}
|
||||
@@ -78,10 +110,19 @@
|
||||
(function () {
|
||||
const cat = document.getElementById('id_category');
|
||||
const group = document.getElementById('description-group');
|
||||
if (!cat || !group) return;
|
||||
function toggle() { group.style.display = cat.value === 'guide' ? 'none' : ''; }
|
||||
cat.addEventListener('change', toggle);
|
||||
toggle();
|
||||
if (cat && group) {
|
||||
function toggle() { group.style.display = cat.value === 'guide' ? 'none' : ''; }
|
||||
cat.addEventListener('change', toggle);
|
||||
toggle();
|
||||
}
|
||||
const ns = document.getElementById('edit_af_namespace');
|
||||
const pid = document.getElementById('edit_af_pack_id');
|
||||
const preview = document.getElementById('edit-af-preview');
|
||||
if (ns && pid && preview) {
|
||||
function update() { preview.textContent = ns.value + ':' + pid.value; }
|
||||
ns.addEventListener('input', update);
|
||||
pid.addEventListener('input', update);
|
||||
}
|
||||
})();
|
||||
</script>
|
||||
{% endblock %}
|
||||
|
||||
Reference in New Issue
Block a user