Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
G
Géocontrib Frontend
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Redmine
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Terraform modules
Analyze
Contributor 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
externe Matthieu
Géocontrib Frontend
Commits
229c268c
Commit
229c268c
authored
3 years ago
by
Timothee P
Browse files
Options
Downloads
Patches
Plain Diff
allow to upload multiple attachments
parent
072edb3a
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/components/feature/FeatureAttachmentForm.vue
+7
-14
7 additions, 14 deletions
src/components/feature/FeatureAttachmentForm.vue
src/store/modules/feature.js
+0
-12
0 additions, 12 deletions
src/store/modules/feature.js
with
7 additions
and
26 deletions
src/components/feature/FeatureAttachmentForm.vue
+
7
−
14
View file @
229c268c
<
template
>
<div>
<!--
<span
v-for=
"hidden in form.hidden_fields"
:key=
"hidden"
>
{{
hidden
}}
</span>
-->
<div
class=
"ui teal segment"
>
<h4>
Pièce jointe
<button
@
click=
"remove
_a
ttachment
_f
ormset(form.dataKey)"
@
click=
"remove
A
ttachment
F
ormset(form.dataKey)"
class=
"ui small compact right floated icon button remove-formset"
type=
"button"
>
...
...
@@ -33,9 +29,10 @@
</div>
<div
class=
"required field"
>
<label>
Fichier (PDF, PNG, JPEG)
</label>
<!-- // todo : mettre en place la sélection de fichier -->
<!-- @click="selectFile" -->
<label
class=
"ui icon button"
for=
"attachment_file"
>
<label
class=
"ui icon button"
:for=
"'attachment_file' + attachmentForm.dataKey"
>
<i
class=
"file icon"
></i>
<span
v-if=
"form.attachment_file.value"
class=
"label"
>
{{
form
.
attachment_file
.
value
...
...
@@ -47,11 +44,8 @@
type=
"file"
style=
"display: none"
:name=
"form.attachment_file.html_name"
id=
"attachment_file"
:
id=
"
'
attachment_file
' + attachmentForm.dataKey
"
/>
<!-- // todo: récupérer la valeur :accept="IMAGE_FORMAT" -->
<!-- @change="processImgData" -->
{{
form
.
attachment_file
.
errors
}}
</div>
</div>
...
...
@@ -113,7 +107,6 @@ export default {
methods
:
{
initForm
(
attachmentForm
)
{
console
.
log
(
"
initForm
"
);
for
(
let
el
in
attachmentForm
)
{
if
(
el
&&
this
.
form
[
el
])
{
this
.
form
[
el
].
value
=
...
...
@@ -123,7 +116,7 @@ export default {
}
}
},
remove
_a
ttachment
_f
ormset
()
{
remove
A
ttachment
F
ormset
()
{
this
.
$store
.
commit
(
"
feature/REMOVE_ATTACHMENT_FORM
"
,
this
.
attachmentForm
.
dataKey
...
...
This diff is collapsed.
Click to expand it.
src/store/modules/feature.js
+
0
−
12
View file @
229c268c
...
...
@@ -139,18 +139,6 @@ const feature = {
//DELETE_FEATURE({ state }, feature_slug) {
//console.log("Deleting feature:", feature_slug, state)
/* axios
.post(`${DJANGO_API_BASE}feature_type/`, data)
.then((response) => {
const routerHistory = router.options.routerHistory
commit("SET_USER", response.data.user);
router.push(routerHistory[routerHistory.length - 1] || "/")
dispatch("GET_USER_LEVEL_PROJECTS");
})
.catch(() => {
commit("SET_USER", false)
}); */
// },
// POST_COMMENT({ state }, data) {
//console.log("post comment", data, state)
...
...
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