<?php
$profile_id = UserProfileModel::getUserProfilesByUserId($this->userID)[0]->id;
?>
<h1 class="headline"><?php echo Text::get('NEWPW2_HEADLINE');?></h1>

<div class="margin4">

    <div class="twothird left" id="resetemail_box">
        <!-- new password form box -->
        <form method="post" action="<?php echo PA::getURL(); ?>profiles/changePassword_action/<?php echo $this->userID; ?>" name="new_password_form">
            <input type='hidden' name='user_id' value='<?php echo $this->userID; ?>' />
            <?php if (!Session::userIsAdmin()) { ?>
                <label for="reset_input_password_old" class="form_label">
                    <span><?php echo Text::get('NEWPW2_PASSWORD_OLD');?></span>
                </label>
                <input id="reset_input_password_old"
                       class="reset_input form_element"
                       type="password"
                       name="user_password_old"
                       pattern=".{6,}" required
                       autocomplete="off"
                       placeholder="<?php echo Text::get('NEWPW2_PASSWORD1_PLACEHOLDER');?>"/>
                <hr>
            <?php } ?>
            <label for="reset_input_password_new" class="form_label">
                <span><?php echo Text::get('NEWPW2_PASSWORD1');?></span>
            </label>
            <input id="reset_input_password_new"
                   class="reset_input form_element"
                   type="password"
                   name="user_password_new"
                   pattern=".{6,}" required
                   autocomplete="off"
                   placeholder="<?php echo Text::get('NEWPW2_PASSWORD1_PLACEHOLDER');?>"/>
            <label for="reset_input_password_repeat" class="form_label"><span><?php echo Text::get('NEWPW2_PASSWORD2');?></span></label>
            <input id="reset_input_password_repeat" class="reset_input form_element" type="password"
                   name="user_password_repeat" pattern=".{6,}" required autocomplete="off"  class="form_element" placeholder="<?php echo Text::get('NEWPW2_PASSWORD2_PLACEHOLDER');?>"/>
            <input type="submit" name="submit_new_password" value="<?php echo Text::get('NEWPW2_SUBMIT');?>" class="form_submit"/>
        </form>
    </div>
    <div class="onethird right" id="resetemailexplain_box">
        <a href="<?php echo PA::adminGetLink('user_view',$profile_id); ?>" class="fullbutton">
            <?php echo Text::get('NEWPW2_BACK_TO_PROFILE'); ?>
        </a>
    </div>
    <div class="clear"></div>
</div>

<?php
    PA::showFooter();
?>
