Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
1
Merge Requests
1
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
gitlab-ce
Commits
c42728f0
Commit
c42728f0
authored
Oct 12, 2017
by
Simon Knox
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix form to work with popup_dialog, remove some unused values
parent
f6dd6228
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
85 additions
and
91 deletions
+85
-91
app/assets/javascripts/boards/components/board_form.vue
app/assets/javascripts/boards/components/board_form.vue
+85
-85
app/assets/stylesheets/framework/modal.scss
app/assets/stylesheets/framework/modal.scss
+0
-6
No files found.
app/assets/javascripts/boards/components/board_form.vue
View file @
c42728f0
...
...
@@ -12,6 +12,15 @@ window.gl = window.gl || {};
window
.
gl
.
issueBoards
=
window
.
gl
.
issueBoards
||
{};
const
Store
=
gl
.
issueBoards
.
BoardsStore
;
const
boardDefaults
=
{
id
:
false
,
name
:
''
,
labels
:
[],
milestone_id
:
undefined
,
assignee
:
{},
assignee_id
:
undefined
,
weight
:
null
,
};
export
default
{
props
:
{
...
...
@@ -49,7 +58,7 @@ export default {
},
data
()
{
return
{
board
:
{
...
Store
.
state
.
currentBoard
},
board
:
{
...
boardDefaults
,
...
this
.
currentBoard
},
expanded
:
false
,
issue
:
{},
currentBoard
:
Store
.
state
.
currentBoard
,
...
...
@@ -151,18 +160,9 @@ export default {
resetFormState
()
{
if
(
this
.
isNewForm
)
{
// Clear the form when we open the "New board" modal
this
.
board
=
{
id
:
false
,
name
:
''
,
labels
:
[],
milestone
:
{},
milestone_id
:
undefined
,
assignee
:
{},
assignee_id
:
undefined
,
weight
:
null
,
};
this
.
board
=
{
...
boardDefaults
};
}
else
if
(
this
.
currentBoard
&&
Object
.
keys
(
this
.
currentBoard
).
length
)
{
this
.
board
=
{
...
this
.
currentBoard
};
this
.
board
=
{
...
boardDefaults
,
...
this
.
currentBoard
};
}
},
},
...
...
@@ -187,88 +187,88 @@ export default {
@
toggle=
"cancel"
@
submit=
"submit"
>
<p
v-if=
"isDeleteForm"
>
Are you sure you want to delete this board?
</p>
<form
v-else
class=
"js-board-config-modal"
>
<div
v-if=
"!readonly"
class=
"append-bottom-20"
<template
slot=
"body"
>
<p
v-if=
"isDeleteForm"
>
Are you sure you want to delete this board?
</p>
<form
v-else
class=
"js-board-config-modal"
>
<label
class=
"form-section-title label-light"
for=
"board-new-name"
>
Board name
</label>
<input
ref=
"name"
class=
"form-control"
type=
"text"
id=
"board-new-name"
v-model=
"board.name"
placeholder=
"Enter board name"
>
</div>
<div
v-if=
"scopedIssueBoardFeatureEnabled"
>
<div
v-if=
"
canAdminBoard
"
class=
"
media append-bottom-1
0"
v-if=
"
!readonly
"
class=
"
append-bottom-2
0"
>
<label
class=
"form-section-title label-light media-body"
>
Board scope
<label
class=
"form-section-title label-light"
for=
"board-new-name"
>
Board name
</label>
<button
type=
"button"
class=
"btn"
@
click=
"expanded = !expanded"
v-if=
"collapseScope"
<input
ref=
"name"
class=
"form-control"
type=
"text"
id=
"board-new-name"
v-model=
"board.name"
placeholder=
"Enter board name"
>
{{
expandButtonText
}}
</button>
</div>
<p
class=
"text-secondary append-bottom-10"
>
Board scope affects which issues are displayed for anyone who visits this board
</p>
<div
v-if=
"!collapseScope || expanded"
>
<board-milestone-select
:board=
"board"
:milestone-path=
"milestonePath"
title=
"Milestone"
:can-edit=
"canAdminBoard"
/>
<div
v-if=
"scopedIssueBoardFeatureEnabled"
>
<div
v-if=
"canAdminBoard"
class=
"media append-bottom-10"
>
<label
class=
"form-section-title label-light media-body"
>
Board scope
</label>
<button
type=
"button"
class=
"btn"
@
click=
"expanded = !expanded"
v-if=
"collapseScope"
>
{{
expandButtonText
}}
</button>
</div>
<p
class=
"text-secondary append-bottom-10"
>
Board scope affects which issues are displayed for anyone who visits this board
</p>
<div
v-if=
"!collapseScope || expanded"
>
<board-milestone-select
:board=
"board"
:milestone-path=
"milestonePath"
:can-edit=
"canAdminBoard"
/>
<board-labels-select
:board=
"board"
title=
"Labels"
:can-edit=
"canAdminBoard"
:labels-path=
"labelsPath"
/>
<board-labels-select
:board=
"board"
:can-edit=
"canAdminBoard"
:labels-path=
"labelsPath"
/>
<user-select
any-user-text=
"Any assignee"
:board=
"board"
field-name=
"assignee_id"
label=
"Assignee"
:selected=
"board.assignee"
:can-edit=
"canAdminBoard"
placeholder-text=
"Select assignee"
:project-id=
"projectId"
:group-id=
"groupId"
wrapper-class=
"assignee"
/>
<user-select
any-user-text=
"Any assignee"
:board=
"board"
field-name=
"assignee_id"
label=
"Assignee"
:selected=
"board.assignee"
:can-edit=
"canAdminBoard"
placeholder-text=
"Select assignee"
:project-id=
"projectId"
:group-id=
"groupId"
wrapper-class=
"assignee"
/>
<board-weight-select
:board=
"board"
:weights=
"weightsArray"
v-model=
"board.weight"
:can-edit=
"canAdminBoard"
/>
<board-weight-select
:board=
"board"
:weights=
"weightsArray"
v-model=
"board.weight"
:can-edit=
"canAdminBoard"
/>
</div>
</div>
</
div
>
</
form
>
</
form
>
</
template
>
</popup-dialog>
</template>
app/assets/stylesheets/framework/modal.scss
View file @
c42728f0
...
...
@@ -45,12 +45,6 @@ body.modal-open {
.modal.popup-dialog
{
display
:
block
;
@media
(
min-width
:
$screen-md-min
)
{
.modal-dialog
{
margin-top
:
$new-navbar-height
;
}
}
}
.modal-body
{
...
...
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