-
-
Notifications
You must be signed in to change notification settings - Fork 393
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge remote-tracking branch 'origin/master' into issue_3118
- Loading branch information
Showing
181 changed files
with
4,197 additions
and
1,369 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,3 @@ | ||
//= link decidim/admin/application.js | ||
//= link decidim/admin/managed_users.js | ||
//= link decidim/admin/application.css |
12 changes: 12 additions & 0 deletions
12
decidim-admin/app/assets/javascripts/decidim/admin/managed_users.js.es6
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
// = require ./subform_toggler.component | ||
|
||
((exports) => { | ||
const { SubformTogglerComponent } = exports.DecidimAdmin; | ||
|
||
const subformToggler = new SubformTogglerComponent({ | ||
controllerSelect: $("select#impersonate_user_authorization_handler_name"), | ||
subformWrapperClass: "authorization-handler" | ||
}); | ||
|
||
subformToggler.run(); | ||
})(window); |
35 changes: 35 additions & 0 deletions
35
decidim-admin/app/assets/javascripts/decidim/admin/subform_toggler.component.js.es6
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
((exports) => { | ||
class SubformTogglerComponent { | ||
constructor(options = {}) { | ||
this.controllerSelect = options.controllerSelect; | ||
this.subformWrapperClass = options.subformWrapperClass; | ||
this._bindEvent(); | ||
this.run(); | ||
} | ||
|
||
run() { | ||
let $controllerSelect = this.controllerSelect; | ||
let subformWrapperClass = this.subformWrapperClass; | ||
let value = $controllerSelect.val(); | ||
|
||
let $form = $controllerSelect.parents("form"); | ||
let $subforms = $form.find(`.${subformWrapperClass}`); | ||
let $selectedSubform = $subforms.filter(`#${subformWrapperClass}-${value}`) | ||
|
||
$subforms.find("input,textarea").prop("disabled", true); | ||
$subforms.hide(); | ||
|
||
$selectedSubform.find("input,textarea").prop("disabled", false); | ||
$selectedSubform.show(); | ||
} | ||
|
||
_bindEvent() { | ||
this.controllerSelect.on("change", () => { | ||
this.run(); | ||
}); | ||
} | ||
} | ||
|
||
exports.DecidimAdmin = exports.DecidimAdmin || {}; | ||
exports.DecidimAdmin.SubformTogglerComponent = SubformTogglerComponent; | ||
})(window); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
69 changes: 0 additions & 69 deletions
69
decidim-admin/app/commands/decidim/admin/create_managed_user.rb
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.