Show More
@@ -699,6 +699,7 b' class UsersView(UserAppView):' | |||
|
699 | 699 | c.role_options = [(c.role_values, _("Role"))] |
|
700 | 700 | c.user_auth_tokens = AuthTokenModel().get_auth_tokens( |
|
701 | 701 | c.user.user_id, show_expired=True) |
|
702 | c.role_vcs = AuthTokenModel.cls.ROLE_VCS | |
|
702 | 703 | return self._get_template_context(c) |
|
703 | 704 | |
|
704 | 705 | def maybe_attach_token_scope(self, token): |
@@ -159,6 +159,7 b' class MyAccountView(BaseAppView, DataGri' | |||
|
159 | 159 | c.role_options = [(c.role_values, _("Role"))] |
|
160 | 160 | c.user_auth_tokens = AuthTokenModel().get_auth_tokens( |
|
161 | 161 | c.user.user_id, show_expired=True) |
|
162 | c.role_vcs = AuthTokenModel.cls.ROLE_VCS | |
|
162 | 163 | return self._get_template_context(c) |
|
163 | 164 | |
|
164 | 165 | def maybe_attach_token_scope(self, token): |
@@ -141,6 +141,12 b' var repoFilter = function(data) {' | |||
|
141 | 141 | |
|
142 | 142 | $("#scope_repo_id_disabled").select2(select2Options); |
|
143 | 143 | |
|
144 | var selectVcsScope = function() { | |
|
145 | // select vcs scope and disable input | |
|
146 | $("#role").select2("val", "${c.role_vcs}").trigger('change'); | |
|
147 | $("#role").select2("readonly", true) | |
|
148 | }; | |
|
149 | ||
|
144 | 150 | $("#scope_repo_id").select2({ |
|
145 | 151 | cachedDataSource: {}, |
|
146 | 152 | minimumInputLength: 2, |
@@ -174,6 +180,9 b' var repoFilter = function(data) {' | |||
|
174 | 180 | } |
|
175 | 181 | }) |
|
176 | 182 | }); |
|
183 | $("#scope_repo_id").on('select2-selecting', function(e){ | |
|
184 | selectVcsScope() | |
|
185 | }); | |
|
177 | 186 | |
|
178 | 187 | }); |
|
179 | 188 | </script> |
@@ -139,6 +139,12 b' var repoFilter = function(data) {' | |||
|
139 | 139 | |
|
140 | 140 | $("#scope_repo_id_disabled").select2(select2Options); |
|
141 | 141 | |
|
142 | var selectVcsScope = function() { | |
|
143 | // select vcs scope and disable input | |
|
144 | $("#role").select2("val", "${c.role_vcs}").trigger('change'); | |
|
145 | $("#role").select2("readonly", true) | |
|
146 | }; | |
|
147 | ||
|
142 | 148 | $("#scope_repo_id").select2({ |
|
143 | 149 | cachedDataSource: {}, |
|
144 | 150 | minimumInputLength: 2, |
@@ -172,6 +178,9 b' var repoFilter = function(data) {' | |||
|
172 | 178 | } |
|
173 | 179 | }) |
|
174 | 180 | }); |
|
181 | $("#scope_repo_id").on('select2-selecting', function(e){ | |
|
182 | selectVcsScope() | |
|
183 | }); | |
|
175 | 184 | |
|
176 | 185 | }); |
|
177 | 186 | </script> |
General Comments 0
You need to be logged in to leave comments.
Login now