Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
nk20
Manage
Activity
Members
Labels
Plan
Issues
31
Issue boards
Milestones
Wiki
Code
Merge requests
6
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
BDE
nk20
Commits
c8fe3435
Commit
c8fe3435
authored
4 years ago
by
ynerant
Browse files
Options
Downloads
Patches
Plain Diff
Some lines of the base.js file mysteriously disappeared...
parent
8751b393
No related branches found
No related tags found
1 merge request
!83
Beta soon
Pipeline
#8214
passed with stages
Stage: test
Stage: quality-assurance
in 4 minutes and 32 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
static/js/base.js
+40
-34
40 additions, 34 deletions
static/js/base.js
with
40 additions
and
34 deletions
static/js/base.js
+
40
−
34
View file @
c8fe3435
...
...
@@ -335,39 +335,45 @@ function autoCompleteNote(field_id, note_list_id, notes, notes_display, alias_pr
})
});
$
(
"
#validate_
"
+
id
).
html
(
"
<i class='fa fa-spinner'></i>
"
);
// Perform a PATCH request to the API in order to update the transaction
// If the user has insufficient rights, an error message will appear
$
.
ajax
({
"
url
"
:
"
/api/note/transaction/transaction/
"
+
id
+
"
/
"
,
type
:
"
PATCH
"
,
dataType
:
"
json
"
,
headers
:
{
"
X-CSRFTOKEN
"
:
CSRF_TOKEN
},
data
:
{
"
resourcetype
"
:
"
RecurrentTransaction
"
,
"
valid
"
:
!
validated
,
"
invalidity_reason
"
:
invalidity_reason
,
},
success
:
function
()
{
// Refresh jQuery objects
$
(
"
.validate
"
).
click
(
de_validate
);
refreshBalance
();
// error if this method doesn't exist. Please define it.
refreshHistory
();
},
error
:
function
(
err
)
{
addMsg
(
"
Une erreur est survenue lors de la validation/dévalidation
"
+
"
de cette transaction :
"
+
err
.
responseText
,
"
danger
"
);
refreshBalance
();
// error if this method doesn't exist. Please define it.
refreshHistory
();
}
});
});
});
// end getJSON alias
});
}
// end function autocomplete
// When a validate button is clicked, we switch the validation status
function
de_validate
(
id
,
validated
)
{
let
invalidity_reason
=
$
(
"
#invalidity_reason_
"
+
id
).
val
();
$
(
"
#validate_
"
+
id
).
html
(
"
<strong style=
\"
font-size: 16pt;
\"
>⟳ ...</strong>
"
);
// Perform a PATCH request to the API in order to update the transaction
// If the user has insufficient rights, an error message will appear
$
.
ajax
({
"
url
"
:
"
/api/note/transaction/transaction/
"
+
id
+
"
/
"
,
type
:
"
PATCH
"
,
dataType
:
"
json
"
,
headers
:
{
"
X-CSRFTOKEN
"
:
CSRF_TOKEN
},
data
:
{
"
resourcetype
"
:
"
RecurrentTransaction
"
,
"
valid
"
:
!
validated
,
"
invalidity_reason
"
:
invalidity_reason
,
},
success
:
function
()
{
// Refresh jQuery objects
$
(
"
.validate
"
).
click
(
de_validate
);
refreshBalance
();
// error if this method doesn't exist. Please define it.
refreshHistory
();
},
error
:
function
(
err
)
{
addMsg
(
"
Une erreur est survenue lors de la validation/dévalidation
"
+
"
de cette transaction :
"
+
err
.
responseText
,
"
danger
"
);
refreshBalance
();
// error if this method doesn't exist. Please define it.
refreshHistory
();
}
});
}
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment