Mercurial > gemma
comparison client/src/components/usermanagement/Userdetail.vue @ 5508:29af073c824d deactivate-users
Client: Implement reactivating of user
* Add HTTP request to reactivate a deactivated user
* This is done from the user's edit-dialog while typing an email for this user is necessary to complete this process.
author | Fadi Abbud <fadi.abbud@intevation.de> |
---|---|
date | Thu, 23 Sep 2021 17:33:07 +0200 |
parents | 1695e17c5a83 |
children | fcab36751490 |
comparison
equal
deleted
inserted
replaced
5507:279900b28b1b | 5508:29af073c824d |
---|---|
129 <button | 129 <button |
130 type="submit" | 130 type="submit" |
131 :disabled="submitted" | 131 :disabled="submitted" |
132 class="shadow-sm btn btn-info submit-button" | 132 class="shadow-sm btn btn-info submit-button" |
133 > | 133 > |
134 <translate>Save</translate> | 134 <span>{{ |
135 currentUser.active ? $gettext("Save") : $gettext("Reactivate") | |
136 }}</span> | |
135 </button> | 137 </button> |
136 </div> | 138 </div> |
137 </form> | 139 </form> |
138 </div> | 140 </div> |
139 </div> | 141 </div> |
243 } | 245 } |
244 }; | 246 }; |
245 }, | 247 }, |
246 mounted() { | 248 mounted() { |
247 this.currentUser = { ...this.user }; | 249 this.currentUser = { ...this.user }; |
250 if (!this.currentUser.active) { | |
251 this.currentUser.email = ""; | |
252 } | |
248 this.path = this.user.name; | 253 this.path = this.user.name; |
249 }, | 254 }, |
250 watch: { | 255 watch: { |
251 reportToggled() { | 256 reportToggled() { |
252 this.currentUser.reports = this.user.reports; | 257 this.currentUser.reports = this.user.reports; |
253 }, | 258 }, |
254 user() { | 259 user() { |
255 this.currentUser = { ...this.user }; | 260 this.currentUser = { ...this.user }; |
261 if (!this.currentUser.active) { | |
262 this.currentUser.email = ""; | |
263 } | |
256 this.path = this.user.name; | 264 this.path = this.user.name; |
257 this.clearPassword(); | 265 this.clearPassword(); |
258 this.clearErrors(); | 266 this.clearErrors(); |
259 } | 267 } |
260 }, | 268 }, |