/* --------------------------------------------------------------------------- Ajuste en formulario Hubspot, que repara el selector de LISTA de PROVINCIAS, que es dependiente del país. En las opciones de "provincia" salía también el código de la provincia: ( A CORUÑA[9b4032be-a5f1-df11-af0a-02bf0a09015e] ) --------------------------------------------------------------------------- */ var hubspotFormFIX = new function () { var initHubspotForm = function($form) { var regionsList = []; var $country = $('select[name="countrylist"]', $form); var $region = $('select[name="stateprovincelist"]', $form); var pushIfNew = function (obj) { for (var i = 0; i < regionsList.length; i++) { if (regionsList[i].id === obj.id) { return; } } regionsList.push(obj); }; var setRegionsList = function () { var myRegexp = /([^\[]+)\[([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})\]/g; $('option', $region).each(function () { var literal = $(this).html(); var match = myRegexp.exec(literal); if (match != null) { pushIfNew({ "id" : $(this).val(), "name" : match[1], "countryId": match[2], }); } else { pushIfNew({ "id" : $(this).val(), "name" : literal, "countryId": '', }); } }); }; var getRegions = function (countryId) { return $.grep(regionsList, function (item) { return item.countryId == countryId || item.id == ""; }); }; var repopulateSelect = function ($select, values) { $select.find("option").remove(); var output = []; $.each(values, function (key, value) { output.push(''); }); $select.html(output.join('')); }; var onCountryChange = function () { var selectedValue = $country.find("option:selected").val(); var filteredRegionList = []; if (selectedValue !== '') { filteredRegionList = getRegions(selectedValue); repopulateSelect($region, filteredRegionList); } if (filteredRegionList.length < 2) { $region.val(''); $region.parent().parent().css("display", "none"); $region.closest('.hs-form-field').removeClass('filtred'); } else { $region.parent().parent().css("display", "block"); $region.closest('.hs-form-field').addClass('filtred'); } $region.attr("required", (filteredRegionList.length > 1)); }; if (!regionsList.length) { setRegionsList(); } var selectedRegion = $region.val(); if (selectedRegion != "") { onCountryChange(); $region.val(selectedRegion).removeAttr("disabled"); } else { $region.attr("disabled", true); } $country.on('change', onCountryChange); }; return { init: function () { $(document).on('focus', 'form.hs-form', function(e) { var $form = $(this); if (!$form.hasClass('form-processed')) { e.preventDefault(); console.log("Init form"); $form.addClass('form-processed'); initHubspotForm($form); } }); if ($('form.hs-form').length) { $('.footer-content_footer_last .footer-content_footer_inner').append(''); } } }; }; module.exports = hubspotFormFIX

IE University admissions process: a guide

@Becoming an IE Student

Like many other institutions, IE University has had to adapt to the reality of the COVID-19 pandemic. A 100% online admissions process is part of our response, making it easier for prospective master’s students from the get-go.

Top jobs for sales executives 2021

@Career Paths

The disruptions brought on by the global pandemic in 2020 have had lasting effects on how businesses are designed and run. Pre-pandemic trends such as digital transformation and increased focus on customer experience have accelerated...

Don’t just mimic dynamic leaders. Become one.

@Learning & Academics

The issue of leadership had hit the headlines far before the pandemic came into play. For a number of years, the business world has been all too aware of issues related to inclusion and empathy in the workplace...

The design entrepreneur: This is your moment

@Career Paths

Design is king in the COVID-19 world, especially when it comes to startups. But design entrepreneurship doesn’t have to look like what it does in the traditional sense. As the business and workforce landscapes...

The importance of sustainability at IE University

@IE Core

It’s all too easy to just talk about sustainability, particularly in business. It can be written into a mission statement or stated as a goal to satisfy interested ...

Want to know more?

No any image found. Please check it again or try with another instagram account.
No any image found. Please check it again or try with another instagram account.
No any image found. Please check it again or try with another instagram account.