diff --git a/swh/web/assets/src/bundles/save/index.js b/swh/web/assets/src/bundles/save/index.js --- a/swh/web/assets/src/bundles/save/index.js +++ b/swh/web/assets/src/bundles/save/index.js @@ -133,22 +133,26 @@ let saveRequestAcceptedAlert = htmlAlert( 'success', - 'The "save code now" request has been accepted and will be processed as soon as possible.' + 'The "save code now" request has been accepted and will be processed as soon as possible.', + true ); let saveRequestPendingAlert = htmlAlert( 'warning', - 'The "save code now" request has been put in pending state and may be accepted for processing after manual review.' + 'The "save code now" request has been put in pending state and may be accepted for processing after manual review.', + true ); let saveRequestRateLimitedAlert = htmlAlert( 'danger', - 'The rate limit for "save code now" requests has been reached. Please try again later.' + 'The rate limit for "save code now" requests has been reached. Please try again later.', + true ); let saveRequestUnknownErrorAlert = htmlAlert( 'danger', - 'An unexpected error happened when submitting the "save code now request".' + 'An unexpected error happened when submitting the "save code now request".', + true ); $('#swh-save-origin-form').submit(event => { @@ -247,22 +251,26 @@ let newSnapshotRequestAcceptedAlert = htmlAlert( 'success', - 'The "take new snapshot" request has been accepted and will be processed as soon as possible.' + 'The "take new snapshot" request has been accepted and will be processed as soon as possible.', + true ); let newSnapshotRequestPendingAlert = htmlAlert( 'warning', - 'The "take new snapshot" request has been put in pending state and may be accepted for processing after manual review.' + 'The "take new snapshot" request has been put in pending state and may be accepted for processing after manual review.', + true ); let newSnapshotRequestRateLimitAlert = htmlAlert( 'danger', - 'The rate limit for "take new snapshot" requests has been reached. Please try again later.' + 'The rate limit for "take new snapshot" requests has been reached. Please try again later.', + true ); let newSnapshotRequestUnknownErrorAlert = htmlAlert( 'danger', - 'An unexpected error happened when submitting the "save code now request".' + 'An unexpected error happened when submitting the "save code now request".', + true ); $(document).ready(() => { @@ -279,7 +287,7 @@ (statusCode, errorData) => { $('#swh-take-new-snapshot-request-status').css('color', 'red'); if (statusCode === 403) { - const errorAlert = htmlAlert('danger', `Error: ${errorData['detail']}`); + const errorAlert = htmlAlert('danger', `Error: ${errorData['detail']}`, true); $('#swh-take-new-snapshot-request-status').html(errorAlert); } else if (statusCode === 429) { $('#swh-take-new-snapshot-request-status').html(newSnapshotRequestRateLimitAlert); diff --git a/swh/web/templates/misc/origin-save.html b/swh/web/templates/misc/origin-save.html --- a/swh/web/templates/misc/origin-save.html +++ b/swh/web/templates/misc/origin-save.html @@ -22,17 +22,50 @@ {% block content %} +

+ You can contribute to extend the content of the Software Heritage archive by submitting an origin + save request. To do so, fill the required info in the form below: +

+ +
+ {% csrf_token %} +
+
+
+ + +
The visit type must be specified
+
+
+ + +
The origin url is not valid or does not reference a code repository
+
+
+
+ + +
+
+
+
+ +
+
+
-

- You can contribute to extend the content of the Software Heritage archive by submitting an origin - save request. To do so, fill the required info in the form below: -

+

A "Save code now" request takes the following parameters: