API access is now radio button instead of checkbox

This commit is contained in:
Johannes Zellner
2022-09-26 12:44:44 +02:00
parent 7e166e07dc
commit 463378e9a7
3 changed files with 19 additions and 11 deletions
+11 -6
View File
@@ -334,10 +334,15 @@
<input type="text" class="form-control" id="inputApiTokenName" ng-model="tokens.add.name" name="name" required autofocus>
</div>
<div class="checkbox">
<label>
<input type="checkbox" ng-model="tokens.add.readWrite">Read and write API access</input>
</label>
<div class="form-group">
<label class="control-label">{{ 'profile.createApiToken.access' | tr }}</label>
<div class="radio">
<label><input type="radio" ng-model="tokens.add.scope" value="r"> {{ 'profile.apiTokens.readonly' | tr }}</label>
</div>
<div class="radio">
<label><input type="radio" ng-model="tokens.add.scope" value="rw"> {{ 'profile.apiTokens.readwrite' | tr }}</label>
</div>
</div>
<input class="ng-hide" type="submit" ng-disabled="apiTokenAddForm.$invalid"/>
@@ -503,8 +508,8 @@
<span ng-show="!token.lastUsedTime">{{ 'profile.apiTokens.neverUsed' | tr }}</span>
</td>
<td>
<span ng-show="token.scope['*'] === 'rw'">Read+Write</span>
<span ng-hide="token.scope['*'] === 'rw'">Read</span>
<span ng-show="token.scope['*'] === 'rw'">{{ 'profile.apiTokens.readwrite' | tr }}</span>
<span ng-hide="token.scope['*'] === 'rw'">{{ 'profile.apiTokens.readonly' | tr }}</span>
</td>
<td class="text-right no-wrap" style="vertical-align: bottom">
<button class="btn btn-xs btn-danger" ng-click="tokens.revokeToken(token)" uib-tooltip="{{ 'profile.apiTokens.revokeTokenTooltip' | tr }}"><i class="far fa-trash-alt"></i></button>