{extends file="config.tpl"}

{block name="content"}
<form method="POST" action="{$modulelink}&amp;page=quote" autocomplete="off">
    <div class="row">
        <div class="col-md-12">
            <h2><i class="fas fa-file-invoice-dollar"></i> Quote</h2>
        </div>
    </div>
    <div class="row">
        <div class="col-md-6">
            <h4 class="mb-3">Items</h4>
            <div class="row">

                <div class="form-group col-md-4">
                    <label for="quote_table_header_show">Show headers</label>
                    <select class="form-control" name="quote_table_header_show">
                        <option value="true"{if $config.quote_table_header_show eq 'true'} selected{/if}>Yes</option>
                        <option value="false"{if $config.quote_table_header_show eq 'false'} selected{/if}>No</option>
                    </select>
                </div>
                <div class="form-group col-md-4">
                    <label for="quote_qty_show">Show Quantity</label>
                    <select class="form-control" name="quote_qty_show">
                        <option value="always"{if $config.quote_qty_show eq 'always'} selected{/if}>Always</option>
                        <option value="auto"{if $config.quote_qty_show eq 'auto'} selected{/if}>Automatic</option>
                    </select>
                </div>
                <div class="form-group col-md-4">
                    <label for="quote_discount_show">Show Discount</label>
                    <select class="form-control" name="quote_discount_show">
                        <option value="always"{if $config.quote_discount_show eq 'always'} selected{/if}>Always</option>
                        <option value="auto"{if $config.quote_discount_show eq 'auto'} selected{/if}>Automatic</option>
                    </select>
                </div>
                <div class="form-group col-md-4">
                    <label for="quote_items_firstline_bold">Bold first item lines</label>
                    <select class="form-control" name="quote_items_firstline_bold">
                        <option value="true"{if $config.quote_items_firstline_bold eq 'true'} selected{/if}>Yes</option>
                        <option value="false"{if $config.quote_items_firstline_bold eq 'false'} selected{/if}>No</option>
                    </select>
                </div>
                <div class="form-group col-md-4">
                    <label for="quote_qty_width">Quantity width</label>
                    <div class="input-group">
                        <input type="number" pattern="\d+" class="form-control" name="quote_qty_width" value="{$config.quote_qty_width}" required>
                        <span class="input-group-addon">%</span>
                    </div>
                </div>
                <div class="form-group col-md-4">
                    <label for="quote_desc_width">Desc. width</label>
                    <div class="input-group">
                        <input type="number" pattern="\d+" class="form-control" name="quote_desc_width" value="{$config.quote_desc_width}" required>
                        <span class="input-group-addon">%</span>
                    </div>
                </div>
                <div class="form-group col-md-4">
                    <label for="quote_unit_width">Unit width</label>
                    <div class="input-group">
                        <input type="number" pattern="\d+" class="form-control" name="quote_unit_width" value="{$config.quote_unit_width}" required>
                        <span class="input-group-addon">%</span>
                    </div>
                </div>
                <div class="form-group col-md-4">
                    <label for="quote_discount_width">Discount width</label>
                    <div class="input-group">
                        <input type="number" pattern="\d+" class="form-control" name="quote_discount_width" value="{$config.quote_discount_width}" required>
                        <span class="input-group-addon">%</span>
                    </div>
                </div>
                <div class="form-group col-md-4">
                    <label for="quote_amount_width">Amount width</label>
                    <div class="input-group">
                        <input type="number" pattern="\d+" class="form-control" name="quote_amount_width" value="{$config.quote_amount_width}" required>
                        <span class="input-group-addon">%</span>
                    </div>
                </div>
                <div class="col-md-12">
                    <div class="alert alert-info" role="alert">
                        Please make sure that column widths add up to 100
                    </div>
                </div>
            </div>
        </div>
        <div class="col-md-12">
            <hr class="mb-4">
        </div>
    </div>

    <div class="btn-group" role="group" aria-label="...">
        <button type="submit" class="btn btn-primary"><i class="fas fa-save"></i> Save</button>
    </div>

</form>
{/block}
