<div data-ng-controller="AdminFieldTemplatesCtrl">
  <div class="configSection row" data-ng-init="fields = resources.fieldtemplates">
    <div class="col-md-12">
      <div>
        <span data-translate>Question templates</span>
        <button class="btn btn-sm btn-primary show-add-question-btn" data-ng-click="toggleAddQuestion()">
          <i class="fa-solid fa-plus"></i>
          <span data-translate>Add</span>
        </button>
        <span class="custom-file">
          <label file-input="importQuestion(file)" file-input-label="Import" class="file-upload btn btn-sm btn-outline-secondary"></label>
        </span>
      </div>
    </div>
    <div class="configSection col-md-6" data-ng-if="showAddQuestion">
      <div data-ng-form="newField" class="addField" novalidate>
        <div data-ng-controller="AdminFieldTemplatesAddCtrl" data-ng-include="'views/admin/questionnaires/add_field.html'"></div>
      </div>
    </div>
    <div class="col-md-12" data-ng-repeat="field in fields | filter: {editable: true} | orderBy:'label'">
      <div data-ng-include="'views/admin/questionnaires/fields.html'"></div>
    </div>
  </div>
</div>
