<form data-request="{{ __SELF__ }}::onSubmit" data-request-validate data-request-flash>
    <div class="mall-form-control">
        <label for="email">{{ 'offline.mall::frontend.form.email' | trans }}</label>
        <input id="email" type="email" placeholder="email@email.com" name="email" value="{{ __SELF__.user.email }}">
        <div data-validate-for="email"></div>
    </div>
    <div class="mall-two-fields">
        <div class="mall-form-control">
            <label for="firstname">{{ 'offline.mall::frontend.form.firstname' | trans }}</label>
            <input id="firstname" type="text" name="firstname" value="{{ __SELF__.user.customer.firstname }}">
            <div data-validate-for="firstname"></div>
        </div>
        <div class="mall-form-control">
            <label for="lastname">{{ 'offline.mall::frontend.form.lastname' | trans }}</label>
            <input id="lastname" type="text" name="lastname" value="{{ __SELF__.user.customer.lastname }}">
            <div data-validate-for="lastname"></div>
        </div>
    </div>
    {% if user.customer.is_guest %}
        <div class="mall-callout">
            {{ 'offline.mall::frontend.guest_upgrade.callout' | trans }}
        </div>
    {% endif %}
    <div class="mall-two-fields">
        <div class="mall-form-control">
            <label for="password">{{ 'offline.mall::frontend.form.new_password' | trans }}</label>
            <input id="password" type="password" name="password">
            <div data-validate-for="password"></div>
        </div>
        <div class="mall-form-control">
            <label for="password_repeat">{{ 'offline.mall::frontend.form.password_repeat' | trans }}</label>
            <input id="password_repeat" type="password" name="password_repeat">
            <div data-validate-for="password_repeat"></div>
        </div>
    </div>
    <div class="mall-form-actions">
        <button class="mall-btn mall-btn--primary" type="submit" data-attach-loading>
            {{ 'offline.mall::frontend.save' | trans }}
        </button>
    </div>
</form>