{% extends 'base.html.twig' %} {% block title %}{{ 'USER_PROFILE_TITLE'|translate }}{% endblock %} {% block wrapperClass %}myspace profile{% endblock %} {% block body %} {% endblock %} {% block assetsBottom %} {{ parent() }} {{ upl|raw }} {{ fetchFormValidation('changeProfileForm','outputProfile','successProfile(responseText);', false, true)|raw }} {{ fetchFormValidation('changePasswordForm','outputPassword','successPassword(responseText);', false, true)|raw }} {{ fetchFormValidation('changePersonalForm','outputPersonal','successPersonal(responseText);', false, true)|raw }} {% endblock %} {% block readyStateFunction %} initCircle(); {% if redirected is not null %} {% if redirected == 1 %} setTimeout(scrollToElement('myAccountAnchor'), 1000); {% elseif redirected == 2 %} setTimeout(scrollToElement('personalInfoAnchor'), 1000); {% elseif redirected == 3 %} setTimeout(scrollToElement('socialConnectAnchor'), 1000); {% elseif redirected == 4 %} setTimeout(scrollToElement('profileSurveyAnchor'), 1000); {% elseif redirected == 5 %} setTimeout(scrollToElement('activitySurveyAnchor'), 1000); {% elseif redirected == 6 %} setTimeout(scrollToElement('onlineSurveyAnchor'), 1000); {% endif %} {% endif %} initSurveyFormUploaders(); {% if numberOfKids > 0 %} showBirthdatesChildren({{ numberOfKids }}); {% endif %} if(typeof initAddressField !== 'undefined'){ initAddressField(); } $('#fk_web_countries').change(function(){ $.get("{{ regGet('url') }}ajax/loadaddressfields/" + $('#fk_web_countries').val()) .done(function(data) { $('#addressFields').html(data); initAddressField(); }); }); {% set level1Complete = (profile.level1 is defined and profile.level1 == true) %} {% if level1Complete %} $('#updateProfileButton').html('{{ "UPDATE"|translate }}'); $('#updateProfileButton').css('opacity', '0.5'); {% endif %} {% set level2Complete = (profile.level2 is defined and profile.level2 == true) %} {% if level2Complete %} $('#updatePersonalButton').html('{{ "UPDATE"|translate }}'); $('#updatePersonalButton').css('opacity', '0.5'); {% endif %} {% set level4Complete = (profile.level4 is defined and profile.level4 == true) %} {% if level4Complete %} $('#updateProfileSurvey').html("{{ "UPDATE_PROFILE_SURVEY"|translate }}"); {% endif %} {% set level5Complete = (profile.level5 is defined and profile.level5 == true) %} {% if level5Complete %} $('#updateActivitySurvey').html("{{ "UPDATE_ONLINE_SURVEY"|translate }}"); {% endif %} {% set level6Complete = (profile.level6 is defined and profile.level6 == true) %} {% if level6Complete %} $('#updateOnlineSurvey').html("{{ "UPDATE_ACTIVITY_SURVEY"|translate }}"); {% endif %} $('.profileInput').on('input', function() { $('#updateProfileButton').css('opacity', '1'); }); $('.personalInput').on('input', function() { $('#updatePersonalButton').css('opacity', '1'); }); $('#addressFields :input,select').on('input', function() { $('#updatePersonalButton').css('opacity', '1'); }); {% endblock readyStateFunction %}