1
0
mirror of https://github.com/e107inc/e107.git synced 2025-08-05 14:17:49 +02:00

Fixes #543 - extra 'OR' on avatar selection. Also correct radio button alignment in bootstrap.

This commit is contained in:
Cameron
2014-08-20 04:23:42 -07:00
parent 33e3ef5b3c
commit 0408658901
3 changed files with 27 additions and 8 deletions

View File

@@ -141,7 +141,7 @@ class usersettings_shortcodes extends e_shortcode
if($parm == 'radio')
{
$options['enabled'] = array('title' => LAN_USER_84);
return e107::getForm()->radio_switch("hideemail", $this->var['user_hideemail'],LAN_YES,LAN_NO,$options);
return "<div class='radio'>".e107::getForm()->radio_switch("hideemail", $this->var['user_hideemail'],LAN_YES,LAN_NO,$options)."</div>";
}
}
@@ -238,14 +238,26 @@ class usersettings_shortcodes extends e_shortcode
function sc_photo_upload($parm)
{
$diz = LAN_USET_27."<br />".LAN_USET_28;
$diz = LAN_USET_27.". ".LAN_USET_28.".";
if(USERPHOTO)
{
$text .= e107::getParser()->parseTemplate("{PICTURE}",true);
}
if (e107::getPref('photo_upload') && FILE_UPLOADS)
{
return "<input type='checkbox' name='user_delete_photo' value='1' />".LAN_USET_16."<br />\n
<input class='tbox' name='file_userfile[photo]' type='file' size='47' />
<div class='field-help'>{$diz}</div>";
$text .= "<div class='checkbox'>";
$text .= e107::getForm()->checkbox('user_delete_photo', 1, false, LAN_USET_16);
$text .= "</div>";
// $text .= "<input type='checkbox' name='user_delete_photo' value='1' />".LAN_USET_16."<br />\n";
$text .= "<p><input class='tbox' name='file_userfile[photo]' type='file' size='47' title=\"".$diz."\" /></p>\n";
}
return $text;
}

View File

@@ -27,7 +27,7 @@ function user_avatar_shortcode($parm=null)
$image=$row['user_image'];
}
}
elseif(!is_null($parm))
elseif(!empty($parm))
{
$image=$parm;
}
@@ -56,6 +56,7 @@ function user_avatar_shortcode($parm=null)
}
elseif(substr($image,0,8) == "-upload-")
{
$image = substr($image,8); // strip the -upload- from the beginning.
if(file_exists(e_AVATAR_UPLOAD.$image)) // Local Default Image
{
@@ -63,6 +64,7 @@ function user_avatar_shortcode($parm=null)
}
else
{
$img = $genericImg;
}
}
@@ -72,6 +74,7 @@ function user_avatar_shortcode($parm=null)
}
else // Image Missing.
{
$img = $genericImg;
}
}

View File

@@ -602,8 +602,12 @@ class e_form
$text .= "<div style='margin-bottom:10px'>".LAN_USET_26."
<input class='tbox' name='file_userfile[avatar]' type='file' size='47' title=\"{$diz}\" />
</div>
<div class='divider'><span>OR</span></div>";
</div>";
if(count($avFiles) > 0)
{
$text .= "<div class='divider'><span>OR</span></div>";
}
}