{% load i18n %}
{# String value display and editing template #}

<!-- String value editing -->
<h3>{% trans 'String Value' %}</h3>
<br>
{% if allow_key_edit %}
<form method="post" class="value-form">
    {% csrf_token %}
    <input type="hidden" name="action" value="update_value">
    <div class="form-row">
        <div class="field-box">
            <textarea id="new_value" name="new_value" class="string-value-field" rows="5">{{ key_data.value }}</textarea>
            <div class="help">{% trans 'Edit the string value directly.' %}</div>
        </div>
        <div class="submit-row">
            <input type="submit" value="{% trans 'Update Value' %}" class="default">
        </div>
    </div>
</form>
{% else %}
<div class="form-row">
    <div class="field-box">
        <textarea class="string-value-field" rows="5" readonly disabled>{{ key_data.value }}</textarea>
        <div class="help">{% trans 'Value editing is disabled for this instance.' %}</div>
    </div>
    <div class="submit-row">
        <input type="button" value="{% trans 'Value Edit Disabled' %}" class="default" disabled>
    </div>
</div>
{% endif %}
