<div class="card-body">
    <h5>{{ 'Stock control settings'|trans }}</h5>

    <h5>{{ 'Plugin'|trans }}</h5>
    <form method="post" action="{{ 'api/admin/product/update'|link }}" class="api-form save" data-api-msg="{{ 'Settings updated'|trans }}">
        <input type="hidden" name="CSRFToken" value="{{ CSRFToken }}"/>
        <div class="form-group mb-3 row">
            <label class="form-label col-3 col-form-label">{{ 'Plugin name'|trans }}:</label>
            <div class="col">
                <input class="form-control" type="text" name="plugin" value="{{ product.plugin }}">
            </div>
        </div>
        <input type="hidden" name="id" value="{{ product.id }}">
        <input type="submit" value="{{ 'Update'|trans }}" class="btn btn-primary">
    </form>
    <hr>

    <form method="post" action="{{ 'api/admin/product/update_config'|link }}" class="mainForm save api-form" data-api-reload="1">
        <input type="hidden" name="CSRFToken" value="{{ CSRFToken }}"/>
        <h6>Custom parameters</h6>
        {% for k, v in product.config %}
        <div class="form-group mb-3 row">
            <label class="form-label col-3 col-form-label">{{ k }}:</label>
            <div class="col">
                <input class="form-control" type="text" name="config[{{ k }}]" value="{{ v }}">
            </div>
        </div>
        {% endfor %}

        <h6>Add custom parameter</h6>
        <div class="form-group mb-3 row">
            <label class="form-label col-3 col-form-label">{{ 'Parameter name'|trans }}:</label>
            <div class="col">
                <input class="form-control" type="text" name="new_config_name">
            </div>
        </div>

        <div class="form-group mb-3 row">
            <label class="form-label col-3 col-form-label">{{ 'Parameter value'|trans }}:</label>
            <div class="col">
                <textarea class="form-control" name="new_config_value" rows="7"></textarea>
            </div>
        </div>
        <input type="hidden" name="id" value="{{ product.id }}">
        <input type="submit" value="{{ 'Update configuration fields'|trans }}" class="btn btn-primary">
    </form>
</div>
