mirror of
https://github.com/e107inc/e107.git
synced 2025-08-06 06:38:00 +02:00
Fixes #543 - extra 'OR' on avatar selection. Also correct radio button alignment in bootstrap.
This commit is contained in:
@@ -141,7 +141,7 @@ class usersettings_shortcodes extends e_shortcode
|
|||||||
if($parm == 'radio')
|
if($parm == 'radio')
|
||||||
{
|
{
|
||||||
$options['enabled'] = array('title' => LAN_USER_84);
|
$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)
|
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)
|
if (e107::getPref('photo_upload') && FILE_UPLOADS)
|
||||||
{
|
{
|
||||||
return "<input type='checkbox' name='user_delete_photo' value='1' />".LAN_USET_16."<br />\n
|
$text .= "<div class='checkbox'>";
|
||||||
<input class='tbox' name='file_userfile[photo]' type='file' size='47' />
|
$text .= e107::getForm()->checkbox('user_delete_photo', 1, false, LAN_USET_16);
|
||||||
<div class='field-help'>{$diz}</div>";
|
$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;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@@ -27,7 +27,7 @@ function user_avatar_shortcode($parm=null)
|
|||||||
$image=$row['user_image'];
|
$image=$row['user_image'];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
elseif(!is_null($parm))
|
elseif(!empty($parm))
|
||||||
{
|
{
|
||||||
$image=$parm;
|
$image=$parm;
|
||||||
}
|
}
|
||||||
@@ -56,6 +56,7 @@ function user_avatar_shortcode($parm=null)
|
|||||||
}
|
}
|
||||||
elseif(substr($image,0,8) == "-upload-")
|
elseif(substr($image,0,8) == "-upload-")
|
||||||
{
|
{
|
||||||
|
|
||||||
$image = substr($image,8); // strip the -upload- from the beginning.
|
$image = substr($image,8); // strip the -upload- from the beginning.
|
||||||
if(file_exists(e_AVATAR_UPLOAD.$image)) // Local Default Image
|
if(file_exists(e_AVATAR_UPLOAD.$image)) // Local Default Image
|
||||||
{
|
{
|
||||||
@@ -63,6 +64,7 @@ function user_avatar_shortcode($parm=null)
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|
||||||
$img = $genericImg;
|
$img = $genericImg;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -72,6 +74,7 @@ function user_avatar_shortcode($parm=null)
|
|||||||
}
|
}
|
||||||
else // Image Missing.
|
else // Image Missing.
|
||||||
{
|
{
|
||||||
|
|
||||||
$img = $genericImg;
|
$img = $genericImg;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@@ -602,8 +602,12 @@ class e_form
|
|||||||
|
|
||||||
$text .= "<div style='margin-bottom:10px'>".LAN_USET_26."
|
$text .= "<div style='margin-bottom:10px'>".LAN_USET_26."
|
||||||
<input class='tbox' name='file_userfile[avatar]' type='file' size='47' title=\"{$diz}\" />
|
<input class='tbox' name='file_userfile[avatar]' type='file' size='47' title=\"{$diz}\" />
|
||||||
</div>
|
</div>";
|
||||||
<div class='divider'><span>OR</span></div>";
|
|
||||||
|
if(count($avFiles) > 0)
|
||||||
|
{
|
||||||
|
$text .= "<div class='divider'><span>OR</span></div>";
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user