2024-09-03 15:29:32 +00:00
|
|
|
# frozen_string_literal: true
|
|
|
|
|
|
|
|
module SystemHelpers
|
|
|
|
def admin_user
|
2025-01-03 08:28:14 +00:00
|
|
|
Fabricate(:admin_user)
|
2024-09-03 15:29:32 +00:00
|
|
|
end
|
|
|
|
|
|
|
|
def submit_button
|
|
|
|
I18n.t('generic.save_changes')
|
|
|
|
end
|
|
|
|
|
|
|
|
def success_message
|
|
|
|
I18n.t('generic.changes_saved_msg')
|
|
|
|
end
|
|
|
|
|
|
|
|
def form_label(key)
|
|
|
|
I18n.t key, scope: 'simple_form.labels'
|
|
|
|
end
|
2024-09-09 08:01:26 +00:00
|
|
|
|
|
|
|
def css_id(record)
|
|
|
|
"##{dom_id(record)}"
|
|
|
|
end
|
2024-09-03 15:29:32 +00:00
|
|
|
end
|