Files
skeleton-api/app/templates/admin/_augmented_part_attachment_points.html
T

39 lines
1.6 KiB
HTML

<div id="ap-{{ augmented_part_id }}-attachment-points" class="ap-inline-section">
<h3>Attachment Points</h3>
{% for apoint in attachment_points_list %}
{% include "admin/_augmented_part_ap_row.html" %}
{% else %}
<p class="muted" style="font-size:0.85rem;margin:0 0 0.5rem">No attachment points yet.</p>
{% endfor %}
<form hx-post="/admin/augmented-parts/{{ augmented_part_id }}/attachment-points"
hx-target="#ap-{{ augmented_part_id }}-attachment-points"
hx-swap="outerHTML"
class="inline-edit" style="margin-top:0.5rem">
<label>Name
<select name="attachment_point_name_id" required>
<option value="">— select —</option>
{% for apn in attachment_point_names %}
<option value="{{ apn.id }}">{{ apn.name }}</option>
{% endfor %}
</select>
</label>
<label>Type
<select name="connection_type" required
hx-get="/admin/attachment-points/connection-options"
hx-target="#ap-{{ augmented_part_id }}-add-connection-options"
hx-trigger="change"
hx-include="[name='connection_type']">
<option value="">— type —</option>
<option value="iso_thread">ISO Thread</option>
<option value="unc_thread">UNC Thread</option>
<option value="clamp_connection">Clamp Connection</option>
<option value="static_connection">Static Connection</option>
</select>
</label>
<div id="ap-{{ augmented_part_id }}-add-connection-options"></div>
<button type="submit" class="btn btn-primary">Add</button>
</form>
</div>