github.com/outbrain/consul@v1.4.5/ui-v2/app/templates/dc/acls/policies/-fieldsets.hbs (about) 1 <fieldset> 2 <label class="type-text{{if item.error.Name ' has-error'}}"> 3 <span>Name</span> 4 {{input value=item.Name name='policy[Name]' autofocus='autofocus'}} 5 <em> 6 Maximum 128 characters. May only include letters (uppercase and/or lowercase) and/or numbers. Must be unique. 7 </em> 8 {{#if item.error.Name}} 9 <strong>{{item.error.Name.validation}}</strong> 10 {{/if}} 11 </label> 12 <label class="type-text"> 13 <span>Rules <a href="{{env 'CONSUL_DOCUMENTATION_URL'}}/guides/acl.html#rule-specification" rel="help noopener noreferrer" target="_blank">(HCL Format)</a></span> 14 {{code-editor id="policy_rules" syntax='hcl' class=(if item.error.Rules 'error') name='policy[Rules]' value=item.Rules onkeyup=(action 'change' 'policy[Rules]')}} 15 {{#if item.error.Rules}} 16 <strong>{{item.error.Rules.validation}}</strong> 17 {{/if}} 18 </label> 19 <div class="type-toggle"> 20 <span>Valid datacenters</span> 21 <label> 22 <input type="checkbox" name="policy[isScoped]" checked={{if (not isScoped) 'checked' }} onchange={{action 'change'}} /> 23 <span>All</span> 24 </label> 25 </div> 26 {{#if isScoped }} 27 <div class="checkbox-group" role="group"> 28 {{#each datacenters as |dc| }} 29 <label class="type-checkbox"> 30 <input type="checkbox" name="policy[Datacenters]" value={{dc.Name}} checked={{if (contains dc.Name item.Datacenters) 'checked' }} onchange={{action 'change'}} /> 31 <span>{{dc.Name}}</span> 32 </label> 33 {{/each}} 34 {{#each item.Datacenters as |dc| }} 35 {{#if (not (find-by 'Name' dc datacenters))}} 36 <label class="type-checkbox"> 37 <input type="checkbox" name="policy[Datacenters]" value={{dc}} checked="checked" onchange={{action 'change'}} /> 38 <span>{{dc}}</span> 39 </label> 40 {{/if}} 41 {{/each}} 42 </div> 43 {{/if}} 44 <label class="type-text"> 45 <span>Description (Optional)</span> 46 <textarea name="policy[Description]" value={{item.Description}} oninput={{action 'change'}}></textarea> 47 </label> 48 </fieldset> 49