$def with (work=None, author=None, recaptcha=None) $var title: $_("Add a book")

$_("Add a book to Open Library")

$_("We require a minimum set of fields to create a new record. These are those fields.")

$if not ctx.user: $:render_template("lib/not_logged")
$ author = (work and work.authors and work.authors[0].author) or author
$:_("Use Title: Subtitle to add a subtitle.") *$_("Required field")
$if work: $else:
$_('Like, "Agatha Christie" or "Jean-Paul Sartre." We\'ll also do a live check to see if we already know the author.')
$:render_template("books/author-autocomplete", cond(author, [author], []), "author_names", "authors", readonly=work is not None)
$_("For example"): Oxford University Press; Penguin; W.W. Norton*$_("Required field")
$_("You should be able to find this in the first few pages of the book.")*$_("Required field")
$ admin_user = ctx.user and (ctx.user.is_admin() or ctx.user.is_usergroup_member('/usergroup/super-librarians'))
 
$if admin_user:
$_("Only fill this out if this is a web book")
$if recaptcha and not ctx.user:
$_("Since you are not logged in, please satisfy the reCAPTCHA below.")

$:_('By saving a change to this wiki, you agree that your contribution is given freely to the world under CC0. Yippee!')
  $_('Cancel')