summaryrefslogtreecommitdiff
path: root/templates
diff options
context:
space:
mode:
authorMax Kremmel <xing@synapse.plus.com>2008-10-02 06:22:39 +0000
committerMax Kremmel <xing@synapse.plus.com>2008-10-02 06:22:39 +0000
commitf430e66fbc69456e42f7c24c03acd2e03f81987a (patch)
tree22b76e3dad27319d5c78e04598c618706d81b9a4 /templates
parent12b1438a76bf3c3cf7956995c457e26a314c54e1 (diff)
downloadusers-f430e66fbc69456e42f7c24c03acd2e03f81987a.tar.gz
users-f430e66fbc69456e42f7c24c03acd2e03f81987a.tar.bz2
users-f430e66fbc69456e42f7c24c03acd2e03f81987a.zip
fix user image upload, clean up code and rename 'fSubmit' stuff to use normal names
Diffstat (limited to 'templates')
-rw-r--r--templates/my_images.tpl54
-rw-r--r--templates/register.tpl4
2 files changed, 30 insertions, 28 deletions
diff --git a/templates/my_images.tpl b/templates/my_images.tpl
index 2137ee0..c561287 100644
--- a/templates/my_images.tpl
+++ b/templates/my_images.tpl
@@ -1,3 +1,4 @@
+{strip}
<div class="admin userimages">
<div class="header">
<h1>{tr}Upload Your Images{/tr}</h1>
@@ -13,15 +14,16 @@
<input type="hidden" name="fHomepage" value="{$fHomepage}"/>
{/if}
<div class="row">
- {formlabel label="Self Portrait" for="fPortraitFile"}
+ {formlabel label="Self Portrait" for="user_portrait_file"}
{if $gBitUser->mInfo.portrait_url}
{forminput}
<img src="{$gQueryUser->mInfo.portrait_url}?{php}print time();{/php}" alt="{tr}self portrait{/tr}" /><br />
- <input type="submit" value="{tr}delete self portrait{/tr}" name="fSubmitDeletePortait" id="fSubmitDeletePortait"/>
+ <input type="submit" value="{tr}delete self portrait{/tr}" name="delete_portrait" id="delete_portrait"/>
{/forminput}
{/if}
+
{forminput}
- <input name="fPortraitFile" id="fPortraitFile" type="file" />
+ <input name="user_portrait_file" id="user_portrait_file" type="file" />
{formhelp note="Upload a personal photo to be displayed on your personal page."}
{/forminput}
</div>
@@ -29,42 +31,43 @@
<div class="row" id="avatarfilerow">
{formlabel label="Upload Avatar" for="avatarfile"}
{forminput}
- <input name="fAvatarFile" type="file" id="avatarfile" />
+ <input name="user_avatar_file" type="file" id="avatarfile" />
{formhelp note=""}
{/forminput}
</div>
<div class="row">
- {formlabel label="Avatar" for="fAutoAvatar"}
+ {formlabel label="Avatar" for="user_auto_avatar"}
{if $gQueryUser->mInfo.avatar_url}
{forminput}
<img src="{$gQueryUser->mInfo.avatar_url}?{php}print time();{/php}" alt="{tr}avatar{/tr}" /><br />
- <input type="submit" value="{tr}delete avatar{/tr}" name="fSubmitDeleteAvatar" />
+ <input type="submit" value="{tr}delete avatar{/tr}" name="delete_avatar" />
{/forminput}
{/if}
+
{forminput}
- <label>{tr}Create avatar automatically from self portrait{/tr}&nbsp;
- <input type="checkbox" name="fAutoAvatar" checked="checked" id="fAutoAvatar" onclick="showHideAvatar(this.form );" /></label>
+ <label><input type="checkbox" name="user_auto_avatar" checked="checked" id="user_auto_avatar" onclick="showHideAvatar(this.form );" /> {tr}Create avatar automatically from self portrait{/tr}</label>
{formhelp note="Upload a small image or icon to be displayed next to your name on your forum and blog postings."}
{/forminput}
</div>
<div class="row">
- {formlabel label="Logo" for="fLogoFile"}
+ {formlabel label="Logo" for="user_logo_file"}
{if $gBitUser->mInfo.logo_url}
{forminput}
<img src="{$gQueryUser->mInfo.logo_url}?{php}print time();{/php}" alt="{tr}logo{/tr}" /><br />
- <input type="submit" value="{tr}delete logo{/tr}" id="fSubmitDeleteLogo" name="fSubmitDeleteLogo" />
+ <input type="submit" value="{tr}delete logo{/tr}" id="delete_logo" name="delete_logo" />
{/forminput}
{/if}
+
{forminput}
- <input name="fLogoFile" id="fLogoFile" type="file" />
+ <input name="user_logo_file" id="user_logo_file" type="file" />
{formhelp note="Upload an image that will be shown on your personal page. This could possibly be a corporate image."}
{/forminput}
</div>
<div class="row submit">
- <input type="submit" name="fSubmitBio" value="{tr}Save Changes{/tr}" />
+ <input type="submit" name="store" value="{tr}Save Changes{/tr}" />
</div>
{/form}
</div><!-- end .body -->
@@ -72,18 +75,17 @@
{* this javascript MUST go after the picform above! xoxo spider *}
{literal}
-<script type='text/javascript'>
-<!--
- function showHideAvatar() {
- var viz;
- if( document.getElementById( "fAutoAvatar" ).checked ) {
- vis = "hidden";
- } else {
- vis = "visible";
- }
- document.getElementById( "avatarfilerow" ).style.visibility = vis;
- }
- showHideAvatar();
--->
-</script>
+<script type="text/javascript">/* <![CDATA[ */
+ function showHideAvatar() {
+ var viz;
+ if( document.getElementById( "user_auto_avatar" ).checked ) {
+ vis = "hidden";
+ } else {
+ vis = "visible";
+ }
+ document.getElementById( "avatarfilerow" ).style.visibility = vis;
+ }
+ showHideAvatar();
+/* ]]> */</script>
{/literal}
+{/strip}
diff --git a/templates/register.tpl b/templates/register.tpl
index 1aa9876..0c89006 100644
--- a/templates/register.tpl
+++ b/templates/register.tpl
@@ -149,9 +149,9 @@
{if $gBitSystem->isFeatureActive( 'reg_portrait' )}
<div class="row">
- {formlabel label="Self Portrait" for="fPortraitFile"}
+ {formlabel label="Self Portrait" for="user_portrait_file"}
{forminput}
- <input name="fPortraitFile" id="fPortraitFile" type="file" />
+ <input name="user_portrait_file" id="user_portrait_file" type="file" />
{formhelp note="Upload a personal photo to be displayed on your personal page."}
{/forminput}
</div>