snapshotForm = (req) =>
  new Form({
    action: "/admin/set-snapshot",
    onChange: `saveAndContinue(this);`,
    noSubmitButton: true,
    additionalButtons: [
      {
        label: req.__("Snapshot now"),
        id: "btnSnapNow",
        class: "btn btn-outline-secondary",
        onclick:
          "ajax_post('/admin/snapshot-now/'+prompt('Name of snapshot (optional)'))",
      },
    ],
    fields: [
      {
        type: "Bool",
        label: req.__("Periodic snapshots enabled"),
        name: "snapshots_enabled",
        sublabel: req.__(
          "Snapshot will be made every hour if there are changes"
        ),
      },
    ],
  })
Snapshot Form
@param req
@returns {Form}