/* The ONE source of truth for the "skill profile" rule — the 15-point budget. Two forms render this rule: the directory application form (/odoo-community-developers/) and the private self-service edit form (/freelancer-edit/). Both take the legend, the directive and the wrong-total message from here, so the two cannot word the same rule differently again. Loaded before each page's own script. */ (function () { var TOTAL = 15; window.O4PFocus = { TOTAL: TOTAL, MAX: 5, LEGEND: "Skill profile — 15 points to distribute", DIRECTIVE: "Distribute all 15 points across the five areas — they cannot all be 0.", /* The wrong-total message, naming the direction to move. "" when the sum is right. */ message: function (sum) { if (sum === TOTAL) return ""; if (sum === 0) return "You have 0 of " + TOTAL + " — place all " + TOTAL + " points."; if (sum > TOTAL) return "You have " + sum + " of " + TOTAL + " — remove " + (sum - TOTAL) + "."; return "You have " + sum + " of " + TOTAL + " — add " + (TOTAL - sum) + "."; } }; })();