Bug 34478: Fix opac-tags and tags/lists
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
This commit is contained in:
parent
fa84aadf36
commit
40b8e359f3
2 changed files with 13 additions and 1 deletions
|
@ -80,7 +80,15 @@ tr.selected { background-color : #FFFFCC; } tr.selected td { background-color :
|
|||
</li>
|
||||
[% END %]</ul>[% ELSE %]This record has no items.[% END %]
|
||||
</td>
|
||||
<td><form method="post" action="/cgi-bin/koha/tags/list.pl"><input type="hidden" name="op" value="del" /><input type="hidden" name="tag" value="[% tag | html %]" /><input type="hidden" name="tag_id" value="[% title.tag_id | html %]" /><button type="submit" class="delete btn btn-default btn-sm"><i class="fa fa-trash-can"></i> Remove tag</button></form></td>
|
||||
<td>
|
||||
<form method="post" action="/cgi-bin/koha/tags/list.pl">
|
||||
[% INCLUDE 'csrf-token.inc' %]
|
||||
<input type="hidden" name="op" value="cud-del" />
|
||||
<input type="hidden" name="tag" value="[% tag | html %]" />
|
||||
<input type="hidden" name="tag_id" value="[% title.tag_id | html %]" />
|
||||
<button type="submit" class="delete btn btn-default btn-sm"><i class="fa fa-trash-can"></i> Remove tag</button>
|
||||
</form>
|
||||
</td>
|
||||
</tr>
|
||||
[% END %]
|
||||
</table>
|
||||
|
|
|
@ -17,6 +17,8 @@ KOHA.Tags = {
|
|||
var mytagid = "#" + mynewtag;
|
||||
var mydata = {};
|
||||
mydata[mynewtag] = tag;
|
||||
mydata['csrf_token'] = $('meta[name="csrf-token"]').attr('content')
|
||||
mydata['op'] = 'cud-add';
|
||||
var response; // AJAX from server will assign value to response.
|
||||
$.post(
|
||||
"/cgi-bin/koha/opac-tags.pl",
|
||||
|
@ -74,6 +76,8 @@ KOHA.Tags = {
|
|||
var mynewtag = "newtag" + bibarray[i];
|
||||
mydata[mynewtag] = tag;
|
||||
}
|
||||
mydata['csrf_token'] = $('meta[name="csrf-token"]').attr('content')
|
||||
mydata['op'] = 'cud-add';
|
||||
var response; // AJAX from server will assign value to response.
|
||||
$.post(
|
||||
"/cgi-bin/koha/opac-tags.pl",
|
||||
|
|
Loading…
Reference in a new issue