<?php
/**
 * @package WordPress
 * @subpackage Campoal
 */

global $current_user;

$temporary_pass = get_user_meta($current_user->ID, 'user_temporary_pass', true);
?>


    <form class="ui form change-password">
        <?php if (!$temporary_pass) : ?>
        <div class="field required">
            <label><?php esc_html_e('Old Password', 'campoal'); ?></label>
            <div class="ui large right icon input">
                <input type="password" id="oldpassUser" name="oldpassUser" placeholder="<?php esc_attr_e('Enter your old password', 'campoal'); ?>">
                <i class="toggle-password eye link icon"></i>
            </div>
        </div>
        <?php endif; ?>
        <div class="field required">
            <label><?php esc_html_e('New Password', 'campoal'); ?></label>
            <div class="ui large right icon input">
                <input type="password" id="newpassUser" name="newpassUser" class="password-strength" placeholder="<?php esc_attr_e('Enter your new password', 'campoal'); ?>">
                <i class="toggle-password eye link icon"></i>
            </div>
        </div>
        <?php get_template_part('templates/form/password-strength') ?>
        <div class="field required">
            <label><?php esc_html_e('Repeat New Password', 'campoal'); ?></label>
            <div class="ui large right icon input">
                <input type="password" id="repassUser" name="repassUser" placeholder="<?php esc_attr_e('Repeat your new password', 'campoal'); ?>">
                <i class="toggle-password eye link icon"></i>
            </div>
        </div>
        <div class="ui error message"><ul class="list"><li><?php esc_html_e('Repeated password does not match!', 'campoal') ?></li></ul></div>
        <input type="hidden" name="idUser" id="idUser" value="<?php echo esc_attr($current_user->ID); ?>">
        <div class="ui basic vertical right aligned segment">
            <a href="javascript:void(0);" class="ui right labeled icon large primary button updateProfileBtn password-strength-btn"><i class="save icon"></i><?php esc_html_e('Save Password', 'campoal'); ?></a>
        </div>
    </form>