mirror of
https://github.com/basecamp/once-campfire.git
synced 2026-08-11 17:40:43 +09:00
df76a227dc
First open source release of Campfire 🎉
26 lines
749 B
Ruby
26 lines
749 B
Ruby
module Users::ProfilesHelper
|
|
def profile_form_with(model, **params, &)
|
|
form_with \
|
|
model: @user, url: user_profile_path, method: :patch,
|
|
data: { controller: "form" },
|
|
**params,
|
|
&
|
|
end
|
|
|
|
def profile_form_submit_button
|
|
tag.button class: "btn btn--reversed center txt-large", type: "submit" do
|
|
image_tag("check.svg", aria: { hidden: "true" }, size: 20) +
|
|
tag.span("Save changes", class: "for-screen-reader")
|
|
end
|
|
end
|
|
|
|
def web_share_session_button(url, title, text, &)
|
|
tag.button class: "btn", hidden: true, data: {
|
|
controller: "web-share", action: "web-share#share",
|
|
web_share_url_value: url,
|
|
web_share_text_value: text,
|
|
web_share_title_value: title
|
|
}, &
|
|
end
|
|
end
|