<div class="row">
  <div class="col-md-12">
    <div class="col-md-12">
      <label class="required">
        <translate>common.name</translate>
      </label>
      <select
        class="form-control"
        ng-model="edit_resource.restriction"
        ng-options="restriction.name for restriction in restrictions track by restriction.name | filter : text "
        ng-change="onUserRestrictionChange()"
      >
      </select>
    </div>
  </div>
</div>

<br />

<div class="row">
  <div class="col-md-12">
    <div class="col-md-2">
      <label class="required">
        <translate>rights.restriction.modes</translate>
      </label>
    </div>
    <div class="col-md-3">
      <div class="col-md-12">
        <label class="normal">
          <input
            type="checkbox"
            ng-disabled="!edit_resource.restriction.modes.userchoice || !edit_resource.restriction.name || edit_resource.restriction.modes.query || edit_resource.restriction.modes.viewer"
            ng-model="edit_resource.restriction.modes.edition"
          />
          <span
            ng-class="{'disabled': !edit_resource.restriction.modes.userchoice || !edit_resource.restriction.name || edit_resource.restriction.modes.query || edit_resource.restriction.modes.viewer}"
            translate
          >
            tools.builder.components.tabs.edition
          </span>
        </label>
      </div>
      <div class="col-md-12">
        <label class="normal">
          <input
            type="checkbox"
            ng-disabled="!edit_resource.restriction.modes.userchoice || !edit_resource.restriction.name || edit_resource.restriction.modes.viewer"
            ng-model="edit_resource.restriction.modes.query"
            ng-change="onQueryRestrictionModeChange()"
          />
          <span
            ng-class="{'disabled': !edit_resource.restriction.modes.userchoice || !edit_resource.restriction.name || edit_resource.restriction.modes.viewer}"
            translate
          >
            rights.restriction.requetage
          </span>
        </label>
      </div>
      <div class="col-md-12">
        <label class="normal">
          <input
            type="checkbox"
            ng-disabled="!edit_resource.restriction.modes.userchoice || !edit_resource.restriction.name"
            ng-model="edit_resource.restriction.modes.viewer"
            ng-change="changedViewer(edit_resource.restriction.modes)"
          />
          <span
            ng-class="{'disabled': !edit_resource.restriction.modes.userchoice || !edit_resource.restriction.name}"
            translate
          >
            rights.restriction.viewer
          </span>
        </label>
      </div>
    </div>
  </div>
</div>

<br />

<br />
