_popup.php 8.85 KB
Newer Older
Игорь's avatar
init    
Игорь committed
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
<div class="popup <?php echo ($sf_request->hasParameter('signup') || $sf_request->hasParameter('signin') || $sf_request->hasParameter('recovery') || $sf_request->hasParameter('change_psw')? 'show' : '')?>">
    <div class="popup_wrap" onclick="event.cancelBubble = true">
        <div class="popup_close" title="Закрыть" onclick="popup.close(event)"></div>

        <?php if($sf_user->isAuthenticated()){
            $account = $sf_user->getAccount();
            ?>
            <div class="popup_item open_profile ">
                <div class="popup_item__title">Редактирование профиля</div>

                <div class="popup_item__form">
                    <div class="popup_item__row">
                        <input type="text" name="profile_name" autocomplete="off" id="profile_name" placeholder="Имя" value="<?php echo $account->getName();?>">
                        <input type="text" class="phone" name="profile_phone" autocomplete="off" id="profile_phone" placeholder="Телефон" value="<?php echo $account->getPhone();?>">
                        <input type="text" name="profile_email" autocomplete="off" id="profile_email" placeholder="Электронная почта" value="<?php echo $account->getEmail();?>">
                        <input type="text" name="profile_address" autocomplete="off" id="profile_address" placeholder="Адрес" value="<?php echo $account->getAddress();?>">
                        <input type="password" name="profile_password" autocomplete="off" id="profile_password" placeholder="Пароль">
                        <div class="popup_item__form__btns">
                            <button class="btn blue_btn popup_item__form__btn btn_edit_profile" onclick="popup.btnEditProfile(event);return false;">Сохранить</button>
                            <button class="btn white_btn popup_item__form__btn" onclick="popup.close(event)">Отменить</button>
                        </div>
                        <div class="popup_item__form_msg"></div>
                    </div>

                </div>
            </div>
        <?php } ?>

        <div class="popup_item signup_form <?php echo ($sf_request->hasParameter('signup') ? 'active' : '')?>">
            <div class="popup_item__title">Регистрация</div>
            <a href="#" onclick="popup.open('signin_form');return false;">Уже зарегистрирован, войти</a>

            <div class="popup_item__form">
                <div class="popup_item__row">
                    <input type="text" name="signup_name" autocomplete="off" id="signup_name" placeholder="Имя">
                    <input type="text" class="phone" name="signup_phone" autocomplete="off" id="signup_phone" placeholder="Телефон">
                    <input type="text" name="signup_email" autocomplete="off" id="signup_email" placeholder="Электронная почта">
                    <input type="text" name="signup_address" autocomplete="off" id="signup_address" placeholder="Адрес">
                    <input type="password" name="signup_password" autocomplete="off" id="signup_password" placeholder="Пароль">
                    <div class="popup_item__form__btns">
                        <button class="btn blue_btn popup_item__form__btn" onclick="popup.btnSignup(event);return false;">Зарегистрироваться</button>
                        <button class="btn white_btn popup_item__form__btn" onclick="popup.close(event)">Отменить</button>
                    </div>
                    <div class="popup_item__form_msg"></div>
                </div>

            </div>
        </div>

        <div class="popup_item signin_form <?php echo ($sf_request->hasParameter('signin') ? 'active' : '')?>">
            <div class="popup_item__title">Авторизация</div>

            <div class="popup_item__form">
                <div class="popup_item__row">
                    <?php
                    $form = new cashSigninForm();
                    echo $form->renderHiddenFields();
                    ?>
                    <input type="text" class="phone" name="signin_phone" autocomplete="off" id="signin_phone" placeholder="Телефон">
                    <input type="password" name="signin_password" autocomplete="off" id="signin_password" placeholder="Пароль">
                    <div>
                        <a href="#" onclick="popup.open('recovery_form');return false;">Не помню пароль</a>
                    </div>

                    <div class="popup_item__form__btns">
                        <button class="btn blue_btn popup_item__form__btn" onclick="popup.btnSignin(event);return false;">Войти</button>
                        <button class="btn white_btn popup_item__form__btn" onclick="popup.close(event)">Отменить</button>
                    </div>
                    <div class="popup_item__form_msg"></div>
                </div>

            </div>
        </div>

        <div class="popup_item remove_bid_form ">
            <div class="popup_item__title">Удалить запись?</div>

            <div class="popup_item__form">
                <div class="popup_item__row">
                    <div class="popup_item__form__btns">
                        <button class="btn blue_btn popup_item__form__btn" onclick="popup.btnRemBid(event);return false;">Удалить</button>
                        <button class="btn white_btn popup_item__form__btn" onclick="popup.close(event)">Отменить</button>
                    </div>
                    <div class="popup_item__form_msg"></div>
                </div>

            </div>
        </div>
        <div class="popup_item recovery_form <?php echo ($sf_request->hasParameter('recovery') ? 'active' : '')?>">
            <div class="popup_item__title">Отправить сообщение для восстановления?</div>

            <div class="popup_item__form">
                <div class="popup_item__row">
                    <input type="text" name="recovery_email" autocomplete="off" id="recovery_email" placeholder="Электронная почта">
                    <div class="popup_item__form__btns">
                        <button class="btn blue_btn popup_item__form__btn" onclick="popup.btnRecoveryPsw(event);return false;">Отправить</button>
                        <button class="btn white_btn popup_item__form__btn" onclick="popup.close(event)">Отменить</button>
                    </div>
                    <div class="popup_item__form_msg"></div>
                </div>
            </div>
            <div class="successfully_msg">
                <div class="successfully_msg__text">На вашу электронную почту отправлено письмо, в котором написаны дальнейшие действия для восстановления пароля</div>
                <button class="btn white_btn popup_item__form__btn" onclick="popup.close(event)">Закрыть</button>
            </div>
        </div>
        <div class="popup_item change_psw_form <?php echo ($sf_request->hasParameter('change_psw') ? 'active' : '')?>">
            <div class="popup_item__title">Укажите новый пароль для входа</div>

            <div class="popup_item__form">
                <div class="popup_item__row" >
                    <input type="hidden" name="change_psw_id" autocomplete="off" id="change_psw_id" value="<?php echo ($sf_request->hasParameter('id') ? $sf_request->getParameter('id') : '');?>">
                    <input type="hidden" name="change_psw_secret" autocomplete="off" id="change_psw_secret" value="<?php echo ($sf_request->hasParameter('secret') ? $sf_request->getParameter('secret') : '');?>">
                    <input type="password" name="change_psw_password" autocomplete="off" id="change_psw_password" placeholder="Новый пароль">
                    <div class="popup_item__form__btns">
                        <button class="btn blue_btn popup_item__form__btn" onclick="popup.btnRemindPsw(event);return false;">Отправить</button>
                        <button class="btn white_btn popup_item__form__btn" onclick="popup.close(event)">Отменить</button>
                    </div>
                    <div class="popup_item__form_msg"></div>
                </div>

            </div>
            <div class="successfully_msg">
                <div class="successfully_msg__text">Пароль успешно изменен, можете войти в личный кабинет с новым паролем</div>
                <button class="btn blue_btn popup_item__form__btn" onclick="popup.open('signin_form');return false;">Войти</button>
                <button class="btn white_btn popup_item__form__btn" onclick="popup.close(event)">Закрыть</button>
            </div>
        </div>
    </div>
</div>