You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@trafficcontrol.apache.org by GitBox <gi...@apache.org> on 2022/02/03 17:31:10 UTC
[GitHub] [trafficcontrol] ocket8888 commented on a change in pull request #6536: TP: adds permissions to roles form
ocket8888 commented on a change in pull request #6536:
URL: https://github.com/apache/trafficcontrol/pull/6536#discussion_r798807755
##########
File path: traffic_portal/app/src/common/modules/form/role/form.role.tpl.html
##########
@@ -44,11 +44,17 @@
<div class="form-group" ng-class="{'has-error': hasError(roleForm.description), 'has-feedback': hasError(roleForm.description)}">
<label for="description" class="control-label col-md-2 col-sm-2 col-xs-12">Description</label>
<div class="col-md-10 col-sm-10 col-xs-12">
- <textarea name="description" id="description" ng-readonly="!hasPropertyError(roleForm.name, 'pattern') && role.name === 'admin'" type="text" class="form-control" ng-model="role.description" rows="10" required autofocus></textarea>
+ <textarea name="description" id="description" ng-readonly="!hasPropertyError(roleForm.name, 'pattern') && role.name === 'admin'" type="text" class="form-control" ng-model="role.description" rows="3" required autofocus></textarea>
<small class="input-error" ng-show="hasPropertyError(roleForm.description, 'required')">Required</small>
<span ng-show="hasError(roleForm.description)" class="form-control-feedback"><i class="fa fa-times"></i></span>
</div>
</div>
+ <div class="form-group">
+ <label for="permissions" class="control-label col-md-2 col-sm-2 col-xs-12">Permissions</label>
+ <div class="col-md-10 col-sm-10 col-xs-12">
+ <textarea name="permissions" id="permissions" type="text" class="form-control" ng-model="role.permissions.join('\n')" rows="10" readonly autofocus></textarea>
Review comment:
multiple elements on the same page should not have `autofocus` - it won't have any effect and can lead to inconsistent and/or undesirable UX
The two-way binding of ngModel is pointless on a control that's always `readonly`, should probably use ngValue instead
`type` is not a valid attribute for a `textarea` tag
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@trafficcontrol.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org