Implemented an extended user profile based on a patch from Jethro Carr (issue 510).
Changes with respect to the original patch: - use Gconf instead of separate table / data scheme - better form validation for URLs and emails - no htmlentity-encoded contents in the database (pluf automatically safe-encodes stuff before it writes out contents into templates) - add visual separators in the form views to have a distinct view of basic (important) data and other data which are only displayed in the public profile - give a hint about the maximum display size of 60x60 px^2 and use max-width and max-height in the templates to avoid nasty distortions by the browser - use target=_blank and rel=nofollow on the twitter and website links in the profile - some whitespace / formatting / code style fixes
This commit is contained in:
@@ -9,7 +9,7 @@
|
||||
{/if}
|
||||
</div>
|
||||
{/if}
|
||||
<form method="post" action=".">
|
||||
<form method="post" enctype="multipart/form-data" action=".">
|
||||
<table class="form" summary="">
|
||||
<tr>
|
||||
<th>{trans 'Login:'}</th>{aurl 'url', 'IDF_Views_User::view', array($cuser.login)}
|
||||
@@ -51,7 +51,48 @@
|
||||
<td>{if $form.f.password2.errors}{$form.f.password2.fieldErrors}{/if}
|
||||
{$form.f.password2|unsafe}
|
||||
</td>
|
||||
</tr>{if $user.administrator}
|
||||
</tr>
|
||||
<tr><td colspan="2" class="separator">{trans "Public Profile"}</td></tr>
|
||||
<tr>
|
||||
<th>{$form.f.description.labelTag}:</th>
|
||||
<td>{if $form.f.description.errors}{$form.f.description.fieldErrors}{/if}
|
||||
{$form.f.description|unsafe}
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>{$form.f.twitter.labelTag}:</th>
|
||||
<td>{if $form.f.twitter.errors}{$form.f.twitter.fieldErrors}{/if}
|
||||
{$form.f.twitter|unsafe}
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>{$form.f.public_email.labelTag}:</th>
|
||||
<td>{if $form.f.public_email.errors}{$form.f.public_email.fieldErrors}{/if}
|
||||
{$form.f.public_email|unsafe}
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>{$form.f.website.labelTag}:</th>
|
||||
<td>{if $form.f.website.errors}{$form.f.website.fieldErrors}{/if}
|
||||
{$form.f.website|unsafe}
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>{$form.f.custom_avatar.labelTag}:</th>
|
||||
<td>{if $form.f.custom_avatar.errors}{$form.f.custom_avatar.fieldErrors}{/if}
|
||||
{$form.f.custom_avatar|unsafe}<br />
|
||||
<span class="helptext">{$form.f.custom_avatar.help_text}</span>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>{if $form.f.remove_custom_avatar.errors}{$form.f.remove_custom_avatar.fieldErrors}{/if}
|
||||
{$form.f.remove_custom_avatar|unsafe}
|
||||
</th>
|
||||
<td>{$form.f.remove_custom_avatar.labelTag}<br />
|
||||
<span class="helptext">{$form.f.remove_custom_avatar.help_text}</span></td>
|
||||
</tr>
|
||||
{if $user.administrator}
|
||||
<tr><td colspan="2" class="separator">{trans "Administrative"}</td></tr>
|
||||
<tr>
|
||||
<th>{if $form.f.staff.errors}{$form.f.staff.fieldErrors}{/if}
|
||||
{$form.f.staff|unsafe}
|
||||
@@ -69,7 +110,7 @@
|
||||
<tr>
|
||||
<td> </td>
|
||||
<td>
|
||||
<input type="submit" value="{trans 'Update User'}" name="submit" />
|
||||
<input type="submit" value="{trans 'Update User'}" name="submit" />
|
||||
| <a href="{url 'IDF_Views_Admin::users'}">{trans 'Cancel'}</a>
|
||||
</td>
|
||||
</tr>
|
||||
|
Reference in New Issue
Block a user