<div class="card card-default">
  <div class="card-body">
    <form name="adminIPAccessControlForm">
      <div class="row">
        <div class="col-md-12">
          <div class="form-group">
            <label data-translate>Restrict access to specific IP addresses</label>
          </div>
          <table class="table table-bordered">
            <thead>
              <tr>
                <th data-translate>Role</th>
                <th data-translate>Enabled</th>
                <th data-translate>Allowed IP addresses</th>
              </tr>
            </thead>
            <tbody>
              <tr>
                <td data-translate>Admin</td>
                <td><input data-ng-model="resources.network.ip_filter_admin_enable" type="checkbox"></td>
                <td><input data-ng-if="resources.network.ip_filter_admin_enable" class="form-control" name="ip_filter_list" data-ng-model="resources.network.ip_filter_admin" type="text" autocomplete="off" /></td>
              </tr>
              <tr data-ng-if="resources.network.enable_custodian">
                <td data-translate>Custodian</td>
                <td><input data-ng-model="resources.network.ip_filter_custodian_enable" type="checkbox"></td>
                <td><input data-ng-if="resources.network.ip_filter_custodian_enable" class="form-control" name="ip_filter_list" data-ng-model="resources.network.ip_filter_custodian" type="text" autocomplete="off" /></td>
              </tr>
              <tr>
                <td data-translate>Recipient</td>
                <td><input data-ng-model="resources.network.ip_filter_receiver_enable" type="checkbox"></td>
                <td><input data-ng-if="resources.network.ip_filter_receiver_enable" class="form-control" name="ip_filter_list" data-ng-model="resources.network.ip_filter_receiver" type="text" autocomplete="off" /></td>
              </tr>
            </tbody>
          </table>
          <div>
            <div><span data-translate>Each entry must be separated with a comma.</span></div>
            <div><span data-translate>Example:</span> <span>212.35.212.87,192.0.2.0/24,2001:db8::/32</span></div>
          </div>
        </div>
      </div>
      <hr />
      <div class="row">
        <div class="col-md-6">
          <button id="AccessControlSave" class="btn btn-primary" data-ng-disabled="adminIPAccessControlForm.$invalid" data-ng-click="Utils.update(resources.network)" type="submit">
            <i class="fa-solid fa-check"></i>
            <span data-translate>Save</span>
          </button>
        </div>
      </div>
    </form>
  </div>
</div>
