Files
dog_training/templates/components/dog/_row_command.html

62 lines
3.5 KiB
HTML

{% if is_blank_row %}
<tr class="{{ model.FLAG_ROW_NEW }} {{ model.FLAG_COMMAND }}" {{ model.ATTR_ID_COMMAND }}>
<td class="{{ model.FLAG_COMMAND_CATEGORY }} {{ model.FLAG_DDL_PREVIEW }}">
{% include 'components/dog/_preview_DDL_command_category.html' %}
</td>
<td class="{{ model.FLAG_NAME }}">
<input type="text"
class="{{ model.FLAG_NAME }}"
{{ model.ATTR_VALUE_CURRENT }} {{ model.ATTR_VALUE_PREVIOUS }} />
</td>
<td class="{{ model.FLAG_HAND_SIGNAL_DEFAULT_DESCRIPTION }}">
<input type="text"
class="{{ model.FLAG_HAND_SIGNAL_DEFAULT_DESCRIPTION }}"
{{ model.ATTR_VALUE_CURRENT }} {{ model.ATTR_VALUE_PREVIOUS }} />
</td>
<td class="{{ model.FLAG_CAN_HAVE_BUTTON }}">
<input type="checkbox" class="{{ model.FLAG_CAN_HAVE_BUTTON }}" {{ model.ATTR_VALUE_CURRENT }} {{ model.ATTR_VALUE_PREVIOUS }}="false" />
</td>
<td class="{{ model.FLAG_NOTES }}">
<input type="text"
class="{{ model.FLAG_NOTES }}"
{{ model.ATTR_VALUE_CURRENT }} {{ model.ATTR_VALUE_PREVIOUS }} />
</td>
{% set active = True %}
{% include 'components/dog/_td_active.html' %}
</tr>
{% else %}
<tr class="{{ model.FLAG_COMMAND }}" {{ model.ATTR_ID_COMMAND }}="{{ command.id_command }}">
{% set command_category = command.command_category %}
<td class="{{ model.FLAG_COMMAND_CATEGORY }} {{ model.FLAG_DDL_PREVIEW }}">
{% include 'components/dog/_preview_DDL_command_category.html' %}
</td>
<td class="{{ model.FLAG_NAME }}">
<input type="text"
class="{{ model.FLAG_NAME }}"
{{ model.ATTR_VALUE_CURRENT }}="{{ model.format_null_string_as_blank(command.name)|escape }}"
{{ model.ATTR_VALUE_PREVIOUS }}="{{ model.format_null_string_as_blank(command.name)|escape }}"
value="{{ model.format_null_string_as_blank(command.name) }}" />
</td>
<td class="{{ model.FLAG_HAND_SIGNAL_DEFAULT_DESCRIPTION }}">
<input type="text"
class="{{ model.FLAG_HAND_SIGNAL_DEFAULT_DESCRIPTION }}"
{{ model.ATTR_VALUE_CURRENT }}="{{ model.format_null_string_as_blank(command.hand_signal_default_description)|escape }}"
{{ model.ATTR_VALUE_PREVIOUS }}="{{ model.format_null_string_as_blank(command.hand_signal_default_description)|escape }}"
value="{{ model.format_null_string_as_blank(command.hand_signal_default_description) }}" />
</td>
<td class="{{ model.FLAG_CAN_HAVE_BUTTON }}">
<input type="checkbox" {% if command.can_have_button %}checked{% endif %} class="{{ model.FLAG_CAN_HAVE_BUTTON }}" {{ model.ATTR_VALUE_CURRENT }}="{{ command.can_have_button|lower }}" {{ model.ATTR_VALUE_PREVIOUS }}="{{ command.can_have_button|lower }}" />
</td>
<td class="{{ model.FLAG_NOTES }}">
<input type="text"
class="{{ model.FLAG_NOTES }}"
{{ model.ATTR_VALUE_CURRENT }}="{{ model.format_null_string_as_blank(command.notes)|escape }}"
{{ model.ATTR_VALUE_PREVIOUS }}="{{ model.format_null_string_as_blank(command.notes)|escape }}"
value="{{ model.format_null_string_as_blank(command.notes) }}" />
</td>
{% set active = command.active %}
{% include 'components/dog/_td_active.html' %}
</tr>
{% endif %}