<div class="form-group">
  <label class="control-label" for="{{:: $ctrl.entity.name + '_security' }}">
    {{:: ts('Security') }}
  </label>
  <select id="{{:: $ctrl.entity.name + '_security' }}" ng-model="$ctrl.entity.security" class="form-control">
    <option value="RBAC">{{:: ts('Role-Based') }}</option>
    <option value="FBAC">{{:: ts('Form-Based') }}</option>
  </select>
</div>
<div class="form-group">
  <label>
    {{:: ts('Allowed Actions') }}
  </label>
  <div class="checkbox-inline">
    <label><input type="checkbox" ng-model="$ctrl.entity.actions.create">{{:: ts('Create') }}</label>
  </div>
  <div class="checkbox-inline">
    <label><input type="checkbox" ng-model="$ctrl.entity.actions.update">{{:: ts('Update') }}</label>
  </div>
</div>
<div ng-if="$ctrl.entity.actions.update">
  <div class="checkbox">
    <label>
      <input type="checkbox" ng-model="$ctrl.entity['url-autofill']" ng-true-value="'1'" ng-false-value="'0'" />
      {{:: ts('Accept ID from URL') }}
    </label>
  </div>
  <div class="description bg-warning" ng-if="$ctrl.entity['url-autofill'] === '1' && $ctrl.entity.security === 'FBAC'">
    <i class="crm-i fa-warning"></i>
    {{:: ts('Without Role-Based access, users of the form will be able to view and update any %1 by changing the id in the URL.', {1: getMeta().label}) }}
  </div>
  <div class="description" ng-if="$ctrl.entity['url-autofill'] === '1'">
    {{:: ts('Update %1 by including the id in the link to this form:', {1: getMeta().label}) }}
    <code>
      {{ ($ctrl.editor.getLink() || '') + '#?' + $ctrl.entity.name + '=123' }}
    </code>
  </div>
</div>
