Description:
add options for bulk manage add user to group (not finished)
Commit status:
[Not Reviewed]
References:
Diff options:
Comments:
0 Commit comments
0 Inline Comments
Unresolved TODOs:
There are no unresolved TODOs
r671:52ce712479a1 - - 2 files changed: 17 inserted, 0 deleted
@@ -228,6 +228,7 | |||||
|
228 | end |
|
228 | end |
|
229 | end |
|
229 | end |
|
230 |
|
230 | ||
|
|
231 | + | ||
|
231 | # contest management |
|
232 | # contest management |
|
232 |
|
233 | ||
|
233 | def contests |
|
234 | def contests |
@@ -423,6 +424,8 | |||||
|
423 | @action[:set_enable] = params[:enabled] |
|
424 | @action[:set_enable] = params[:enabled] |
|
424 | @action[:enabled] = params[:enable] == "1" |
|
425 | @action[:enabled] = params[:enable] == "1" |
|
425 | @action[:gen_password] = params[:gen_password] |
|
426 | @action[:gen_password] = params[:gen_password] |
|
|
427 | + @action[:add_group] = params[:add_group] | ||
|
|
428 | + @action[:group_name] = params[:group_name] | ||
|
426 | end |
|
429 | end |
|
427 |
|
430 | ||
|
428 | if params[:commit] == "Perform" |
|
431 | if params[:commit] == "Perform" |
@@ -437,6 +440,11 | |||||
|
437 | u.save |
|
440 | u.save |
|
438 | end |
|
441 | end |
|
439 | end |
|
442 | end |
|
|
443 | + if @action[:add_group] | ||
|
|
444 | + @uses.each do |u| | ||
|
|
445 | + | ||
|
|
446 | + end | ||
|
|
447 | + end | ||
|
440 | end |
|
448 | end |
|
441 | end |
|
449 | end |
|
442 |
|
450 |
@@ -46,6 +46,15 | |||||
|
46 | %label.checkbox-inline |
|
46 | %label.checkbox-inline |
|
47 | = check_box_tag "gen_password", true, params[:gen_password] |
|
47 | = check_box_tag "gen_password", true, params[:gen_password] |
|
48 | Generate new random password |
|
48 | Generate new random password |
|
|
49 | + .row.form-group | ||
|
|
50 | + .col-md-4 | ||
|
|
51 | + %label.checkbox-inline | ||
|
|
52 | + = check_box_tag "add_group", true, params[:add_group] | ||
|
|
53 | + Add users to group | ||
|
|
54 | + %label.col-md-3.control-label.text-right Group name | ||
|
|
55 | + .col-md-5 | ||
|
|
56 | + = text_field_tag "group_name", params[:group_name], id: 'group_name',class: 'form-control select2' | ||
|
|
57 | + | ||
|
49 |
|
58 | ||
|
50 | .row |
|
59 | .row |
|
51 | .col-md-12 |
|
60 | .col-md-12 |
You need to be logged in to leave comments.
Login now