mirror of
				https://gitlab.crans.org/bde/nk20
				synced 2025-10-30 23:39:54 +01:00 
			
		
		
		
	Fix JS
This commit is contained in:
		| @@ -335,37 +335,39 @@ function autoCompleteNote(field_id, note_list_id, notes, notes_display, alias_pr | |||||||
|                     }) |                     }) | ||||||
|                 }); |                 }); | ||||||
|  |  | ||||||
|     $("#validate_" + id).html("<i class='fa fa-spinner'></i>"); |                 $("#validate_" + id).html("<i class='fa fa-spinner'></i>"); | ||||||
|  |  | ||||||
|     // Perform a PATCH request to the API in order to update the transaction |                 // Perform a PATCH request to the API in order to update the transaction | ||||||
|     // If the user has insufficient rights, an error message will appear |                 // If the user has insufficient rights, an error message will appear | ||||||
|     $.ajax({ |                 $.ajax({ | ||||||
|         "url": "/api/note/transaction/transaction/" + id + "/", |                     "url": "/api/note/transaction/transaction/" + id + "/", | ||||||
|         type: "PATCH", |                     type: "PATCH", | ||||||
|         dataType: "json", |                     dataType: "json", | ||||||
|         headers: { |                     headers: { | ||||||
|             "X-CSRFTOKEN": CSRF_TOKEN |                         "X-CSRFTOKEN": CSRF_TOKEN | ||||||
|         }, |                     }, | ||||||
|         data: { |                     data: { | ||||||
|             "resourcetype": "RecurrentTransaction", |                         "resourcetype": "RecurrentTransaction", | ||||||
|             "valid": !validated, |                         "valid": !validated, | ||||||
|             "invalidity_reason": invalidity_reason, |                         "invalidity_reason": invalidity_reason, | ||||||
|         }, |                     }, | ||||||
|         success: function () { |                     success: function () { | ||||||
|             // Refresh jQuery objects |                         // Refresh jQuery objects | ||||||
|             $(".validate").click(de_validate); |                         $(".validate").click(de_validate); | ||||||
|  |  | ||||||
|             refreshBalance(); |                         refreshBalance(); | ||||||
|             // error if this method doesn't exist. Please define it. |                         // error if this method doesn't exist. Please define it. | ||||||
|             refreshHistory(); |                         refreshHistory(); | ||||||
|         }, |                     }, | ||||||
|         error: function (err) { |                     error: function (err) { | ||||||
|             addMsg("Une erreur est survenue lors de la validation/dévalidation " + |                         addMsg("Une erreur est survenue lors de la validation/dévalidation " + | ||||||
|                 "de cette transaction : " + err.responseText, "danger"); |                             "de cette transaction : " + err.responseText, "danger"); | ||||||
|  |  | ||||||
|             refreshBalance(); |                         refreshBalance(); | ||||||
|             // error if this method doesn't exist. Please define it. |                         // error if this method doesn't exist. Please define it. | ||||||
|             refreshHistory(); |                         refreshHistory(); | ||||||
|         } |                     } | ||||||
|  |                 }); | ||||||
|  |             }); | ||||||
|     }); |     }); | ||||||
| } | } | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user