-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathuser-profile.php
130 lines (116 loc) · 5.63 KB
/
user-profile.php
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
<?php echo osc_current_web_theme_path('header.php'); ?>
<section id="user-header" class="pt-4 pb-4 gray-bg">
<div class="container">
<div class="row col-md-12">
<div class="button-group float-right">
<a href="<?php echo osc_user_profile_url(); ?>" class="btn btn-primary disabled">Edit account</a>
<?php if(dev(osc_logged_user_id())) { ?>
<a href="<?php echo osc_user_list_items_url(); ?>" class="btn btn-primary">My uploads</a>
<a href="<?php echo osc_user_public_profile_url(); ?>" class="btn btn-primary">My profile</a>
<?php } ?>
</div>
</div>
</div>
</section>
<section id="edit-account" class="col-md-12 mt-4">
<div class="container">
<div class="row">
<div class="col-md-12">
<h2><?php _e('Edit account', 'market'); ?></h2>
<?php //osc_run_hook('user_profile_form', osc_user()); ?>
<form action="<?php echo osc_base_url(true); ?>" method="post">
<input type="hidden" name="page" value="user" />
<?php $user = User::newInstance()->findByPrimaryKey(osc_logged_user_id());?>
<?php if($user['b_company']==1) {?>
<input id="b_company" type="hidden" value="1" name="b_company">
<?php } else { ?>
<input id="b_company" type="hidden" value="0" name="b_company">
<?php }?>
<input type="hidden" name="action" value="profile_post" />
<div class="form-group">
<label class="control-label" for="name"><?php _e('Name', 'market'); ?></label>
<input id="s_name" class="form-control" type="text" value="<?php echo osc_user_name();?>" name="s_name">
</div>
<div class="form-group">
<label class="control-label" for="s_info"><?php _e('About you', 'market'); ?></label>
<textarea id="s_infoen_US" class="form-control" rows="5" name="s_info[en_US]"><?php echo osc_user_info();?></textarea>
</div>
<?php if(dev(osc_logged_user_id())){ ?>
<div class="form-group">
<label class="control-label" for="name"><?php _e('Paypal donation page link', 'market'); ?></label>
<input id="donation_link" class="form-control" type="url" value="<?php echo get_donation_link(osc_user_id())?>" name="donation_link">
<small>Leave empty if you don't want donation option</small>
</div>
<?php } ?>
<div class="form-group">
<div class="controls">
<?php osc_run_hook('user_form', osc_user()); ?>
</div>
</div>
<div class="form-group">
<button type="submit" class="btn btn-dark"><?php _e("Update", 'market');?></button>
</div>
</form>
</div>
</div>
</div>
</section>
<section id="edit-email-pass" class="col-md-12 mt-4">
<div class="container">
<div class="row">
<div class="col-md-6">
<h2><?php _e('Change e-mail', 'market'); ?></h2>
<form id="change-email" action="<?php echo osc_base_url(true); ?>" method="post">
<input type="hidden" name="page" value="user" />
<input type="hidden" name="action" value="change_email_post" />
<div class="form-group">
<label class="control-label" for="email"><?php _e('Current e-mail', 'market'); ?> *</label>
<div class="controls">
<input type="email" class="form-control" name="new_email" id="new_email" value="<?php echo osc_logged_user_email(); ?>" autocomplete="off" disabled />
</div>
</div>
<div class="form-group">
<label class="control-label" for="email"><?php _e('New e-mail', 'market'); ?> *</label>
<div class="controls">
<input type="email" class="form-control" name="new_email" id="new_email" value="" autocomplete="off" />
</div>
</div>
<div class="form-group">
<button type="submit" class="btn btn-dark"><?php _e("Update", 'market');?></button>
</div>
</form>
</div>
<div class="col-md-6">
<h2><?php _e('Change password', 'market'); ?></h2>
<form action="<?php echo osc_base_url(true); ?>" method="post">
<input type="hidden" name="page" value="user" />
<input type="hidden" name="action" value="change_password_post" />
<div class="form-group">
<label class="control-label" for="password"><?php _e('Current password', 'market'); ?> *</label>
<div class="controls">
<input type="password" class="form-control" name="password" id="password" value="" autocomplete="off" />
</div>
</div>
<div class="form-row">
<div class="form-group col">
<label class="control-label" for="new_password"><?php _e('New password', 'market'); ?> *</label>
<div class="controls">
<input type="password" class="form-control" name="new_password" id="new_password" value="" autocomplete="off" />
</div>
</div>
<div class="form-group col">
<label class="control-label" for="new_password2"><?php _e('Repeat new password', 'market'); ?> *</label>
<div class="controls">
<input type="password" class="form-control" name="new_password2" id="new_password2" value="" autocomplete="off" />
</div>
</div>
</div>
<div class="form-group">
<button type="submit" class="btn btn-dark"><?php _e("Update", 'market');?></button>
</div>
</form>
</div>
</div>
</div>
</section>
<?php echo osc_current_web_theme_path('footer.php'); ?>