editRole2FAPolicyForm = (role, twofa_policy_by_role, req) =>
  form(
    {
      action: `/roleadmin/setrole2fapolicy/${role.id}`,
      method: "post",
    },
    csrfField(req),
    select(
      {
        name: "policy",
        onchange: "form.submit()",
        class: "form-select form-select-sm w-unset d-inline",
      },
      ["Optional", "Disabled", "Mandatory"].map((p) =>
        option({ selected: twofa_policy_by_role[role.id] === p }, p)
      )
    )
  )
@param {Role} role
@param twofa_policy_by_role
@param {object} req
@returns {Form}