View | Details | Raw Unified | Return to bug 20248
Collapse All | Expand All

(-)a/admin/searchengine/elasticsearch/mappings.pl (-1 / +1 lines)
Lines 97-103 if ( $op eq 'edit' ) { Link Here
97
        $schema->storage->txn_commit;
97
        $schema->storage->txn_commit;
98
    }
98
    }
99
}
99
}
100
elsif( $op eq 'reset' || $op eq 'reset_confirmed' ) {
100
elsif( $op eq 'reset_confirmed' ) {
101
    Koha::SearchMarcMaps->delete;
101
    Koha::SearchMarcMaps->delete;
102
    Koha::SearchFields->delete;
102
    Koha::SearchFields->delete;
103
    Koha::SearchEngine::Elasticsearch->reset_elasticsearch_mappings;
103
    Koha::SearchEngine::Elasticsearch->reset_elasticsearch_mappings;
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/searchengine/elasticsearch/mappings.tt (-6 / +4 lines)
Lines 113-130 a.add, a.delete { Link Here
113
    [% IF reset_confirm %]
113
    [% IF reset_confirm %]
114
        <div class="dialog alert">
114
        <div class="dialog alert">
115
            <h3>The current mappings you see on the screen will be erased and replaced by the mappings in the mappings.yaml file.</h3>
115
            <h3>The current mappings you see on the screen will be erased and replaced by the mappings in the mappings.yaml file.</h3>
116
            <form action="?" method="post">
116
            <form method="post">
117
                <input type="hidden" name="op" value="reset_confirmed" />
117
                <input type="hidden" name="op" value="reset_confirmed" />
118
                <button type="submit" class="approve"><i class="fa fa-fw fa-check"></i> Yes, reset mappings</button>
118
                <button type="submit" class="approve"><i class="fa fa-fw fa-check"></i> Yes, reset mappings</button>
119
            </form>
119
            </form>
120
            <br>
120
            <br>
121
            <form action="?" method="post">
121
            <form method="post">
122
                <button type="submit" class="deny"><i class="fa fa-fw fa-remove"></i> No, do not reset mappings</button>
122
                <button type="submit" class="deny"><i class="fa fa-fw fa-remove"></i> No, do not reset mappings</button>
123
            </form>
123
            </form>
124
        </div>
124
        </div>
125
    [% END %]
125
    [% END %]
126
    <form method="post">
126
    <form method="post">
127
        <input type="hidden" name="op" value="edit" />
128
        <div id="tabs" class="toptabs" style="clear:both">
127
        <div id="tabs" class="toptabs" style="clear:both">
129
            <ul>
128
            <ul>
130
                <li><a href="#search_fields">Search fields</a></li>
129
                <li><a href="#search_fields">Search fields</a></li>
Lines 313-320 a.add, a.delete { Link Here
313
            [% END %]
312
            [% END %]
314
        </div>
313
        </div>
315
        <p>
314
        <p>
316
            <button class="btn btn-default" type="submit"><i class="fa fa-hdd-o" aria-hidden="true"></i> Save</button>
315
            <button class="btn btn-default" type="submit" name="op" value="edit"><i class="fa fa-hdd-o" aria-hidden="true"></i> Save</button>
317
            <a class="btn btn-default" href="?op=reset_confirm"><i class="fa fa-refresh" aria-hidden="true"></i> Reset Mappings</a>
316
            <button class="btn btn-default" type="submit" name="op" value="reset_confirm"><i class="fa fa-refresh" aria-hidden="true"></i> Reset Mappings</button>
318
        </p>
317
        </p>
319
    </form>
318
    </form>
320
</div>
319
</div>
321
- 

Return to bug 20248