[openstreetmap/openstreetmap-website] Add social profile links (PR #5439)
Tom Hughes
notifications at github.com
Mon Feb 17 20:42:58 UTC 2025
@tomhughes commented on this pull request.
> @@ -10,6 +10,35 @@ $(document).ready(function () {
var defaultHomeZoom = 12;
var map, marker, deleted_lat, deleted_lon;
+ if ($("#social_links").length) {
+ $("#add-social-link").click(function (event) {
+ event.preventDefault();
+ const newIndex = -Date.now();
+ const socialLinkForm = $(`
+ <div class="social-link-added-fields row mb-3">
+ <div class="col-sm-8">
+ <input class="form-control" type="text" name="user[social_links_attributes][${newIndex}][url]" id="user_social_links_attributes_${newIndex}_url">
+ </div>
+ <button type="button" class="btn btn-outline-primary col-sm-2 align-self-start">${I18n.t("javascripts.profiles.edit.social_links.remove")}</button>
You can control which strings are exported to javascript with `config/i18n-js.yml` but I'm confused now because I was getting missing translations with the current code. Maybe I forgot to re-export the translations.
--
Reply to this email directly or view it on GitHub:
https://github.com/openstreetmap/openstreetmap-website/pull/5439#discussion_r1958756895
You are receiving this because you are subscribed to this thread.
Message ID: <openstreetmap/openstreetmap-website/pull/5439/review/2621919375 at github.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstreetmap.org/pipermail/rails-dev/attachments/20250217/7fe4085c/attachment.htm>
More information about the rails-dev
mailing list