renameForm = (table_id, req) =>
  new Form({
    action: `/table/rename/${table_id}`,
    blurb: req.__(
      "You may need to adjust view relations associated with this table after renaming it"
    ),
    fields: [
      {
        name: "name",
        label: req.__("New table name"),
        type: "String",
      },
    ],
    additionalButtons: [
      {
        label: req.__("Cancel"),
        class: "btn btn-danger",
        onclick: "history.back()",
      },
    ],
    values: { name: Table.findOne({ id: table_id })?.name },
  })
Rename Table Form
Allows to set up new table name
@param {string} table_id
@param {object} req
@returns {Form}