summaryrefslogtreecommitdiffstats
path: root/public/js/index.js
diff options
context:
space:
mode:
Diffstat (limited to 'public/js/index.js')
-rw-r--r--public/js/index.js13
1 files changed, 13 insertions, 0 deletions
diff --git a/public/js/index.js b/public/js/index.js
index f6da4125be..d79b94b92c 100644
--- a/public/js/index.js
+++ b/public/js/index.js
@@ -657,6 +657,18 @@ function initRepositoryCollaboration() {
});
}
+function initTeamSettings() {
+ // Change team access mode
+ $('.organization.new.team input[name=permission]').change(function () {
+ var val = $('input[name=permission]:checked', '.organization.new.team').val()
+ if (val === 'admin') {
+ $('.organization.new.team .team-units').hide();
+ } else {
+ $('.organization.new.team .team-units').show();
+ }
+ });
+}
+
function initWikiForm() {
var $editArea = $('.repository.wiki textarea#edit_area');
if ($editArea.length > 0) {
@@ -1557,6 +1569,7 @@ $(document).ready(function () {
initAdmin();
initCodeView();
initDashboardSearch();
+ initTeamSettings();
// Repo clone url.
if ($('#repo-clone-url').length > 0) {