OAIHarvest: error reporting fix

* Adapts reporting to new repo format.  (closes #1804) (PR #1812)

Reviewed-by: Tibor Simko <tibor.simko@cern.ch>
formatter: 'recjson' format addition

* Adds general implementation of 'recjson' using formatter engine.
  (addresses #1908)

* Adds an upgrader recipe for the new output format.

Signed-off-by: Eirini Psallida <eirini.psallida@cern.ch>
Reviewed-by: Jiri Kuncar <jiri.kuncar@cern.ch>
deposit: base template refactoring fix

* Fixes unneeded base of base template introduced in
  461039d109480d5988b4b8d820fdd529a4a44756.

Signed-off-by: Lars Holm Nielsen <lars.holm.nielsen@cern.ch>
deposit: refactoring bug fixes

* Fixes several JavaScript issues introduced during refactoring of assets
  as well as dynamic field lists.

* Fixes tag template issue in field lists.

* Fixes issue when appending new elements to field lists.

* Fixes typo in message variable names.

* Fixes uninitialized variables due to strict mode.

* Removes Invenio CKEditor configuration as this is configured by each
  textarea field in the data-ckeditor-config attribute.

* Adds SPAN-tag to whitelist of HTML-tags to support MathJax integration
  in CKEditor.

* NOTE Changes deposit/form.js module to export multiple methods.
  If your instance templates invokes 'form(configuration)' it must
  be changed to 'form.init(configuration)'.

Signed-off-by: Lars Holm Nielsen <lars.holm.nielsen@cern.ch>
deposit: ColumnInput description addition

* Adds description for `ColumnInput` widget.  (closes #1949)

Signed-off-by: Jiri Kuncar <jiri.kuncar@cern.ch>
Tested-by: Javier Martin Montull <javier.martin.montull@cern.ch>
records: fix bibrec.additional_info upgrade script

* NOTE Amends upgrade script to add column `bibrec.additional_info` in
  case it does not exist.  (closes #2132)

Co-authored-by: Jiri Kuncar <jiri.kuncar@cern.ch>
Signed-off-by: Jan Aage Lavik <jan.age.lavik@cern.ch>
WebSubmit: Link_Records error message fix

* Fixes the bug in str.join(recids) in get_recid_and_reportnumber function;
  recids should be converted to strings before calling join function.
  (PR #1734)

Signed-off-by: Sebastian Witowski <sebastian.witowski@cern.ch>
Reviewed-by: Tibor Simko <tibor.simko@cern.ch>
OAIHarvest: conversion argument name upgrade

* Adds the missing upgrade script for changes done to OAI harvest
  source arguments in f9271a0 that could cause name problems during
  harvesting when upgrading an existing installation.  (PR #1753)

* Amends the web-tests to look for the proper new name.

Signed-off-by: Jan Aage Lavik <jan.age.lavik@cern.ch>
Acked-by: Tibor Simko <tibor.simko@cern.ch>
BibDocFile: more robust decompose_bibdocfile_url()

* Improves decompose_bibdocfile_url() function to be more robust with
  respect to uncommon characters in docnames.  (PR #1957)

Signed-off-by: Samuele Kaplun <samuele.kaplun@cern.ch>
Reviewed-by: Tibor Simko <tibor.simko@cern.ch>
I18N: fix gender problem in a French translation

* Fixes "aucun information" gender problem.  (PR #2089)

Signed-off-by: Ludmila Marian <ludmila.marian@gmail.com>
Reviewed-by: Tibor Simko <tibor.simko@cern.ch>
Merge branch 'maint-1.0' into maint-1.1

* maint-1.0:
  I18N: fix gender problem in a French translation

* Merge note: corrected one similar phrase.

Conflicts:
	po/fr.po

Signed-off-by: Tibor Simko <tibor.simko@cern.ch>
BibDocFile: change name failure raises exception

* If the bibdoc name was not changed, the `change_name()` function will
  raise an exception.  (PR #2071)

Signed-off-by: Sebastian Witowski <sebastian.witowski@cern.ch>
Reviewed-by: Tibor Simko <tibor.simko@cern.ch>
Bibdocfile: change_name missing parameter fix

* Fixes the missing parameter in BibDoc.change_name function in
  bibdocfile_managedocfiles (GENSBM was failing due to that).
  (PR #1818)

Reviewed-by: Tibor Simko <tibor.simko@cern.ch>
WebSubmit: `deferRelatedFormatsCreation` param fix

* Adds `deferRelatedFormatsCreation` of `Create_Upload_Files_Interface`
  to the table filling step, fixing submission troubles, following up
  40c208ec8b6908a463db452476d2cf19bec47ed8.  (addresses #2142)

Signed-off-by: Tibor Simko <tibor.simko@cern.ch>
WebSubmit: `test_revise_picture_admin` test fix

* Fixes `test_revise_picture_admin` web test.  (closes #2142)

Signed-off-by: Tibor Simko <tibor.simko@cern.ch>
WebSubmit: support for elements' custom_level

* Adds support for optionally setting a custom_level ('M' for mandatory or
  'O' for optional) for each element through the element description,
  overriding the default level. Useful for dynamically produced elements.
  (PR #1741)

Signed-off-by: Nikolaos Kasioumis <nikolaos.kasioumis@cern.ch>
Tested-by: Tibor Simko <tibor.simko@cern.ch>
WebSubmit: print white space instead of None

* Avoids printing "None" (by passing None to string formatting).
  Instead, print a single white space.  (PR #1741)

Signed-off-by: Nikolaos Kasioumis <nikolaos.kasioumis@cern.ch>
Tested-by: Tibor Simko <tibor.simko@cern.ch>
WebSubmit: more robust JavaScript check

* Before running a custom JavaScript function on an element, check if
  the element is not undefined.  (PR #1741)

Signed-off-by: Nikolaos Kasioumis <nikolaos.kasioumis@cern.ch>
Tested-by: Tibor Simko <tibor.simko@cern.ch>
BibDocFile: duplicate docname fix

* Fixes an issue when checking duplicate docnames in the
  BibDocFile client that caused a false alert.  (PR #1930)

* Fixes the report output which had the wrong order of arguments.

Reported-by: Alexander Wagner <a.wagner@fz-juelich.de>
Signed-off-by: Jan Aage Lavik <jan.age.lavik@cern.ch>
Reviewed-by: Tibor Simko <tibor.simko@cern.ch>
WebSession: CSRF tokens in account settings forms

* Improves internal account settings edit page (`/youraccount/edit`)
  by generating unique CSRF tokens valid five minutes.  (closes #1855)

* Accepts only POST requests and verifies CSRF token expiry when
  performing desired settings change (`/youraccount/change`).

Reported-by: Bessem Amira <bessem.amira@cnudst.rnrt.tn>
Signed-off-by: Tibor Simko <tibor.simko@cern.ch>
Reviewed-by: Samuele Kaplun <samuele.kaplun@cern.ch>