forms.js 2.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778
  1. export const settingsForms = {
  2. forms: {
  3. single_editor: true,
  4. optional_text: '', // OLD appSetting('layout', 'form_fields_optional_text')
  5. mandatory_icon: 'Asterisk', // OLD appSetting('layout', 'form_fields_mandatory_icon')
  6. auto_ghosts_in_files: true,
  7. form_container: '@container/form-container w-full gap-4 mx-auto ',
  8. field_padding: ' gap-1 ',
  9. caption_classes:
  10. 'font-semibold text-sm text-card-foreground',
  11. without_captions: [
  12. // OLD appSetting('forms', 'form_without_captions')
  13. 'sys_login',
  14. 'sys_account_create',
  15. 'sys_forgot_password',
  16. 'bx_invites_request_send',
  17. ],
  18. /**
  19. * When true, forms in `without_captions` use floating “eyebrow” labels:
  20. * caption rests inside the field like a placeholder, then moves onto the
  21. * top edge when the field is focused or has a value.
  22. */
  23. adaptive_labels: true,
  24. visibility_control_names: [
  25. // appSetting('layout', 'form_' + name + '_control_names')
  26. '*_allow_view_to',
  27. '*_object_privacy_view',
  28. ],
  29. selector_control_names: ['*_cat', '*_space_cat'],
  30. /** Form display names excluded from the web modal "unsaved changes" close guard. */
  31. skip_unsaved_close_guard: [
  32. 'comment',
  33. 'feed',
  34. 'feed_edit',
  35. 'bx_messenger',
  36. 'bx_timeline_post_add_profile',
  37. ],
  38. password_eye_button: {
  39. image: {
  40. visible: 'Eye',
  41. hidden: 'EyeClosed',
  42. },
  43. },
  44. sys_login: { hide_errors: true, button_full_width: true },
  45. sys_forgot_password: {
  46. hide_errors: true,
  47. button_full_width: true,
  48. hide_on_msg: true,
  49. },
  50. bx_invites_request_send: {
  51. hide_errors: true,
  52. button_full_width: true,
  53. },
  54. sys_account_create: {
  55. hide_errors: true,
  56. button_full_width: true,
  57. },
  58. /**
  59. * Client-side image prepare before UNA upload.
  60. * `skip_resize[module]` uploads the original. `by_module[module]`
  61. * overrides max box (image is scaled to fit, not cropped).
  62. */
  63. image_upload: {
  64. max_width: 2000,
  65. max_height: 2000,
  66. webp_over_mb: 4,
  67. skip_resize: {},
  68. by_module: {},
  69. },
  70. }
  71. }