-//= require leaflet.locate
+//= require leaflet.locatecontrol/src/L.Control.Locate
$(document).ready(function () {
if ($("#map").length) {
iconLoading: "icon geolocate",
strings: {
title: I18n.t("javascripts.map.locate.title"),
- popup: I18n.t("javascripts.map.locate.popup")
+ popup: function (options) {
+ return I18n.t("javascripts.map.locate." + options.unit + "Popup", { count: options.distance });
+ }
}
}).addTo(map);
$("select#user_auth_provider").on("change", updateAuthUID);
- $("input#user_image").on("change", function () {
- $("#image_action_new").prop("checked", true);
+ $("input#user_avatar").on("change", function () {
+ $("#user_avatar_action_new").prop("checked", true);
});
function enableAuth() {
$("input[name=legale]").change(function () {
var url = $(this).data("url");
- $("#contributorTerms").html("<img src='" + OSM.SEARCHING + "' />");
+ $("#contributorTerms").html("<div class='spinner-border' role='status'><span class='visually-hidden'>" + I18n.t("browse.start_rjs.loading") + "</span></div>");
$("#contributorTerms").load(url);
});
+
+ $("#read_ct").on("click", function () {
+ $("#continue").prop("disabled", !($(this).prop("checked") && $("#read_tou").prop("checked")));
+ });
+
+ $("#read_tou").on("click", function () {
+ $("#continue").prop("disabled", !($(this).prop("checked") && $("#read_ct").prop("checked")));
+ });
});