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
0
Merge Requests
0
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
Léo-Paul Géneau
gitlab-ce
Commits
8f4f04c2
Commit
8f4f04c2
authored
Jan 03, 2017
by
Jose Ivan Vargas
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixed es6 lint errors, and reverted a change to a helper
parent
f243f1b2
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
8 additions
and
9 deletions
+8
-9
app/assets/javascripts/member_expiration_date.js.es6
app/assets/javascripts/member_expiration_date.js.es6
+5
-6
app/helpers/selects_helper.rb
app/helpers/selects_helper.rb
+1
-1
app/views/projects/group_links/_index.html.haml
app/views/projects/group_links/_index.html.haml
+1
-1
app/views/projects/project_members/_new_project_member.html.haml
...ws/projects/project_members/_new_project_member.html.haml
+1
-1
No files found.
app/assets/javascripts/member_expiration_date.js.es6
View file @
8f4f04c2
/* eslint-disable func-names, space-before-function-paren, vars-on-top, no-var, object-shorthand, comma-dangle, max-len */
(() => {
// Add datepickers to all `js-access-expiration-date` elements. If those elements are
// children of an element with the `clearable-input` class, and have a sibling
// `js-clear-input` element, then show that element when there is a value in the
// datepicker, and make clicking on that element clear the field.
//
window.gl = window.gl || {};
gl.MemberExpirationDate = (selector = '.js-access-expiration-date') => {
function toggleClearInput() {
$(this).closest('.clearable-input').toggleClass('has-value', $(this).val() !== '');
}
var inputs = $(selector);
const inputs = $(selector);
inputs.datepicker({
dateFormat: 'yy-mm-dd',
minDate: 1,
onSelect:
function ()
{
onSelect:
() =>
{
$(this).trigger('change');
toggleClearInput.call(this);
}
}
,
});
inputs.next('.js-clear-input').on('click', (event) => {
event.preventDefault();
var
input = $(this).closest('.clearable-input').find(selector);
const
input = $(this).closest('.clearable-input').find(selector);
input.datepicker('setDate', null)
.trigger('change');
toggleClearInput.call(input);
...
...
app/helpers/selects_helper.rb
View file @
8f4f04c2
...
...
@@ -59,7 +59,7 @@ module SelectsHelper
def
users_select_data_attributes
(
opts
)
{
placeholder:
opts
[
:placeholder
]
||
'Search for
members to update or invite
'
,
placeholder:
opts
[
:placeholder
]
||
'Search for
a user
'
,
null_user:
opts
[
:null_user
]
||
false
,
any_user:
opts
[
:any_user
]
||
false
,
email_user:
opts
[
:email_user
]
||
false
,
...
...
app/views/projects/group_links/_index.html.haml
View file @
8f4f04c2
...
...
@@ -8,7 +8,7 @@
.col-lg-9
%h5
.prepend-top-0
Set a group to share
=
form_tag
namespace_project_group_links_path
(
@project
.
namespace
,
@project
),
class:
'js-requires-input'
,
method: :post
,
namespace:
'GROUPS'
do
=
form_tag
namespace_project_group_links_path
(
@project
.
namespace
,
@project
),
class:
'js-requires-input'
,
method: :post
do
.form-group
=
label_tag
:link_group_id
,
"Group"
,
class:
"label-light"
=
groups_select_tag
(
:link_group_id
,
data:
{
skip_groups:
@skip_groups
},
required:
true
)
...
...
app/views/projects/project_members/_new_project_member.html.haml
View file @
8f4f04c2
=
form_for
@project_member
,
as: :project_member
,
url:
namespace_project_project_members_path
(
@project
.
namespace
,
@project
),
html:
{
class:
'users-project-form'
}
do
|
f
|
.row
.col-md-5.col-lg-5
=
users_select_tag
(
:user_ids
,
multiple:
true
,
class:
"input-clamp"
,
scope: :all
,
email_user:
true
)
=
users_select_tag
(
:user_ids
,
multiple:
true
,
class:
"input-clamp"
,
scope: :all
,
email_user:
true
,
placeholder:
"Search for members to update or invite"
)
.help-block.append-bottom-10
Search for members by name, username, or email, or invite new ones using their email address.
...
...
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