<!DOCTYPE html>
<html>

<head>
    <meta charset="UTF-8">
    <link rel="stylesheet" type="text/css" href="{$interface_base_url}/css/vendor.css" />
    <link rel="stylesheet" type="text/css" href="{$interface_base_url}/css/main.css" />
    <script src="{$interface_base_url}/javascript/vendor.js"></script>
    <script src="{$interface_base_url}/javascript/main.js"></script>

    {hook key=xgx_cronus_interface_head}

</head>
<body>
    <nav class="navbar navbar-default navbar-fixed-top">
        <div class="container-fluid">

            <div class="navbar-header">
                <button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#navbar-top" aria-expanded="false">
                    <span class="sr-only">Navigation ein-/ausblenden</span><span class="icon-bar"></span><span class="icon-bar"></span><span class="icon-bar"></span>
                </button>
                <a class="navbar-brand" href="#"><img src="{$interface_base_url}/images/logo.svg" class="img-responsive" alt=""></a>
            </div>
            <div class="collapse navbar-collapse" id="navbar-top">
                <div class="navbar-form navbar-right">
                    {hook key=xgx_cronus_interface_topnav_before_buttons}

                    <div class="form-group">
                        {form type=form name=configurator link_params=getParams method=post}
                        {form type=hidden name=action value=switchMerchant}
                        <div class="btn-group">
                            <label for="switch-merchant" class="sr-only">{txt key=TEXT_STORE_DATA}</label>
                            <select id="switch-merchant" name="selected_merchant_id" class="selectpicker js-auto-submit" data-relation="true" data-style="btn-default" style="display: none;" tabindex="-98">
                                {foreach $stores as $store}
                                <option value="{$store.id}" {if $selectedMerchantId eq $store.id}selected{/if}>{txt key=TEXT_STORE_DATA}: {$store.text}</option>
                                {/foreach}
                            </select>
                        </div>
                        {form type=formend}
                    </div>

                    <div class="form-group">
                        {form type=form name=configurator link_params=getParams method=post}
                        {form type=hidden name=action value=reload}
                        <button type="submit" class="btn btn-default"> <span class="glyphicon glyphicon-refresh"></span> {txt key=TEXT_XGX_CRONUS_RELOAD}</button>
                        {form type=formend}
                    </div>

                    <div class="form-group">
                        {form type=form name=configurator link_params=getParams method=post}
                        {form type=hidden name=action value=generateCss}
                        {form type=hidden name=plugin_code value=$selectedPlugin}
                        <button type="submit" class="btn btn-default"> <span class="glyphicon glyphicon-pencil"></span> {txt key=TEXT_XGX_CRONUS_GENERATE_CSS}</button>
                        {form type=formend}
                    </div>

                    <div class="form-group">
                        {form type=form name=configurator link_params=getParams method=post}
                        {form type=hidden name=action value=cleanCache}
                        <button type="submit" class="btn btn-success"> <span class="glyphicon glyphicon-repeat"></span> {txt key=TEXT_XGX_CRONUS_CLEAN_CACHE}</button>
                        {form type=formend}
                    </div>

                    {hook key=xgx_cronus_interface_topnav_after_buttons}
                </div>
            </div>
        </div>
    </nav>


    <div class="main-wrapper">
        <div class="side-bar">
            {form type=form name=configurator link_params=getParams method=post}
            {form type=hidden name=action value=switchPlugin}
            {form type=hidden name=selected_plugin value=''}
            <ul class="js-switch-plugin" role="tablist">
                <li {if $selectedPlugin eq 'xgx_cronus'}class="active"{/if}><button class="btn btn-default btn-block" type="button" data-plugin="xgx_cronus">{txt key=TEXT_XGX_CRONUS_OVERVIEW}</button></li><hr>
                {hook key=xgx_cronus_interface_side_bar}
            </ul>
            {form type=formend}
        </div>
        <div class="main-content">
            <div class="tab-content">
                {hook key=xgx_cronus_interface_tab_content}
            </div>
        </div>
    </div>


    <div class="modal fade js-info-handler" tabindex="-1" role="dialog" data-loading='<p>{txt key=TEXT_XGX_CRONUS_LOADING} <i class="fa fa-fw fa-refresh fa-spin" aria-hidden="true"></i></p>'>
        <div class="modal-dialog" role="document">
            <div class="modal-content">
                <div class="modal-header">
                    <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
                    <h4 class="modal-title">{txt key=TEXT_XGX_CRONUS_LOADING_HEADER}</h4>
                </div>
                <div class="modal-body">{if $message}{$message}{/if}</div>
            </div>
        </div>
    </div>

    <!-- Modal -->
    <div class="modal no-save fade" id="reportModal" tabindex="-1" role="dialog" aria-labelledby="reportModalLabel" aria-hidden="true">
        <div class="modal-dialog" role="document">
            <div class="modal-content">
                {form type=form name=configurator link_params=getParams method=post}
                {form type=hidden name=action value=sendReport}
                {form type=hidden name=plugin_code value=$selectedPlugin}
                <div class="modal-header">
                    <h4 class="modal-title" id="reportModalLabel">{txt key=TEXT_XGX_CRONUS_REPORT} </h4>
                    <button type="button" class="close" data-dismiss="modal" aria-label="Close">
                        <span aria-hidden="true">&times;</span>
                    </button>
                </div>
                <div class="modal-body">
                    <div class="form-group row">
                        <div class="col-sm-12">
                            <input id="inputFirstname" name="report_firstname" type="text" class="form-control" placeholder="{txt key=TEXT_XGX_USER_FIRSTNAME}" required="">
                        </div>
                    </div>

                    <div class="form-group row">
                        <div class="col-sm-12">
                            <input id="inputLastname" name="report_lastname" type="text" class="form-control" placeholder="{txt key=TEXT_XGX_USER_LASTNAME}" required="">
                        </div>
                    </div>

                    <div class="form-group row">
                        <div class="col-sm-12">
                            <input id="inputPhone" name="report_phone" type="text" class="form-control" pattern="[0-9+]*" minlength="10" placeholder="{txt key=TEXT_XGX_USER_PHONENUMBER}" required="">
                        </div>
                    </div>

                    <div class="form-group row">
                        <div class="col-sm-12">
                            <textarea id="inputComment" name="report_comment" class="form-control" placeholder="{txt key=TEXT_XGX_USER_COMMENT}"></textarea>
                        </div>
                    </div>

                    <div class="form-group row">
                        <div class="col-sm-12">
                            <p>
                                {txt key=TEXT_XGX_CRONUS_SEND_FILES}
                            </p>
                            <div class="checkbox">
                                <label><input id="inputCheckAcceptedSendFiles" name="report_accepted_send_files" class="form-check-input" type="checkbox" value="true">{txt key=TEXT_XGX_CRONUS_ACCEPT_SEND_FILES}</label>
                            </div>
                        </div>
                    </div>
                </div>
                <div class="modal-footer">
                    <button type="button" class="btn btn-secondary" data-dismiss="modal">{txt key=TEXT_XGX_CRONUS_RESET}</button>
                    <button type="submit" class="btn btn-primary">{txt key=TEXT_XGX_CRONUS_SEND}</button>
                </div>
                {form type=formend}
            </div>
        </div>
    </div>

    {hook key=xgx_cronus_interface_body_end}

</body>

</html>