Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
T
third-party
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
261
Issues
261
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Paul
third-party
Commits
7ae3c4ec
Commit
7ae3c4ec
authored
May 21, 2021
by
Damien Moulard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
validation modale before deleting supplier
parent
7f377397
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
26 additions
and
3 deletions
+26
-3
oders_helper_style.css
orders/static/css/oders_helper_style.css
+2
-1
orders_helper.js
orders/static/js/orders_helper.js
+12
-2
helper.html
templates/orders/helper.html
+12
-0
No files found.
orders/static/css/oders_helper_style.css
View file @
7ae3c4ec
...
@@ -17,6 +17,7 @@
...
@@ -17,6 +17,7 @@
display
:
flex
;
display
:
flex
;
justify-content
:
center
;
justify-content
:
center
;
align-items
:
center
;
align-items
:
center
;
flex-wrap
:
wrap
;
margin
:
20px
0
20px
0
;
margin
:
20px
0
20px
0
;
}
}
...
@@ -30,7 +31,7 @@
...
@@ -30,7 +31,7 @@
justify-content
:
center
;
justify-content
:
center
;
align-items
:
center
;
align-items
:
center
;
padding
:
8px
;
padding
:
8px
;
margin-right
:
5
px
;
margin-right
:
10
px
;
}
}
.remove_supplier_icon
{
.remove_supplier_icon
{
...
...
orders/static/js/orders_helper.js
View file @
7ae3c4ec
...
@@ -155,8 +155,18 @@ function display_suppliers() {
...
@@ -155,8 +155,18 @@ function display_suppliers() {
$
(
".remove_supplier_icon"
).
on
(
"click"
,
function
(
e
)
{
$
(
".remove_supplier_icon"
).
on
(
"click"
,
function
(
e
)
{
const
el_id
=
$
(
this
).
attr
(
'id'
).
split
(
'_'
);
const
el_id
=
$
(
this
).
attr
(
'id'
).
split
(
'_'
);
const
supplier_id
=
el_id
[
el_id
.
length
-
1
]
const
supplier_id
=
el_id
[
el_id
.
length
-
1
];
remove_supplier
(
supplier_id
);
let
modal_remove_supplier
=
$
(
'#templates #modal_remove_supplier'
);
modal_remove_supplier
.
find
(
".supplier_name"
).
text
(
supplier
.
display_name
);
openModal
(
modal_remove_supplier
.
html
(),
()
=>
{
remove_supplier
(
supplier_id
);
},
'Valider'
,
);
})
})
}
}
...
...
templates/orders/helper.html
View file @
7ae3c4ec
...
@@ -43,6 +43,18 @@
...
@@ -43,6 +43,18 @@
</div>
</div>
</div>
</div>
</div>
</div>
<div
id=
"modal_remove_supplier"
>
<h3>
Attention !
</h3>
<p>
Vous vous apprêtez à supprimer le fournisseur
<span
class=
"supplier_name"
></span>
.
<br/>
Les produits associés à ce fournisseur uniquement seront supprimés.
<br/>
Les données renseignées dans la colonne de ce fournisseur seront perdues.
</p>
<p>
Êtez-vous sûr ?
</p>
<ul
id=
"list_unprocessable_porducts"
></ul>
<hr/>
</div>
</div>
</div>
<script
src=
"{% static "
js
/
all_common
.
js
"
%}?
v=
"></script>
<script
src=
"{% static "
js
/
all_common
.
js
"
%}?
v=
"></script>
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment