Skip to content

Commit

Permalink
Merge pull request #6273 from jimchamp/6272/bug/fix-delete-btn
Browse files Browse the repository at this point in the history
Update delete buttons for book edit form
  • Loading branch information
mekarpeles authored Apr 20, 2022
2 parents ab4d824 + 97956d5 commit 50b6272
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 5 deletions.
4 changes: 0 additions & 4 deletions openlibrary/macros/EditButtons.html
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,4 @@
<button type="submit" class="larger" name="_save" title="$_('Save')">$_("Save")</button>
&nbsp;
<a href="javascript:history.go(-1);" class="small red">$_('Cancel')</a>
$if ctx.user and (ctx.user.is_admin() or ctx.user.is_librarian()):
<span class="adminOnly right"><button type="submit" value="$_('Delete Record')" name="_delete" title="$_('Delete Record')" id="delete">$_("Delete Record")</button></span>
$else:
<div class="adminDelete">$:_('<em>Please Note:</em> Only Admins can delete things. <a href="/contact" class="blue">Let us know</a> if there\'s a problem.')</div>
</div>
2 changes: 1 addition & 1 deletion openlibrary/templates/books/edit.html
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
note = ""
<h2 class="editFormTitle">$:title</h2>
$if ctx.user and (ctx.user.is_admin() or ctx.user.is_librarian()):
<span class="adminOnly right"><button type="submit" value="$_('Delete Record')" name="_delete" title="$_('Delete Record')" id="delete">$_("Delete Record")</button></span>
<span class="adminOnly right"><button type="submit" value="$_('Delete Record')" name="_delete" title="$_('Delete Record')" id="delete" form="addWork">$_("Delete Record")</button></span>
$if not ctx.user:
$:render_template("lib/not_logged")
$:note
Expand Down

0 comments on commit 50b6272

Please sign in to comment.