summaryrefslogtreecommitdiff
path: root/templates/user_preferences.tpl
blob: 186b48ee2540206d93787520a9603aabb463f207 (plain)
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
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
{strip}

<div class="floaticon">{bithelp}</div>
<div class="display userpreferences">
	<div class="header">
		<h1>{tr}User Preferences{/tr}</h1>
	</div>

	{include file="bitpackage:users/my_bitweaver_bar.tpl"}

	<div class="body">
		{formfeedback hash=$feedback}
		{jstabs}
			{jstab title="User"}
				{form}
					{legend legend="User Information"}
						<input type="hidden" name="view_user" value="{$editUser->mUserId}" />

						<div class="row">
							{formlabel label="Real Name" for="real_name"}
							{forminput}
								<input type="text" name="real_name" id="real_name" value="{$editUser->mInfo.real_name|escape}" />
								{if !$gBitSystem->getConfig('users_display_name') or $gBitSystem->getConfig('users_display_name') eq 'real_name'}
									{formhelp note="This is the name that is visible to other users when viewing information added by you."}
								{/if}
							{/forminput}
						</div>

						<div class="row">
							{formlabel label="Username"}
							{forminput}
								{$editUser->mInfo.login}
								{if $gBitSystem->getConfig('users_display_name') eq 'login'}
									{formhelp note="This is the name that is visible to other users when viewing information added by you."}
								{/if}
							{/forminput}
						</div>

						<div class="row">
							{formlabel label="Last login"}
							{forminput}
								{$editUser->mInfo.last_login|bit_long_datetime}
								{formhelp note=""}
							{/forminput}
						</div>

						<div class="row">
							{formlabel label="Is email public?" for="users_email_display"}
							{forminput}
								<select name="users_email_display" id="users_email_display">
									{section name=ix loop=$scramblingMethods}
										<option value="{$scramblingMethods[ix]|escape}" {if $editUser->mPrefs.users_email_display eq $scramblingMethods[ix]}selected="selected"{/if}>{$scramblingEmails[ix]}</option>
									{/section}
								</select>
								{formhelp note="Pick the scrambling method to prevent spam."}
							{/forminput}
						</div>

						<div class="row">
							{formlabel label="Country" for="country"}
							{forminput}
								<select name="users_country" id="country">
									<option value=""></option>
										{section name=ix loop=$flags}
											<option value="{$flags[ix]|escape}" {if $editUser->mPrefs.flag eq $flags[ix]}selected="selected"{/if}>{tr}{$flags[ix]|replace:'_':' '}{/tr}</option>
										{/section}
								</select>
								&nbsp;
								{if $editUser->mPrefs.flag}{biticon iforce=icon ipackage=users ipath=flags/ iname=$editUser->mPrefs.flag iexplain=$editUser->mPrefs.flag}{/if}
							{/forminput}
						</div>

						{if $gBitSystem->isFeatureActive('users_change_language')}
							<div class="row">
								{formlabel label="Language" for="language"}
								{forminput}
									<select name="bitlanguage" id="bitlanguage">
										{foreach from=$languages key=langCode item=lang}
											<option value="{$langCode}"{if $gBitLanguage->mLanguage eq $langCode} selected="selected"{/if}>
												{$lang.full_name}
											</option>
										{/foreach}
									</select>
									{formhelp note="Pick your preferred site language."}
								{/forminput}
							</div>
						{/if}

						{foreach from=$customFields key=i item=field}
							<div class="row">
								{formlabel label="$field}
								{forminput}
									<input type="text" name="CUSTOM[{$field}]" value="{$editUser->mPrefs.$field}" maxlength="250" />
								{/forminput}
							</div>
						{/foreach}

						<div class="row">
							{formlabel label="User information" for="users_information"}
							{forminput}
								<select name="users_information" id="users_information">
									<option value="public" {if $editUser->mPrefs.users_information eq 'public'}selected="selected"{/if}>{tr}public{/tr}</option>
									<option value="private" {if $editUser->mPrefs.users_information eq 'private'}selected="selected"{/if}>{tr}private{/tr}</option>
								</select>
								{formhelp note=""}
							{/forminput}
						</div>

						<div class="row">
							{formlabel label="HomePage" for="users_homepage"}
							{forminput}
								<input size="50" type="text" name="users_homepage" id="users_homepage" value="{$editUser->mInfo.users_homepage|escape|default:'http://'}" />
								{formhelp note="If you have a personal or professional homepage, enter it here."}
							{/forminput}
						</div>

						<div class="row submit">
							<input type="submit" name="prefs" value="{tr}Change preferences{/tr}" />
						</div>
					{/legend}

					{legend legend="User Preferences"}
						{if $gBitSystem->getConfig('users_themes') == 'y'}
							<div class="row">
								{formlabel label="Theme" for="style"}
								{forminput}
									<select name="style" id="style">
										{section name=ix loop=$styles}
											<option value="{$styles[ix]|escape}" {if $assignStyle eq $styles[ix]}selected="selected"{/if}>{$styles[ix]}</option>
										{/section}
									</select>
									{formhelp note="Pick the theme for your personal Homepage."}
								{/forminput}
							</div>
						{/if}

						<div class="row">
							{formlabel label="Displayed time zone"}
							{forminput}
								<label><input type="radio" name="site_display_utc" value="UTC" {if $editUser->mPrefs.site_display_utc eq 'UTC'}checked="checked"{/if} />{tr}UTC{/tr}</label>
								<br />
								<label><input type="radio" name="site_display_utc" value="Local" {if $editUser->mPrefs.site_display_utc eq 'Local'}checked="checked"{/if} />{tr}Local{/tr}</label>
								<br />
								<label><input type="radio" name="site_display_utc" value="Fixed" {if $editUser->mPrefs.site_display_utc eq 'Fixed'}checked="checked"{/if} />{tr}Fixed{/tr}</label>
								<br />
								<select name="site_display_timezone" id="site_display_timezone">
									{html_options options=$userTimezones selected=`$editUser->mPrefs.site_display_timezone`}
								</select>
								{formhelp note="Internal data is stored using UTC time stamps, these can then be displayed using your browser timezone offset, or a fixed timezone which will also manage the correct daylight saving"}
							{/forminput}
						</div>

						<div class="row">
							{formlabel label="Use double-click to edit pages" for="users_double_click"}
							{forminput}
								<input type="checkbox" name="users_double_click" id="users_double_click" {if $editUser->mPrefs.users_double_click eq 'y'}checked="checked"{/if} />
								{formhelp note="Enabling this feature will allow you to double click on any wiki page and it will automatically take you to the edit page. Note that this does not work in all browsers."}
							{/forminput}
						</div>

						<div class="row submit">
							<input type="submit" name="prefs" value="{tr}Change preferences{/tr}" />
						</div>
					{/legend}
				{/form}

				{form legend="Change your email address"}
					<input type="hidden" name="view_user" value="{$editUser->mUserId}" />
					<div class="row">
						{formlabel label="Email" for="email"}
						{forminput}
							<input size="50" type="text" name="email" id="email" value="{$editUser->mInfo.email|escape}" />
							{formhelp note=""}
						{/forminput}
					</div>

					<div class="row">
						{formlabel label="Password" for="pass"}
						{forminput}
							<input type="password" name="pass" id="pass" />
							{formhelp note=""}
						{/forminput}
					</div>

					<div class="row submit">
						<input type="submit" name="chgemail" value="{tr}Change email{/tr}" />
					</div>
				{/form}

				{form legend="Change your password"}
					<input type="hidden" name="view_user" value="{$editUser->mUserId}" />
					{* Users with admin priv can change password without knowing the old one *}
					{if !$view_user or ( !$gBitUser->hasPermission('p_users_admin') and $view_user )}
						<div class="row">
							{formlabel label="Old password" for="old"}
							{forminput}
								<input type="password" name="old" id="old" />
								{formhelp note=""}
							{/forminput}
						</div>
					{else}
						<input type="hidden" name="old" value="" />
					{/if}

					<div class="row">
						{formlabel label="New password" for="pass1"}
						{forminput}
							<input type="password" name="pass1" id="pass1" />
							{formhelp note=""}
						{/forminput}
					</div>

					<div class="row">
						{formlabel label="Again please" for="pass2"}
						{forminput}
							<input type="password" name="pass2" id="pass2" />
							{formhelp note=""}
						{/forminput}
					</div>

					<div class="row submit">
						<input type="submit" name="chgpswd" value="{tr}Change Password{/tr}" />
					</div>
				{/form}

				{* this should go in tidbits *}
				{if $gBitSystem->isFeatureActive( 'feature_tasks' )}
					{form legend="User Tasks"}
						<div class="row">
							{formlabel label="Tasks per page" for="tasks_max_records"}
							{forminput}
								<select name="tasks_max_records" id="tasks_max_records">
									<option value="2"  {if $editUser->mPrefs.tasks_max_records eq 2}selected="selected"{/if}>{tr}2{/tr}</option>
									<option value="5"  {if $editUser->mPrefs.tasks_max_records eq 5}selected="selected"{/if}>{tr}5{/tr}</option>
									<option value="10" {if $editUser->mPrefs.tasks_max_records eq 10}selected="selected"{/if}>{tr}10{/tr}</option>
									<option value="20" {if $editUser->mPrefs.tasks_max_records eq 20}selected="selected"{/if}>{tr}20{/tr}</option>
									<option value="30" {if $editUser->mPrefs.tasks_max_records eq 30}selected="selected"{/if}>{tr}30{/tr}</option>
									<option value="40" {if $editUser->mPrefs.tasks_max_records eq 40}selected="selected"{/if}>{tr}40{/tr}</option>
									<option value="50" {if $editUser->mPrefs.tasks_max_records eq 50}selected="selected"{/if}>{tr}50{/tr}</option>
								</select>
								{formhelp note=""}
							{/forminput}
						</div>

						<div class="row">
							{formlabel label="Use dates" for="tasks_use_dates"}
							{forminput}
								<input type="checkbox" name="tasks_use_dates" id="tasks_use_dates" {if $tasks_use_dates eq 'y'}checked="checked"{/if} />
								{formhelp note=""}
							{/forminput}
						</div>

						<div class="row submit">
							<input type="submit" name="tasksprefs" value="{tr}Change preferences{/tr}" />
						</div>
					{/form}
				{/if}
			{/jstab}

			{jstab title="Pictures"}
				{legend legend="Pictures and Icons"}
					<div class="row">
						{formlabel label="Pictures"}
						{forminput}
							<a href="{$smarty.const.USERS_PKG_URL}my_images.php">{tr}Upload new pictures{/tr}</a>
							{formhelp note=""}
						{/forminput}
					</div>

					<div class="row">
						{formlabel label="Avatar"}
						{forminput}
							{if $editUser->mInfo.avatar_url}
								<img src="{$editUser->mInfo.avatar_url}" />
							{/if}
							{formhelp note="Small icon used for your posts or comments."}
						{/forminput}
					</div>

					<div class="row">
						{formlabel label="Self Portrait"} {forminput}
							{if $editUser->mInfo.portrait_url}
								<img src="{$editUser->mInfo.portrait_url}" />
							{/if}
							{formhelp note="Larger picture used on your bio page."}
						{/forminput}
					</div>

					<div class="row">
						{formlabel label="Logo" for=""}
						{forminput}
							{if $editUser->mInfo.logo_url}
								<img src="{$editUser->mInfo.logo_url}" /><br />
							{/if}
							{formhelp note="Image used for your organization."}
						{/forminput}
					</div>
				{/legend}
			{/jstab}

			{if $watches}
				{jstab title="Watches"}
					<table class="data">
						<caption>{tr}Watches{/tr}</caption>
						<tr>
							<th>Event</th>
							<th>Title</th>
						</tr>
						{foreach item=watch from=$watches}
							<tr class="{cycle vlaues="odd,even"}">
								<td>{$watch.event|escape}</td>
								<td>{$watch.title|escape}</td>
							</tr>
						{/foreach}
					</table>
				{/jstab}
			{/if}

			{foreach item=file from=$includFiles}
				{include file=$file.tpl userPrefs=$editUser->mPrefs view_user=$editUser->mUserId}
			{/foreach}

		{/jstabs}
	</div><!-- end .body -->
</div><!-- end .userpreferences -->

{/strip}