Adding Manual connection point to allow undeclared fits
This commit is contained in:
1 parent
7e246be39c
commit
b4dcb68bea
15 files changed
+227
-23
No files matched your search
@@ -48,4 +48,6 @@
|
||||
{% endfor %}
|
||||
</select>
|
||||
</label>
|
||||
{% elif connection_type == "manual" %}
|
||||
<p>No connection details — fits for this attachment point must be asserted manually.</p>
|
||||
{% endif %}
|
||||
@@ -15,7 +15,7 @@
|
||||
{% set conn_type = "Static Connection" %}
|
||||
{% set conn_label = ap.static_connection.od_mm ~ " mm OD" %}
|
||||
{% else %}
|
||||
{% set conn_type = "—" %}
|
||||
{% set conn_type = "Manual" %}
|
||||
{% set conn_label = "—" %}
|
||||
{% endif %}
|
||||
<tr id="attachment-point-{{ ap.id }}">
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
{% elif ap.unc_thread_id %}{% set current_type = "unc_thread" %}
|
||||
{% elif ap.clamp_connection_id %}{% set current_type = "clamp_connection" %}
|
||||
{% elif ap.static_connection_id %}{% set current_type = "static_connection" %}
|
||||
{% else %}{% set current_type = "" %}{% endif %}
|
||||
{% else %}{% set current_type = "manual" %}{% endif %}
|
||||
<tr id="attachment-point-{{ ap.id }}">
|
||||
<td colspan="6">
|
||||
<form hx-post="/admin/attachment-points/{{ ap.id }}"
|
||||
@@ -41,6 +41,7 @@
|
||||
<option value="unc_thread" {% if current_type == "unc_thread" %}selected{% endif %}>UNC Thread</option>
|
||||
<option value="clamp_connection" {% if current_type == "clamp_connection" %}selected{% endif %}>Clamp Connection</option>
|
||||
<option value="static_connection" {% if current_type == "static_connection" %}selected{% endif %}>Static Connection</option>
|
||||
<option value="manual" {% if current_type == "manual" %}selected{% endif %}>Manual</option>
|
||||
</select>
|
||||
</label>
|
||||
{# Render the current connection select pre-filled #}
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
{% set conn_type = "Static" %}
|
||||
{% set conn_label = apoint.static_connection.od_mm ~ " mm OD" %}
|
||||
{% else %}
|
||||
{% set conn_type = "—" %}
|
||||
{% set conn_type = "Manual" %}
|
||||
{% set conn_label = "—" %}
|
||||
{% endif %}
|
||||
<div id="augmented-part-ap-{{ apoint.id }}" class="ap-item">
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
{% elif apoint.unc_thread_id %}{% set current_type = "unc_thread" %}
|
||||
{% elif apoint.clamp_connection_id %}{% set current_type = "clamp_connection" %}
|
||||
{% elif apoint.static_connection_id %}{% set current_type = "static_connection" %}
|
||||
{% else %}{% set current_type = "" %}{% endif %}
|
||||
{% else %}{% set current_type = "manual" %}{% endif %}
|
||||
{# _attachment_point_connection_select.html expects `ap` for pre-selection #}
|
||||
{% set ap = apoint %}
|
||||
{% set connection_type = current_type %}
|
||||
@@ -29,6 +29,7 @@
|
||||
<option value="unc_thread" {{ "selected" if current_type == "unc_thread" }}>UNC Thread</option>
|
||||
<option value="clamp_connection" {{ "selected" if current_type == "clamp_connection" }}>Clamp Connection</option>
|
||||
<option value="static_connection" {{ "selected" if current_type == "static_connection" }}>Static Connection</option>
|
||||
<option value="manual" {{ "selected" if current_type == "manual" }}>Manual</option>
|
||||
</select>
|
||||
</label>
|
||||
<div id="edit-ap-{{ apoint.id }}-connection-options">
|
||||
|
||||
@@ -31,6 +31,7 @@
|
||||
<option value="unc_thread">UNC Thread</option>
|
||||
<option value="clamp_connection">Clamp Connection</option>
|
||||
<option value="static_connection">Static Connection</option>
|
||||
<option value="manual">Manual</option>
|
||||
</select>
|
||||
</label>
|
||||
<div id="ap-{{ augmented_part_id }}-add-connection-options"></div>
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
{%- elif ap.static_connection -%}
|
||||
Static {{ ap.static_connection.od_mm }} mm OD
|
||||
{%- else -%}
|
||||
—
|
||||
Manual
|
||||
{%- endif -%}
|
||||
{%- endmacro %}
|
||||
|
||||
|
||||
@@ -38,6 +38,7 @@
|
||||
<option value="unc_thread">UNC Thread</option>
|
||||
<option value="clamp_connection">Clamp Connection</option>
|
||||
<option value="static_connection">Static Connection</option>
|
||||
<option value="manual">Manual</option>
|
||||
</select>
|
||||
</label>
|
||||
<div id="add-connection-options"></div>
|
||||
|
||||
Reference in new issue
Block a user