Form: Signup

<div class="u-mb-base">

    <div class="c-stepper  u-relative u-overflow-x-auto u-mb-large">
        <div class="c-stepper__line u-size-full u-absolute u-left"></div>
        <ul class="u-flex u-row u-justify-between u-p-none u-m-none u-nowrap u-list-none u-z-base">

            <li class="c-stepper__element c-stepper__element--active o-link-primary u-flex u-items-center u-justify-center u-z-undercover">

                <span class="u-label-11">1</span>

            </li>

            <li class="c-stepper__element c-stepper__element--active o-link-primary u-flex u-items-center u-justify-center u-z-undercover">

                <span class="u-label-11">2</span>

            </li>

            <li class="c-stepper__element c-stepper__element--active o-link-primary u-flex u-items-center u-justify-center u-z-undercover">

                <span class="u-label-11">3</span>

            </li>

        </ul>
    </div>

</div>

<form id="-signup-form" class="fw__wrapper u-mb-large" onsubmit="window.ga && ga( 'send', 'event', 'Community');" method="post" action="myPage.php" novalidate>
    <fieldset data-toggle="-signup-fw__step" class="fw__inputs o-divider -signup-fw__step u-pl-none u-pr-none u-mb-medium">

        <!-- hgroup -->
        <div class="u-text-center u-mb-large">
            <h1 class="u-heading-03"></h1>
            <p class="u-mb-large u-color-secondary"></p>
        </div>
        <!-- end hgroup -->
        <!-- social logins -->
        <div class="u-flex u-row">
            <div class="u-mb-base u-wrap-row">
                <a href="user--edit2021" class="c-btn c-btn--google u-justify-center u-flex u-label-04 u-cursor-pointer c-btn--large u-text-center u-block u-no-underline">
                    <svg class="o-icon o-icon--fill o-icon--sm u-mr-small@lg u-self-center">
                        <use xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="#icon-google"></use>
                    </svg>
                    <span class="u-none u-inline-block@sm">Google</span>
                </a>
            </div>
            <div class="u-mb-base u-mr-small u-ml-small u-wrap-row">
                <a href="user--edit2021" class="c-btn c-btn--facebook u-justify-center u-flex u-label-04 u-cursor-pointer c-btn--large u-text-center u-block u-no-underline">
                    <svg class="o-icon o-icon--fill o-icon--sm u-mr-small@lg u-self-center">
                        <use xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="#icon-facebook"></use>
                    </svg>
                    <span class="u-none u-inline-block@sm">Facebook</span>
                </a>
            </div>
            <div class="u-mb-base u-wrap-row">
                <a href="user--edit2021" class="c-btn c-btn--apple u-justify-center u-flex u-label-04 u-cursor-pointer c-btn--large u-text-center u-block u-no-underline">
                    <svg class="o-icon o-icon--fill o-icon--sm u-mr-small@lg u-self-center">
                        <use xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="#icon-apple"></use>
                    </svg>
                    <span class="u-none u-inline-block@sm">Apple</span>
                </a>
            </div>
        </div>
        <!-- end social logins -->
        <p class="o-text-overline u-text-center">
            <span class="o-text u-color-secondary">oppure registrati con la tua email</span>
        </p>
        <!-- native login -->
        <div class="u-flex u-column u-row@md">
            <div class="u-mb-base u-size-full u-size-1-2 u-mr-xsmall ">
                <div class="">

                    <label class="u-label-04 u-color-base" for="">Email*</label>

                    <input class=" u-block u-size-full" type="text" placeholder="">

                </div>

                <!-- TODO: REVIEW ICON POSITION -->

            </div>
            <div class="u-mb-base u-size-full u-size-1-2 u-ml-xsmall@md ">
                <div class="">

                    <label class="u-label-04 u-color-base" for="">Password*</label>

                    <input class=" u-block u-size-full" type="password" placeholder="">

                </div>

                <!-- TODO: REVIEW ICON POSITION -->

            </div>
        </div>
        <div class="u-flex u-column u-row@md">
            <div class="u-mb-base u-size-full u-size-1-2 u-mr-xsmall ">
                <div class="">

                    <label class="u-label-04 u-color-base" for="">Nome*</label>

                    <input class=" u-block u-size-full" type="text" placeholder="">

                </div>

                <!-- TODO: REVIEW ICON POSITION -->

            </div>
            <div class="u-mb-base u-size-full u-size-1-2 u-ml-xsmall@md ">
                <div class="">

                    <label class="u-label-04 u-color-base" for="">Cognome*</label>

                    <input class=" u-block u-size-full" type="text" placeholder="">

                </div>

                <!-- TODO: REVIEW ICON POSITION -->

            </div>
        </div>
        <div class="u-mb-base ">
            <div class="">

                <label class="u-label-04 u-color-base" for="">Indirizzo*</label>

                <input class=" u-block u-size-full" type="text" placeholder="">

            </div>

            <!-- TODO: REVIEW ICON POSITION -->

        </div>
        <div class="u-my-large">
            <strong class="u-mb-base">Autorizzo al trattamento dei miei dati per:</strong>

            <div class="c-accordion c-accordion--borderless u-label-07">
                <p class="u-mb-base">
                    Ricevere informazioni promozionali e sondaggi di opinione via e-mail, sms e notifiche da parte di Citynews S.p.A.&#39;
                </p>
            </div>
            <div class="u-flex u-column u-row@md u-mb-base">
                <div class="u-mb-base u-size-full u-size-1-2 u-mr-xsmall ">
                    <label class="c-form-radio">

                        <span class="u-label-04 u-color-base u-inline-block" for="">Do il consenso</span>

                        <input type="radio" checked="checked" name="radio">
                        <span class="c-form-radio__mark"></span>
                    </label>
                </div>
                <div class="u-mb-base u-size-full u-size-1-2 u-ml-xsmall@md ">
                    <label class="c-form-radio">

                        <span class="u-label-04 u-color-base u-inline-block" for="">Non do il consenso</span>

                        <input type="radio" checked="checked" name="radio">
                        <span class="c-form-radio__mark"></span>
                    </label>
                </div>
            </div>

            <div class="c-accordion c-accordion--borderless u-label-07">
                <p class="u-mb-base">
                    Comunicare i miei dati a società terze per ricevere informazioni promozionali e sondaggi di opinione via e-mail, sms e notifiche
                </p>
            </div>
            <div class="u-flex u-column u-row@md u-mb-base">
                <div class="u-mb-base u-size-full u-size-1-2 u-mr-xsmall ">
                    <label class="c-form-radio">

                        <span class="u-label-04 u-color-base u-inline-block" for="">Do il consenso</span>

                        <input type="radio" checked="checked" name="radio">
                        <span class="c-form-radio__mark"></span>
                    </label>
                </div>
                <div class="u-mb-base u-size-full u-size-1-2 u-ml-xsmall@md ">
                    <label class="c-form-radio">

                        <span class="u-label-04 u-color-base u-inline-block" for="">Non do il consenso</span>

                        <input type="radio" checked="checked" name="radio">
                        <span class="c-form-radio__mark"></span>
                    </label>
                </div>
            </div>

            <div class="c-accordion c-accordion--borderless u-label-07">
                <p class="u-mb-base">
                    Effettuare analisi di profilazione per migliorare l’offerta e i servizi del sito in linea con le mie preferenze e i miei interessi
                </p>
            </div>
            <div class="u-flex u-column u-row@md u-mb-base">
                <div class="u-mb-base u-size-full u-size-1-2 u-mr-xsmall ">
                    <label class="c-form-radio">

                        <span class="u-label-04 u-color-base u-inline-block" for="">Accetto</span>

                        <input type="radio" checked="checked" name="radio">
                        <span class="c-form-radio__mark"></span>
                    </label>
                </div>
                <div class="u-mb-base u-size-full u-size-1-2 u-ml-xsmall@md ">
                    <label class="c-form-radio">

                        <span class="u-label-04 u-color-base u-inline-block" for="">Non accetto</span>

                        <input type="radio" checked="checked" name="radio">
                        <span class="c-form-radio__mark"></span>
                    </label>
                </div>
            </div>

        </div>
        <p class="u-label-07 u-color-secondary u-block u-mb-large">
            Completando la registrazione dichiaro di essere maggiorenne e di aver preso visione dell’ <a class="o-link-primary" href="https://citynews.it/privacy#gdpr&_ga=2.195002985.558624410.1646066405-2053839960.1623412359">Informativa Privacy</a> redatta ai sensi del Regolamento UE 679/2016 e di accettare i termini e le <a class="o-link-primary" href="https://citynews.it/termini-servizio#_ga=2.195002985.558624410.1646066405-2053839960.1623412359">condizioni del servizio</a>.
        </p>
        <div class="fw__inputs o-divider__error">
            <p class="fw__inputs o-divider__error--message"></p>
        </div>
        <div class="u-mt-large">

            <div class="u-flex u-items-center">

                <div class="u-size-full u-size-1-2 u-text-right">
                    <input class="fw__button c-btn c-btn--primary u-label-03 u-cursor-pointer c-btn--large u-text-center" type="button" value="Avanti →" onclick="next()" />
                </div>

            </div>

        </div>
        <!-- end native login -->
        <div class="u-text-center u-mt-large u-pl-large u-pr-large u-pl-none@md u-pr-none@md">
            <span class="u-label-07 u-color-secondary u-block u-mb-small">
                Sei già registrato?
                <a class="o-link-primary" href="user--login2021">Accedi col tuo profilo</a>
            </span>
            <span class="u-label-07 u-color-secondary u-block u-mb-small">
                Non hai ancora attivato il tuo profilo?
                <a class="o-link-primary" href="user--activate2021">Attiva il tuo profilo</a>
            </span>
        </div>
    </fieldset>
    <fieldset data-toggle="-signup-fw__step" class="fw__inputs o-divider -signup-fw__step u-pl-none u-pr-none u-mb-medium">
        <!-- page hgroup -->
        <div class="u-mb-large">
            <h2 class="u-heading-03 u-text-center">Inserisci il codice di attivazione</h2>
            <p class="u-mb-large u-text-center">
                Inserisci il codice di attivazione che hai ricevuto per email.<br />
                Non hai ancora ricevuto il codice? Richiedi un nuovo <a class="o-link-primary" href="#">codice di attivazione</a>
            </p>
        </div>
        <!-- end page hgroup -->
        <!-- form activate -->
        <div class="u-mb-base ">
            <div class="">

                <label class="u-label-03 c-form-label u-color-base" for="">Codice di attivazione*</label>

                <div class="u-flex">
                    <input type="text" name='code' class="code-input u-size-1-6 u-size-full u-text-center u-mr-xsmall" data-label="placeholderfieldLabel">
                    <input type="text" name='code' class="code-input u-size-1-6 u-size-full u-text-center u-mr-xsmall" data-label="placeholderfieldLabel">
                    <input type="text" name='code' class="code-input u-size-1-6 u-size-full u-text-center u-mr-xsmall" data-label="placeholderfieldLabel">
                    <input type="text" name='code' class="code-input u-size-1-6 u-size-full u-text-center u-mr-xsmall " data-label="placeholderfieldLabel">
                    <input type="text" name='code' class="code-input u-size-1-6 u-size-full u-text-center u-mr-xsmall" data-label="placeholderfieldLabel">
                    <input type="text" name='code' class="code-input u-size-1-6 u-size-full u-text-center" data-label="placeholderfieldLabel">
                </div>

            </div>

            <script>
                const inputElements = [...document.querySelectorAll('input.code-input')]
                inputElements.forEach((ele, index) => {
                    ele.addEventListener('keydown', (e) => {
                        if (e.keyCode === 8 && e.target.value === '') inputElements[Math.max(0, index - 1)].focus()
                    })
                    ele.addEventListener('input', (e) => {
                        const [first, ...rest] = e.target.value
                        e.target.value = first ?? ''
                        if (index !== inputElements.length - 1 && first !== undefined) {
                            inputElements[index + 1].focus()
                            inputElements[index + 1].value = rest.join('')
                            inputElements[index + 1].dispatchEvent(new Event('input'))
                        }
                    })
                })
            </script>
        </div>
        <div class="fw__inputs o-divider__error">
            <p class="fw__inputs o-divider__error--message"></p>
        </div>
        <div class="u-mt-large">

            <div class="u-flex u-items-center">

                <div class="u-size-full u-size-1-2 ">
                    <input class="c-btn c-btn--default u-label-03 u-cursor-pointer c-btn--large u-text-center" type="button" value="← Indietro" onclick="back()" />
                </div>

                <div class="u-size-full u-size-1-2 u-text-right">
                    <input class="fw__button c-btn c-btn--primary u-label-03 u-cursor-pointer c-btn--large u-text-center" type="submit" value="" />
                </div>

            </div>

        </div>
        <!-- end form activate -->
    </fieldset>
    <fieldset data-toggle="-signup-fw__step" class="fw__inputs o-divider -signup-fw__step u-pl-none u-pr-none u-mb-medium">
        <!-- page hgroup -->
        <div class="u-mb-large">
            <h2 class="u-heading-03 u-text-center">Completa il tuo profilo personale</h2>
            <p class="u-mb-large u-text-center">Modifica le informazioni del profilo personale</p>
        </div>
        <!-- end page hgroup -->
        <!-- complete profile form -->
        <div class="u-mb-xlarge u-flex u-items-center u-column ">
            <div class="">

                <div class="c-form-avatar u-relative ">
                    <svg class="u-absolute u-overflow-hidden" style="width: 0; height: 0;">
                        <defs>
                            <clipPath id="mask" clipPathUnits="objectBoundingBox">
                                <path d="M0.5,1 C0.856900994,1 1,0.856900994 1,0.5 C1,0.143099006 0.856900994,0 0.5,0 C0.143099006,0 0,0.143099006 0,0.5 C0,0.856900994 0.143099006,1 0.5,1 Z" />
                            </clipPath>
                        </defs>
                    </svg>
                    <input class="u-none" type="file" name="image" accept="image/*" />
                    <div class="c-form-avatar__mask u-size-full"></div>
                    <div class="c-form-avatar__uploader u-absolute u-cursor-pointer u-p-xsmall u-radius-circle u-border-none" aria-labelledby="image" aria-describedby="image">
                        <svg class="o-icon o-icon--md o-link-text">
                            <use xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="#icon-upload-cloud"></use>
                        </svg>
                    </div>
                </div>

                <script>
                    const UPLOAD_BUTTON = document.querySelector(".c-form-avatar__uploader");
                    const FILE_INPUT = document.querySelector("input[type=file]");
                    const AVATAR = document.querySelector(".c-form-avatar__mask");
                    UPLOAD_BUTTON.addEventListener("click", () => FILE_INPUT.click());
                    FILE_INPUT.addEventListener("change", event => {
                        const file = event.target.files[0];
                        const reader = new FileReader();
                        reader.readAsDataURL(file);
                        reader.onloadend = () => {
                            AVATAR.setAttribute("aria-label", file.name);
                            AVATAR.style.background = `url(${reader.result}) center center/cover`;
                        };
                    });
                </script>

            </div>
            <div class="u-mt-base u-mt-none@sm u-ml-base@sm">
                <h3 class="u-title-05 u-mb-xsmall">Nome Cognome</h3>
                <span class="u-label-07 u-color-secondary u-block">email@mailservice.com</span>
            </div>
        </div>
        <div class="u-mb-base u-size-full u-size-1-2 ">

            <label class="u-label-04 u-color-base u-inline-block" for="">Sesso</label>

            <select class=" u-block u-size-full" name="select-name" id="select-id">

                <option>option 1</option>

                <option>option 2</option>

                <option>option 3</option>

                <option>option 4</option>

            </select>

        </div>
        <div class="u-mb-base ">
            <div class="">

                <label class="u-label-04 u-color-base" for="">Anno di nascita</label>

                <input class=" u-block u-size-full" type="text" placeholder="">

            </div>

            <!-- TODO: REVIEW ICON POSITION -->

        </div>
        <div class="u-flex u-column u-row@md ">
            <div class="u-mb-base u-size-full u-size-1-2 u-mr-xsmall@md  ">
                <div class="">

                    <label class="u-label-04 u-color-base" for="">Impiego</label>

                    <input class=" u-block u-size-full" type="text" placeholder="">

                </div>

                <!-- TODO: REVIEW ICON POSITION -->

            </div>
            <div class="u-mb-base u-size-full u-size-1-2 u-ml-xsmall@md  ">
                <div class="">

                    <label class="u-label-04 u-color-base" for="">Settore</label>

                    <input class=" u-block u-size-full" type="text" placeholder="">

                </div>

                <!-- TODO: REVIEW ICON POSITION -->

            </div>
        </div>
        <div class="u-mt-large">

            <div class="u-flex u-items-center">

                <div class="u-size-1-2 ">
                    <input class="c-btn c-btn--default u-label-03 u-cursor-pointer c-btn--large u-text-center" type="button" value="Salta passaggio" onclick="next()" />
                </div>

                <div class="u-size-full u-size-1-2 u-text-right">
                    <input class="fw__button c-btn c-btn--primary u-label-03 u-cursor-pointer c-btn--large u-text-center" type="button" value="Completa profilo" onclick="next()" />
                </div>

            </div>

        </div>
        <!-- end complete profile form -->
    </fieldset>
    <section data-toggle="-signup-fw__step" class="fw__result -signup-fw__step">
        <div class="u-mb-large">
            <h2 class="u-heading-03 u-text-center">Grazie per la tua iscrizione</h2>
            <p class="u-mb-large u-text-center">Ti ringraziamo per la tua iscrizione...</p>
            <div class="u-mb-base">
                <a href="homepage--cover" class="c-btn c-btn--default u-label-04 u-cursor-pointer c-btn--large u-text-center u-block u-no-underline">Leggi
                    le ultime notizie</a>
            </div>
            <div class="u-mb-base">
                <a href="#" class="c-btn c-btn--default u-label-04 u-cursor-pointer c-btn--large u-text-center u-block u-no-underline">Invia una segnalazione</a>
            </div>
        </div>

        <!-- subscription CTA -->
        <p class="o-text-overline u-text-center">
            <span class="o-text">Abbonati</span>
        </p>
        <a href="#" class="u-text-center u-block o-link-primary u-bg-primary u-bordered">
            spotlight banner
        </a>
        <!-- end subscription CTA -->

        <!-- app CTA -->
        <p class="o-text-overline u-text-center">
            <span class="o-text">Scarica l'app</span>
        </p>
        <a href="https://www.romatoday.it/~shared/do/api/mobile-app/get/?campaign=user_signup">
            <div class="u-flex u-row@md">
                <div class="u-mb-base u-size-full u-size-1-2 u-mr-xsmall">
                    <img class="u-size-full" src="/assets/images/site/app/google_play_store.svg" alt="googlePlayStoreImg">
                </div>
                <div class="u-mb-base u-size-full u-size-1-2 u-ml-xsmall">
                    <img class="u-size-full" src="/assets/images/site/app/ios_app_store.svg" alt="iosAppStoreImg">
                </div>
            </div>
        </a>
        <!-- end app CTA -->

        <div id="results" class="u-mb-large u-mt-large"></div>
    </section>
</form>

<script>
    window.onload = function() {
        var stepIndex = 0;
    }
    // var modeToggle = document.getElementsByClassName("input:radio[name=c-tabs__choice]:checked");
    // const stepElements = document.querySelector('[data-toggle-step]');
    var stepElements = document.getElementsByClassName("mode-signup-fw__step");
    var form = document.getElementById("mode-signup-form");
    var breadcrumbsItems = document.getElementsByClassName("c-stepper__element");
    // Initialise the form
    function init() {
        // Reset the step
        stepIndex = 0;
        // Clear all fields
        form.reset();
        toggleBreadcrumbsStep();
        showCurrentStep();
        breadcrumbsItems.classList.add("c-stepper__element--active");
    }
    // Indicate the current step with breadcrumbs
    function toggleBreadcrumbsStep() {
        Array.from(breadcrumbsItems).forEach(function(el, index) {
            if (index <= stepIndex) {
                el.classList.add("c-stepper__element--active");
            } else {
                el.classList.remove("c-stepper__element--active");
            }
        });
    }
    // Show the current step and hide the rest
    function showCurrentStep() {
        Array.from(stepElements).forEach(function(el, index) {
            if (index !== stepIndex) {
                el.classList.add("u-none");
            } else {
                el.classList.remove("u-none");
            }
        });
    }
    // Next step action, all fields in current step must be validated before proceed to next step.
    function next() {
        const fields = stepElements[stepIndex].querySelectorAll("input:not([type=button]):not([type=submit]), select");
        // Increment step
        stepIndex++;
        toggleBreadcrumbsStep();
        showCurrentStep();
    }
    // Back button action to navigate 1 step back
    function back() {
        // Clear all fields in current step
        const fields = stepElements[stepIndex].querySelectorAll("input:not([type=button]):not([type=submit]), select");
        Array.from(fields).forEach(function(field) {
            const tagName = field.tagName;
            if (tagName.localeCompare("INPUT") === 0) {
                field.value = '';
            } else if (tagName.localeCompare("SELECT") === 0) {
                field.selectedIndex = 0;
            }
        });
        // Decrement step
        stepIndex--;
        toggleBreadcrumbsStep();
        showCurrentStep();
    }
    form.addEventListener('submit', function(e) {
        e.preventDefault();
        const fields = stepElements[stepIndex].querySelectorAll("input:not([type=button]):not([type=submit]), select");
        // all fields in current step must be validated before submission.
        // Prepare the result in next view
        showResult();
        // Navigate to result
        stepIndex++;
        // toggleBreadcrumbsStep();
        showCurrentStep();
    }, false);

    function showResult() {
        const resultsContainer = document.getElementById("results");
        // Make sure the result page is empty
        resultsContainer.innerHTML = "";
        const fields = form.querySelectorAll("input:not([type=button]):not([type=submit]), select");
        // List out all data
        fields.forEach(field => {
            const fieldLabel = field.getAttribute("data-label");
            const fieldValue = field.value;
            const resultItem = document.createElement("li");
            resultItem.setAttribute("class", "fw__result__item");
            resultItem.innerHTML = '<span class="fw__result__label">' + fieldLabel + ':</span> <strong class="fw__result__value">' + fieldValue + '</strong>';
            resultsContainer.append(resultItem);
        });
    }
    init();
</script>
{% set prevStepForLabel = 'intro-form-radio' %}

<div class="u-mb-base">
{% render "@stepper",{steps:steps},true %}
</div>

<form 
	id="{{mode}}-{{type}}-form" 
	class="fw__wrapper u-mb-large" 
	onsubmit="window.ga && ga( 'send', 'event', 'Community');"
	method="post" 
	action="myPage.php"
	novalidate
>
	<fieldset data-toggle="{{mode}}-{{type}}-fw__step" class="fw__inputs o-divider {{mode}}-{{type}}-fw__step u-pl-none u-pr-none u-mb-medium">

		<!-- hgroup -->
		<div class="u-text-center u-mb-large">
			<h1 class="u-heading-03">{{ page_title }}</h1>
			<p class="u-mb-large u-color-secondary">{{ page_subtitle }}</p>
		</div>
		<!-- end hgroup -->	
		<!-- social logins -->
		<div class="u-flex u-row">
			<div class="u-mb-base u-wrap-row">
				<a href="user--edit2021" class="c-btn c-btn--google u-justify-center u-flex u-label-04 u-cursor-pointer c-btn--large u-text-center u-block u-no-underline">
					<svg class="o-icon o-icon--fill o-icon--sm u-mr-small@lg u-self-center">
						<use xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="#icon-google"></use>
					</svg>
					<span class="u-none u-inline-block@sm">Google</span>
				</a>
			</div>
			<div class="u-mb-base u-mr-small u-ml-small u-wrap-row">
				<a href="user--edit2021" class="c-btn c-btn--facebook u-justify-center u-flex u-label-04 u-cursor-pointer c-btn--large u-text-center u-block u-no-underline">
					<svg class="o-icon o-icon--fill o-icon--sm u-mr-small@lg u-self-center">
						<use xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="#icon-facebook"></use>
					</svg>
					<span class="u-none u-inline-block@sm">Facebook</span>
				</a>
			</div>
			<div class="u-mb-base u-wrap-row">
				<a href="user--edit2021" class="c-btn c-btn--apple u-justify-center u-flex u-label-04 u-cursor-pointer c-btn--large u-text-center u-block u-no-underline">
					<svg class="o-icon o-icon--fill o-icon--sm u-mr-small@lg u-self-center">
						<use xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="#icon-apple"></use>
					</svg>
					<span class="u-none u-inline-block@sm">Apple</span>
				</a>
			</div>
		</div>
		<!-- end social logins -->
		<p class="o-text-overline u-text-center">
			<span class="o-text u-color-secondary">oppure registrati con la tua email</span>
		</p>
		<!-- native login -->
		<div class="u-flex u-column u-row@md">
			<div class="u-mb-base u-size-full u-size-1-2 u-mr-xsmall {% if error %}c-form-error{% endif %}">
				{% render "@input--default", {label:'Email*', placeholder:'', fieldLabel:'placeholderfieldLabel'}, true %}
			</div>
			<div class="u-mb-base u-size-full u-size-1-2 u-ml-xsmall@md {% if error %}c-form-error{% endif %}">
				{% render "@input--password", {label:'Password*', placeholder:'', fieldLabel:'placeholderfieldLabel'}, true %}
			</div>
		</div>
    <div class="u-flex u-column u-row@md">
      <div class="u-mb-base u-size-full u-size-1-2 u-mr-xsmall {% if error %}c-form-error{% endif %}">
        {% render "@input--default", {label:'Nome*', placeholder:'', fieldLabel:'placeholderfieldLabel'}, true %}
      </div>
      <div class="u-mb-base u-size-full u-size-1-2 u-ml-xsmall@md {% if error %}c-form-error{% endif %}">
        {% render "@input--default", {label:'Cognome*', placeholder:'', fieldLabel:'placeholderfieldLabel'}, true %}
      </div>
    </div>
		<div class="u-mb-base {% if error %}c-form-error{% endif %}">
			{% render "@input--default", {label:'Indirizzo*', placeholder:'', fieldLabel:'placeholderfieldLabel', helper:false}, true %}
		</div>
		<div class="u-my-large">
			<strong class="u-mb-base">Autorizzo al trattamento dei miei dati per:</strong>
			{% for item in legals %}
			<div class="c-accordion c-accordion--borderless u-label-07">
				<p class="u-mb-base">
					{{item.description}}
				</p>
			</div>
			<div class="u-flex u-column u-row@md u-mb-base">
				<div class="u-mb-base u-size-full u-size-1-2 u-mr-xsmall {% if error %}c-form-error{% endif %}">
					{% render "@radio--default", {label:item.confirm, name:item.name, fieldLabel:'placeholderfieldLabel'}, true %}
				</div>
				<div class="u-mb-base u-size-full u-size-1-2 u-ml-xsmall@md {% if error %}c-form-error{% endif %}">
					{% render "@radio--default", {label:item.decline, name:item.name, fieldLabel:'placeholderfieldLabel'}, true %}
				</div>
			</div>
			{% endfor %}
		</div>
		<p class="u-label-07 u-color-secondary u-block u-mb-large">
			Completando la registrazione dichiaro di essere maggiorenne e di aver preso visione dell’ <a class="o-link-primary" href="https://citynews.it/privacy#gdpr&_ga=2.195002985.558624410.1646066405-2053839960.1623412359">Informativa Privacy</a> redatta ai sensi del Regolamento UE 679/2016 e di accettare i termini e le <a class="o-link-primary" href="https://citynews.it/termini-servizio#_ga=2.195002985.558624410.1646066405-2053839960.1623412359">condizioni del servizio</a>.
		</p>
		<div class="fw__inputs o-divider__error">
			<p class="fw__inputs o-divider__error--message"></p>
		</div>
		<div class="u-mt-large">
			{% render "@stepcontrols", {
				submitForm: 'FALSE',
				actionLabel: actionLabel,
				prevStep: 'FALSE',
				prevStepForLabel: prevStepForLabel,
				nextStep: 'TRUE',
				prevStepIndex: 'FALSE',
				skipStep: 'FALSE',
				backLabel:'← Indietro',
				nextLabel:'Avanti →',
				mode: mode,
				type: type
			}, true %}
		</div>
		<!-- end native login -->
		<div class="u-text-center u-mt-large u-pl-large u-pr-large u-pl-none@md u-pr-none@md">
			<span class="u-label-07 u-color-secondary u-block u-mb-small">
				Sei già registrato? 
				<a class="o-link-primary" href="user--login2021">Accedi col tuo profilo</a>
			</span>
			<span class="u-label-07 u-color-secondary u-block u-mb-small">
				Non hai ancora attivato il tuo profilo?
				<a class="o-link-primary" href="user--activate2021">Attiva il tuo profilo</a>
			</span>
		</div>
	</fieldset>
	<fieldset data-toggle="{{mode}}-{{type}}-fw__step" class="fw__inputs o-divider {{mode}}-{{type}}-fw__step u-pl-none u-pr-none u-mb-medium">
		<!-- page hgroup -->
		<div class="u-mb-large">
			<h2 class="u-heading-03 u-text-center">Inserisci il codice di attivazione</h2>
			<p class="u-mb-large u-text-center">
				Inserisci il codice di attivazione che hai ricevuto per email.<br />
				Non hai ancora ricevuto il codice? Richiedi un nuovo <a class="o-link-primary" href="#">codice di attivazione</a>
			</p>
		</div>
		<!-- end page hgroup -->
		<!-- form activate -->
		<div class="u-mb-base {% if error %}c-form-error{% endif %}">
			{% render "@input--code", {label:'Codice di attivazione*', placeholder:'', fieldLabel:'placeholderfieldLabel'}, true %}
		</div>
		<div class="fw__inputs o-divider__error">
			<p class="fw__inputs o-divider__error--message"></p>
		</div>
		<div class="u-mt-large">
			{% render "@stepcontrols", {
				submitForm: 'TRUE',
				actionLabel: actionLabel,
				prevStep: 'TRUE',
				skipStep: 'FALSE',
				backLabel:'← Indietro',
				nextLabel:'Avanti →',
				mode: mode,
				type: type
			}, true %}
		</div>
		<!-- end form activate -->
	</fieldset>
	<fieldset data-toggle="{{mode}}-{{type}}-fw__step" class="fw__inputs o-divider {{mode}}-{{type}}-fw__step u-pl-none u-pr-none u-mb-medium">
		<!-- page hgroup -->
		<div class="u-mb-large">
			<h2 class="u-heading-03 u-text-center">Completa il tuo profilo personale</h2>
			<p class="u-mb-large u-text-center">Modifica le informazioni del profilo personale</p>
		</div>
		<!-- end page hgroup -->
		<!-- complete profile form -->
		<div class="u-mb-xlarge u-flex u-items-center u-column ">
			<div class="{% if error %}c-form-error{% endif %}">
				{% render "@input--avatar" %}
			</div>
			<div class="u-mt-base u-mt-none@sm u-ml-base@sm">
				<h3 class="u-title-05 u-mb-xsmall">Nome Cognome</h3>
				<span class="u-label-07 u-color-secondary u-block">email@mailservice.com</span>
			</div>
		</div>
		<div class="u-mb-base u-size-full u-size-1-2 {% if error %}c-form-error{% endif %}">
			{% render "@select", {label:'Sesso', helper:false}, true %}
		</div>
		<div class="u-mb-base {% if error %}c-form-error{% endif %}">
			{% render "@input--default", {label:'Anno di nascita', placeholder:'', fieldLabel:'placeholderfieldLabel', helper:false}, true %}
		</div>		
		<div class="u-flex u-column u-row@md ">
			<div class="u-mb-base u-size-full u-size-1-2 u-mr-xsmall@md  {% if error %}c-form-error{% endif %}">
				{% render "@input--default", {label:'Impiego', placeholder:'', fieldLabel:'placeholderfieldLabel', helper:false}, true %}
			</div>
			<div class="u-mb-base u-size-full u-size-1-2 u-ml-xsmall@md  {% if error %}c-form-error{% endif %}">
				{% render "@input--default", {label:'Settore', placeholder:'', fieldLabel:'placeholderfieldLabel', helper:false}, true %}
			</div>
		</div>
		<div class="u-mt-large">
			{% render "@stepcontrols", {
				submitForm: 'FALSE',
				actionLabel: actionLabel,
				prevStep: 'FALSE',
				prevStepForLabel: prevStepForLabel,
				nextStep: 'TRUE',
				prevStepIndex: 'FALSE',
				skipStep: 'TRUE',
				backLabel:'← Indietro',
				nextLabel:'Completa profilo',
				mode: mode,
				type: type
			}, true %}
		</div>
		<!-- end complete profile form -->
	</fieldset>
	<section data-toggle="{{mode}}-{{type}}-fw__step" class="fw__result {{mode}}-{{type}}-fw__step">
		<div class="u-mb-large">
			<h2 class="u-heading-03 u-text-center">Grazie per la tua iscrizione</h2>
			<p class="u-mb-large u-text-center">Ti ringraziamo per la tua iscrizione...</p>
			<div class="u-mb-base">
				<a href="homepage--cover"
					class="c-btn c-btn--default u-label-04 u-cursor-pointer c-btn--large u-text-center u-block u-no-underline">Leggi
					le ultime notizie</a>
			</div>
			<div class="u-mb-base">
				<a href="#"
					class="c-btn c-btn--default u-label-04 u-cursor-pointer c-btn--large u-text-center u-block u-no-underline">Invia una segnalazione</a>
			</div>
		</div>

		<!-- subscription CTA -->
		<p class="o-text-overline u-text-center">
			<span class="o-text">Abbonati</span>
		</p>
		<a href="#" class="u-text-center u-block o-link-primary u-bg-primary u-bordered">
			spotlight banner
		</a>
		<!-- end subscription CTA -->

		<!-- app CTA -->
		<p class="o-text-overline u-text-center">
			<span class="o-text">Scarica l'app</span>
		</p>
		<a href="https://www.romatoday.it/~shared/do/api/mobile-app/get/?campaign=user_signup">
			<div class="u-flex u-row@md">
				<div class="u-mb-base u-size-full u-size-1-2 u-mr-xsmall">
					<img class="u-size-full" src="{{googlePlayStoreImg}}" alt="googlePlayStoreImg">
				</div>
				<div class="u-mb-base u-size-full u-size-1-2 u-ml-xsmall">
					<img class="u-size-full" src="{{iosAppStoreImg}}" alt="iosAppStoreImg">
				</div>
			</div>
		</a>
		<!-- end app CTA -->

		<div id="results" class="u-mb-large u-mt-large"></div>
	</section>
</form>

{% render "@js--form", {
    type:type, 
    mode:mode
}, true %}
{
  "limit": 9,
  "stories": [
    {
      "index": 1,
      "title": "Coronavirus, la fase 2 tra sicurezza e libertà: tutte le idee per ripartire",
      "label": "Emergenza Coronavirus",
      "date": "ieri pomeriggio, 15:51",
      "author": "Violetto Gorrasi",
      "number": 1,
      "summary": "\"Ieri ci sono stati più di 500 morti e i casi totali sono ancora tanti\", dice Giovanni Rezza, direttore del Dipartimento malattie infettive. La richiesta della regione Lombardia di riaprire le attività produttive il 4 maggio ha preso in contropiede il governo",
      "media": {
        "horizontal": "https://citynews-today.stgy.ovh/~media/horizontal-mid/51380415156697/coronavirus-ansa-4-2-2.jpg",
        "vertical": "https://citynews-today.stgy.ovh/~media/vertical-hi/51380415156697/coronavirus-ansa-4-2-2.jpg",
        "square": "https://citynews-romatoday.stgy.ovh/~media/square-hi/55989804286522/una-signora-con-il-carrello-della-spesa-al-mercato-plateatico-coperto-laurentino.jpg"
      }
    },
    {
      "index": 2,
      "title": "Casa di riposo degli orrori: anziani legati e bastonati. Le immagini shock",
      "label": "Sei arresti",
      "date": "ieri pomeriggio, 15:51",
      "author": "Matteo Scarlino",
      "number": 2,
      "summary": "\"Ieri ci sono stati più di 500 morti e i casi totali sono ancora tanti\", dice Giovanni Rezza, direttore del Dipartimento malattie infettive. La richiesta della regione Lombardia di riaprire le attività produttive il 4 maggio ha preso in contropiede il governo",
      "media": {
        "horizontal": "https://citynews-today.stgy.ovh/~media/horizontal-mid/19878683460037/casa-di-riposo-palermo-ansa-2.jpg",
        "vertical": "https://citynews-today.stgy.ovh/~media/vertical-hi/19878683460037/casa-di-riposo-palermo-ansa-2.jpg",
        "square": "https://citynews-romatoday.stgy.ovh/~media/square-hi/55989804286522/una-signora-con-il-carrello-della-spesa-al-mercato-plateatico-coperto-laurentino.jpg"
      }
    },
    {
      "index": 3,
      "title": "Coronavirus, negli Usa 2.500 morti in un giorno ma Trump \"ha fretta\" di riaprire",
      "label": "Esteri",
      "date": "ieri pomeriggio, 15:51",
      "author": "Fabio Grilli",
      "number": 3,
      "summary": "\"Ieri ci sono stati più di 500 morti e i casi totali sono ancora tanti\", dice Giovanni Rezza, direttore del Dipartimento malattie infettive. La richiesta della regione Lombardia di riaprire le attività produttive il 4 maggio ha preso in contropiede il governo",
      "media": {
        "horizontal": "https://citynews-today.stgy.ovh/~media/horizontal-mid/31908412136750/donald-trump-coronavirus-ansa-2.jpg",
        "vertical": "https://citynews-today.stgy.ovh/~media/vertical-hi/31908412136750/donald-trump-coronavirus-ansa-2.jpg",
        "square": "https://citynews-romatoday.stgy.ovh/~media/square-hi/55989804286522/una-signora-con-il-carrello-della-spesa-al-mercato-plateatico-coperto-laurentino.jpg"
      }
    },
    {
      "index": 4,
      "title": "Turismo e coronavirus, quali località più colpite nell'estate 2020",
      "label": "Lo studio del Touring Club italiano",
      "date": "ieri pomeriggio, 15:51",
      "author": "Ginevra Nozzoli",
      "number": 4,
      "summary": "Dramma nella piscina comunale a Brescia, in Via Rodi. Un bambino di 7 anni, Ansh S., è annegato. Le urla della mamma hanno allertato il bagnino, ma non c'è stato nulla da fare",
      "media": {
        "horizontal": "https://citynews-today.stgy.ovh/~media/horizontal-low/2304174717311/turismo-crisi-ansa-milano-2.jpg",
        "vertical": "https://citynews-today.stgy.ovh/~media/vertical-hi/2304174717311/turismo-crisi-ansa-milano-2.jpg",
        "square": "https://citynews-romatoday.stgy.ovh/~media/square-hi/55989804286522/una-signora-con-il-carrello-della-spesa-al-mercato-plateatico-coperto-laurentino.jpg"
      }
    },
    {
      "index": 5,
      "title": "Turismo e coronavirus, quali località più colpite nell'estate 2020",
      "label": "Lo studio del Touring Club italiano",
      "date": "ieri pomeriggio, 15:51",
      "author": "Veronica Altimari",
      "number": 5,
      "summary": "Dramma nella piscina comunale a Brescia, in Via Rodi. Un bambino di 7 anni, Ansh S., è annegato. Le urla della mamma hanno allertato il bagnino, ma non c'è stato nulla da fare",
      "media": {
        "horizontal": "https://citynews-today.stgy.ovh/~media/horizontal-low/2304174717311/turismo-crisi-ansa-milano-2.jpg",
        "vertical": "https://citynews-today.stgy.ovh/~media/vertical-hi/2304174717311/turismo-crisi-ansa-milano-2.jpg",
        "square": "https://citynews-romatoday.stgy.ovh/~media/square-hi/55989804286522/una-signora-con-il-carrello-della-spesa-al-mercato-plateatico-coperto-laurentino.jpg"
      }
    },
    {
      "index": 6,
      "title": "Turismo e coronavirus, quali località più colpite nell'estate 2020",
      "label": "Lo studio del Touring Club italiano",
      "date": "ieri pomeriggio, 15:51",
      "author": "Alberto Berlini",
      "number": 6,
      "summary": "Dramma nella piscina comunale a Brescia, in Via Rodi. Un bambino di 7 anni, Ansh S., è annegato. Le urla della mamma hanno allertato il bagnino, ma non c'è stato nulla da fare",
      "media": {
        "horizontal": "https://citynews-today.stgy.ovh/~media/horizontal-low/2304174717311/turismo-crisi-ansa-milano-2.jpg",
        "vertical": "https://citynews-today.stgy.ovh/~media/vertical-hi/2304174717311/turismo-crisi-ansa-milano-2.jpg",
        "square": "https://citynews-romatoday.stgy.ovh/~media/square-hi/55989804286522/una-signora-con-il-carrello-della-spesa-al-mercato-plateatico-coperto-laurentino.jpg"
      }
    },
    {
      "index": 7,
      "title": "Turismo e coronavirus, quali località più colpite nell'estate 2020",
      "label": "Lo studio del Touring Club italiano",
      "date": "ieri pomeriggio, 15:51",
      "author": "Ginevra Nozzoli",
      "number": 7,
      "summary": "Dramma nella piscina comunale a Brescia, in Via Rodi. Un bambino di 7 anni, Ansh S., è annegato. Le urla della mamma hanno allertato il bagnino, ma non c'è stato nulla da fare",
      "media": {
        "horizontal": "https://citynews-today.stgy.ovh/~media/horizontal-low/2304174717311/turismo-crisi-ansa-milano-2.jpg",
        "vertical": "https://citynews-today.stgy.ovh/~media/vertical-hi/2304174717311/turismo-crisi-ansa-milano-2.jpg",
        "square": "https://citynews-romatoday.stgy.ovh/~media/square-hi/55989804286522/una-signora-con-il-carrello-della-spesa-al-mercato-plateatico-coperto-laurentino.jpg"
      }
    },
    {
      "index": 8,
      "title": "Muore annegato nella piscina comunale il giorno prima di compiere 7 anni",
      "label": "Lo studio del Touring Club italiano",
      "date": "ieri pomeriggio, 15:51",
      "author": "Fabio Grilli",
      "number": 8,
      "summary": "Dramma nella piscina comunale a Brescia, in Via Rodi. Un bambino di 7 anni, Ansh S., è annegato. Le urla della mamma hanno allertato il bagnino, ma non c'è stato nulla da fare",
      "media": {
        "horizontal": "https://citynews-today.stgy.ovh/~media/horizontal-mid/65846868204321/pisicina-comunale-ansa-archivio-2.jpg",
        "vertical": "https://citynews-today.stgy.ovh/~media/vertical-hi/65846868204321/pisicina-comunale-ansa-archivio-2.jpg",
        "square": "https://citynews-romatoday.stgy.ovh/~media/square-hi/55989804286522/una-signora-con-il-carrello-della-spesa-al-mercato-plateatico-coperto-laurentino.jpg"
      }
    },
    {
      "index": 9,
      "title": "Riceve il reddito di cittadinanza, ma ha 40 case e percepisce 120mila euro d'affitto",
      "label": "Economia",
      "date": "ieri pomeriggio, 15:51",
      "author": "Fabio Grilli",
      "number": 9,
      "summary": "L'uomo è stato denunciato dalla Guardia di finanza a Lanciano, in provincia di Chieti. Gli immobili affittati, oltre quindici, secondo le Fiamme Gialle rendevano alla famiglia del beneficiario del sussidio oltre 120mila euro all'anno",
      "media": {
        "horizontal": "https://citynews-today.stgy.ovh/~media/horizontal-mid/56625536121153/evasione-fiscale-controlli-finanza-ansa-2.jpg",
        "vertical": "https://citynews-today.stgy.ovh/~media/vertical-hi/56625536121153/evasione-fiscale-controlli-finanza-ansa-2.jpg",
        "square": "https://citynews-romatoday.stgy.ovh/~media/square-hi/55989804286522/una-signora-con-il-carrello-della-spesa-al-mercato-plateatico-coperto-laurentino.jpg"
      }
    }
  ],
  "opinions": [
    {
      "title": "Caso Dentix: quali tutele per i pazienti delle cliniche dentali",
      "date": "17 luglio, 2020",
      "author": "Carlo Sala"
    },
    {
      "title": "Caso Dentix: quali tutele per i pazienti delle cliniche dentali",
      "date": "12 luglio, 2020",
      "author": "Massimiliano Dona"
    },
    {
      "title": "Caso Dentix: quali tutele per i pazienti delle cliniche dentali",
      "date": "30 giugno, 2020",
      "author": "Luciano Lanna"
    },
    {
      "title": "Caso Dentix: quali tutele per i pazienti delle cliniche dentali",
      "date": "05 giugno, 2020",
      "author": "Marilia Parente"
    },
    {
      "title": "Caso Dentix: quali tutele per i pazienti delle cliniche dentali",
      "date": "27 maggio, 2020",
      "author": "Dario Balotta"
    },
    {
      "title": "Caso Dentix: quali tutele per i pazienti delle cliniche dentali",
      "date": "13 aprile, 2020",
      "author": "Rossella Lamina"
    },
    {
      "title": "Caso Dentix: quali tutele per i pazienti delle cliniche dentali",
      "date": "11 aprile, 2020",
      "author": "Dario Balotta"
    },
    {
      "title": "Caso Dentix: quali tutele per i pazienti delle cliniche dentali",
      "date": "04 marzo, 2020",
      "author": "Luciano Lanna"
    },
    {
      "title": "Caso Dentix: quali tutele per i pazienti delle cliniche dentali",
      "date": "18 febbraio, 2020",
      "author": "Dario Balotta"
    },
    {
      "title": "Caso Dentix: quali tutele per i pazienti delle cliniche dentali",
      "date": "01 febbraio, 2020",
      "author": "Rossella Lamina"
    },
    {
      "title": "Caso Dentix: quali tutele per i pazienti delle cliniche dentali",
      "date": "25 gennaio, 2020",
      "author": "Dario Balotta"
    },
    {
      "title": "Caso Dentix: quali tutele per i pazienti delle cliniche dentali",
      "date": "05 gennaio, 2020",
      "author": "Luciano Lanna"
    }
  ],
  "googlePlayStoreImg": "/assets/images/site/app/google_play_store.svg",
  "iosAppStoreImg": "/assets/images/site/app/ios_app_store.svg",
  "type": "signup",
  "steps": 4,
  "zoneRequired": true,
  "switchPrivacy": "Ho letto <a>fgddg</a>",
  "switchPersonalData": "Acconsento <a>fgddg</a>",
  "succededImg": "/assets/images/site/illustrations/end_wizard_succeded-min.svg",
  "legals": [
    {
      "item": null,
      "name": "legal2",
      "description": "Ricevere informazioni promozionali e sondaggi di opinione via e-mail, sms e notifiche da parte di Citynews S.p.A.'",
      "confirm": "Do il consenso",
      "decline": "Non do il consenso"
    },
    {
      "item": null,
      "name": "legal3",
      "description": "Comunicare i miei dati a società terze per ricevere informazioni promozionali e sondaggi di opinione via e-mail, sms e notifiche",
      "confirm": "Do il consenso",
      "decline": "Non do il consenso"
    },
    {
      "item": null,
      "name": "legal1",
      "description": "Effettuare analisi di profilazione per migliorare l’offerta e i servizi del sito in linea con le mie preferenze e i miei interessi",
      "confirm": "Accetto",
      "decline": "Non accetto"
    }
  ]
}

Forms templates

Items templates are used to display forms.

Parameters

  • type - toggle input email/phone, accepted values: login, logout, recovery, delete, activate, signup, edit, lead
  • mode - toggle input email/phone, accepted values: email, phone, social, user,
  • zoneRequired - toggle required zone fieldset, accepted values: bolean

Variants

  1. Default - Unused
  2. Login - Used for login form
  3. Logout - Used for logout form
  4. Delete - Used for delete account
  5. Recovery - Used for recovery credentials
  6. Activate - Used for activate account
  7. Signup - Used for new account registration
  8. Edit - Used for edit user profile
  9. Lead - Used for marketing lead generation