{extends file="config.tpl"}

{block name="content"}
<form method="POST" action="{$modulelink}&amp;page=company" autocomplete="off">
    <div class="row">
        <div class="col-md-12">
            <h2><i class="fas fa-building"></i> Company details</h2>

            <div class="row">
                <div class="form-group col-md-12">
                    <div class="radio">
                        <label>
                            <input type="radio" name="company_show" value="all"{if $config.company_show eq 'all'} checked{/if}>
                            Show on all pages
                        </label>
                    </div>
                    {if $swissqr}
                        <div class="radio">
                            <label>
                                <input type="radio" name="company_show" value="noslip"{if $config.company_show eq 'noslip'} checked{/if}>
                                Show on all pages except when Swiss QR payment slip is present
                            </label>
                        </div>
                    {/if}
                    <div class="radio">
                        <label>
                            <input type="radio" name="company_show" value="first"{if $config.company_show eq 'first'} checked{/if}>
                            Show on first page
                        </label>
                    </div>
                    <div class="radio">
                        <label>
                            <input type="radio" name="company_show" value="last"{if $config.company_show eq 'last'} checked{/if}>
                            Show on last page
                        </label>
                    </div>
                    <div class="radio">
                        <label>
                            <input type="radio" name="company_show" value="never"{if !$config.company_show or $config.company_show eq 'never'} checked{/if}>
                            Never show
                        </label>
                    </div>
                </div>
            </div>
            <div class="row">
                <div class="form-group col-md-3">
                    <label for="company_position_x">Position</label>
                    <div class="input-group">
                        <span class="input-group-addon">X</span>
                        <input type="number" step="0.1" pattern="\d+" class="form-control" name="company_position_x" value="{$config.company_position_x}" required>
                        <span class="input-group-addon">mm</span>
                    </div>
                </div>
                <div class="form-group col-md-3">
                    <label for="company_position_y">&nbsp;</label>
                    <div class="input-group">
                        <span class="input-group-addon">Y</span>
                        <input type="number" step="0.1" pattern="\d+" class="form-control" name="company_position_y" value="{$config.company_position_y}" required>
                        <span class="input-group-addon">mm</span>
                    </div>
                </div>
            </div>
            <div class="row">
                <div class="form-group col-md-12">
                    <label for="company_text">Text</label>
                    <textarea class="tinymce form-control" rows="12" name="company_text">{$config.company_text}</textarea>
                    {include file="editor.tpl"}
                </div>
            </div>
            <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}
