<div class="row">
    <div class="col-lg-12 content-right">

        <h3>Mass action</h3>

        <!-- Load buttons -->
        <div class='btn btn-default' onclick='LS.plugin.massAction.loadQuestions();'>Load questions</div>
        <div class='btn btn-default' onclick='LS.plugin.massAction.loadQuestionGroups();'>Load question groups</div>
        <div class='btn btn-default' onclick='LS.plugin.massAction.loadTokens();'>Load tokens</div>

        <!-- Save spinner -->
        <div id='mass-action-saving' class='hide' style='display: inline-block;'><span class='fa fa-spinner fa-spin'></span>&nbsp;Saving data...</div>
        <div id='mass-action-saving-done' class='hide' style='display: inline-block;'><span class='fa fa-check'></span>&nbsp;All changes saved</div>
        <div id='mass-action-saving-error' class='hide' style='display: inline-block;'><span class='fa fa-exclamation'></span>&nbsp;<span id='mass-action-error-message'></span></div>

        <p></p> <!-- Some margin -->

        <input id='mass-action-search-field' name='mass-action-search-field' class='form-control width-20' value='' type='text' placeholder="Search" />
        <input id='mass-action-replace-field' name='mass-action-replace-field' class='form-control width-20' value='' type='text' placeholder="Replace" />
        <button id='mass-action-replace-button' name='mass-action-replace-button' class='btn btn-default'>Replace all</button>

        <p></p> <!-- Some margin -->

        <div id="handsontable">
        </div>

        {{YII_CSRF_TOKEN}}

    </div>
</div>

<script>

// Namespace
var LS = LS || {};
LS.plugin = LS.plugin || {};
LS.plugin.massAction = LS.plugin.massAction || {};

LS.plugin.massAction.getQuestionsLink = '{{getQuestionsLink}}';
LS.plugin.massAction.getQuestionGroupsLink = '{{getQuestionGroupsLink}}';
LS.plugin.massAction.getTokensLink = '{{getTokensLink}}';
LS.plugin.massAction.saveQuestionChangeLink = '{{saveQuestionChangeLink}}';
LS.plugin.massAction.saveQuestionGroupChangeLink = '{{saveQuestionGroupChangeLink}}';
LS.plugin.massAction.saveTokenChangeLink = '{{saveTokenChangeLink}}';
LS.plugin.massAction.surveyId = '{{surveyId}}';

</script>
