<h2>Meine Mitgliedsdaten</h2>

[[!+cp.error_message]][[!getUrlParam:is=`1`:then=`
    <div class="notification is-danger">
        <div>Dein Passwort wurde geändert!</div>
    </div>
`? &name=`logcp-success`]]


<div class="notification is-warning is-light">
    <strong>Sind deine Daten noch aktuell?</strong></br>
    Bitte informiere uns, wenn du umgezogen bist oder sich deine Daten verändert haben! 
    <div class="buttons is-right">
        <a class="button" href="mailto:christian@bruehlbaerbel.de?subject=Änderung%20Mitgliedsdaten%20-%20[[!Rowboat:empty=`Ups... Fehler gefunden!`?
            &table=`c103_v_mitglieder`
            &tpl=`rowb_dashboardMitgliedMail_2023`
            &limit=`3`
            &where=`{"MdxUserID:=":"[[!+modx.user.id]]"}`
        ]]&amp;body=Hallo,%0D%0A%0D%0Abitte%20meine%20Daten%20wie%20folgt%20ändern:">
            <span class="icon-text">
                <span class="icon"><ion-icon name="mail-unread-outline"></ion-icon></span>
                <span>Meine Daten ändern</span>
            </span>
        </a>
    </div>
</div>

<div class="card">
    <div class="card-content">
        [[!Rowboat:empty=`Ups... Fehler gefunden!`?
            &table=`c103_v_mitglieder`
            &tpl=`rowb_mitgliedMeineDaten_2023`
            &limit=`3`
            &where=`{"MdxUserID:=":"[[!+modx.user.id]]"}`
        ]]
    </div>
</div>


<h2>Passwort ändern</h2>
<p>Du kannst hier deine Zugangsdaten ändern.</p>
[[!ChangePassword?
   &submitVar=`change-password`
   &placeholderPrefix=`cp.`
   &validateOldPassword=`1`
   &validate=`nospam:blank`
]]

<div>
    <div>
        <form action="[[~[[*id]]]]" method="post">
            <input type="hidden" name="nospam" value="" />

            <fieldset>
                <div class="field">
                    <label class="label">Altes Passwort<span class="error">[[!+cp.error.password_old]]</span></label>
                    <div class="control has-icons-left">
                        <input class="input" type="password" name="password_old" id="password_old" value="[[+cp.password_old]]" placeholder="Altes Passwort" />
                        <span class="icon is-small is-left"><ion-icon name="lock-closed"></span>
                    </div>
                </div>

                <div class="field">
                    <label class="label">Neues Passwort<span class="error">[[!+cp.error.password_new]]</span></label>
                    <div class="control has-icons-left">
                        <input class="input" type="password" name="password_new" id="password_new" value="[[+cp.password_new]]" placeholder="Neues Passwort" />
                        <span class="icon is-small is-left"><ion-icon name="lock-closed-outline"></span>
                    </div>
                </div>

                <div class="field">
                    <label class="label">Neues Passwort bestätigen<span class="error">[[!+cp.error.password_new_confirm]]</span></label>
                    <div class="control has-icons-left">
                        <input class="input" type="password" name="password_new_confirm" id="password_new_confirm" value="[[+cp.password_new_confirm]]" placeholder="Neues Passwort bestätigen" />
                        <span class="icon is-small is-left"><ion-icon name="lock-closed-outline"></span>
                    </div>
                </div>

                <div class="field">
                    <div class="buttons is-right">                
                            <input class="button" type="submit" name="change-password" value="Passwort ändern" />
                    </div>
                </div>
            </fieldset>
        </form>
    </div>
</div>
