$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
$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)
$_("The year it was published is plenty.")
$ admin_user = ctx.user and (ctx.user.is_admin() or ctx.user.is_librarian())
 
$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')