mirror of
https://github.com/e107inc/e107.git
synced 2025-08-06 22:57:14 +02:00
Merge pull request #3255 from SimSync/fix_3049
fixes #3049 Realname was always shown and marked required,
This commit is contained in:
@@ -81,16 +81,40 @@ class usersettings_shortcodes extends e_shortcode
|
|||||||
|
|
||||||
function sc_customtitle($parm)
|
function sc_customtitle($parm)
|
||||||
{
|
{
|
||||||
if (e107::getPref('signup_option_customtitle'))
|
$pref = e107::getPref();
|
||||||
|
if ($pref['signup_option_customtitle'])
|
||||||
{
|
{
|
||||||
$options = array('title'=> '', 'size' => 40);
|
$options = array(
|
||||||
|
'title'=> '',
|
||||||
|
'size' => 40,
|
||||||
|
'required' => ($pref['signup_option_customtitle'] == 2));
|
||||||
return e107::getForm()->text('customtitle', $this->var['user_customtitle'], 100, $options);
|
return e107::getForm()->text('customtitle', $this->var['user_customtitle'], 100, $options);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
function sc_realname($parm)
|
function sc_realname($parm)
|
||||||
|
{
|
||||||
|
$pref = e107::getPref();
|
||||||
|
if ($pref['signup_option_realname'])
|
||||||
|
{
|
||||||
|
$sc = e107::getScBatch('usersettings');
|
||||||
|
$options = array(
|
||||||
|
'title' => '',
|
||||||
|
'size' => 40,
|
||||||
|
'required' => ($pref['signup_option_realname'] == 2),
|
||||||
|
);
|
||||||
|
if(!empty($sc->var['user_login']) && !empty($sc->var['user_xup'])) // social login active.
|
||||||
|
{
|
||||||
|
$options['readonly'] = true;
|
||||||
|
}
|
||||||
|
|
||||||
|
return e107::getForm()->text('realname', $sc->var['user_login'], 100, $options);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
function sc_realname2($parm)
|
||||||
{
|
{
|
||||||
$pref = e107::getPref();
|
$pref = e107::getPref();
|
||||||
$sc = e107::getScBatch('usersettings');
|
$sc = e107::getScBatch('usersettings');
|
||||||
@@ -108,7 +132,7 @@ class usersettings_shortcodes extends e_shortcode
|
|||||||
|
|
||||||
return e107::getForm()->text('realname', $sc->var['user_login'], 100, $options);
|
return e107::getForm()->text('realname', $sc->var['user_login'], 100, $options);
|
||||||
}
|
}
|
||||||
|
*/
|
||||||
|
|
||||||
|
|
||||||
function sc_password1($parm)
|
function sc_password1($parm)
|
||||||
|
@@ -46,7 +46,7 @@ $sc_style['PASSWORD_LEN']['pre'] = "<br /><span class='smalltext'> (".LAN_USE
|
|||||||
$sc_style['PASSWORD_LEN']['post'] = " ".LAN_USER_79.")</span>";
|
$sc_style['PASSWORD_LEN']['post'] = " ".LAN_USER_79.")</span>";
|
||||||
|
|
||||||
$sc_style['USERCLASSES']['pre'] = "<tr>
|
$sc_style['USERCLASSES']['pre'] = "<tr>
|
||||||
<td style='width:40%;vertical-align:top' class='forumheader3'>".LAN_USER_76.":".req(varset($pref['signup_option_class']))."
|
<td style='width:40%;vertical-align:top' class='forumheader3'>".LAN_USER_76.":".req(e107::getPref('signup_option_class'))."
|
||||||
<br /><span class='smalltext'>".LAN_USER_73."</span>
|
<br /><span class='smalltext'>".LAN_USER_73."</span>
|
||||||
</td>
|
</td>
|
||||||
<td style='width:60%' class='forumheader2'>";
|
<td style='width:60%' class='forumheader2'>";
|
||||||
@@ -77,7 +77,7 @@ $sc_style['LOGINNAME']['pre'] = "<tr>
|
|||||||
$sc_style['LOGINNAME']['post'] = "</td></tr>\n";
|
$sc_style['LOGINNAME']['post'] = "</td></tr>\n";
|
||||||
|
|
||||||
|
|
||||||
$sc_style['SIGNATURE']['pre'] = "<tr><td style='width:40%;vertical-align:top' class='forumheader3'>".LAN_USER_71.req(varset($pref['signup_option_signature']))."</td>
|
$sc_style['SIGNATURE']['pre'] = "<tr><td style='width:40%;vertical-align:top' class='forumheader3'>".LAN_USER_71.req(e107::getPref('signup_option_signature'))."</td>
|
||||||
<td style='width:60%' class='forumheader2'>";
|
<td style='width:60%' class='forumheader2'>";
|
||||||
|
|
||||||
//$sc_style['SIGNATURE']['pre'] = "<tr><td style='width:40%;vertical-align:top' class='forumheader3'></td>
|
//$sc_style['SIGNATURE']['pre'] = "<tr><td style='width:40%;vertical-align:top' class='forumheader3'></td>
|
||||||
@@ -125,18 +125,13 @@ $USERSETTINGS_EDIT = "
|
|||||||
{LOGINNAME}
|
{LOGINNAME}
|
||||||
|
|
||||||
<tr>
|
<tr>
|
||||||
<td style='width:40%' class='forumheader3'>".LAN_USER_60.req(!varset($pref['disable_emailcheck']))."</td>
|
<td style='width:40%' class='forumheader3'>".LAN_USER_60.req(!e107::getPref('disable_emailcheck'))."</td>
|
||||||
<td style='width:60%' class='forumheader2'>
|
<td style='width:60%' class='forumheader2'>
|
||||||
{EMAIL}
|
{EMAIL}
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
|
|
||||||
<tr>
|
|
||||||
<td style='width:40%' class='forumheader3'>".LAN_USER_63.req(varset($pref['signup_option_realname']))."</td>
|
|
||||||
<td style='width:60%' class='forumheader2'>
|
|
||||||
{REALNAME}
|
{REALNAME}
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
|
|
||||||
{CUSTOMTITLE}
|
{CUSTOMTITLE}
|
||||||
|
|
||||||
@@ -154,7 +149,7 @@ $USERSETTINGS_EDIT = "
|
|||||||
</tr>
|
</tr>
|
||||||
|
|
||||||
<tr>
|
<tr>
|
||||||
<td style='width:40%; vertical-align:top' class='forumheader3'>".LAN_USER_07.req(varset($pref['signup_option_image']))."</td>
|
<td style='width:40%; vertical-align:top' class='forumheader3'>".LAN_USER_07.req(e107::getPref('signup_option_image'))."</td>
|
||||||
<td style='width:60%' class='forumheader2'>
|
<td style='width:60%' class='forumheader2'>
|
||||||
{AVATAR_REMOTE}
|
{AVATAR_REMOTE}
|
||||||
</td>
|
</td>
|
||||||
@@ -208,14 +203,20 @@ $USERSETTINGS_WRAPPER['edit']['PASSWORD2'] = "<div class='form-group'>
|
|||||||
</div>
|
</div>
|
||||||
";
|
";
|
||||||
|
|
||||||
|
$USERSETTINGS_WRAPPER['edit']['REALNAME'] = "<div class='form-group'>
|
||||||
|
<label for='realname' class='col-sm-3 control-label'>".LAN_USER_63.req(e107::getPref('signup_option_realname'))."</label>
|
||||||
|
<div class='col-sm-9'>{---}</div>
|
||||||
|
</div>
|
||||||
|
";
|
||||||
|
|
||||||
$USERSETTINGS_WRAPPER['edit']['CUSTOMTITLE'] = "<div class='form-group'>
|
$USERSETTINGS_WRAPPER['edit']['CUSTOMTITLE'] = "<div class='form-group'>
|
||||||
<label for='customtitle' class='col-sm-3 control-label'>".LAN_USER_04."</label>
|
<label for='customtitle' class='col-sm-3 control-label'>".LAN_USER_04.':'.req(e107::getPref('signup_option_customtitle'))."</label>
|
||||||
<div class='col-sm-9'>{---}</div>
|
<div class='col-sm-9'>{---}</div>
|
||||||
</div>
|
</div>
|
||||||
";
|
";
|
||||||
|
|
||||||
$USERSETTINGS_WRAPPER['edit']['USERCLASSES'] = "<div class='form-group'>
|
$USERSETTINGS_WRAPPER['edit']['USERCLASSES'] = "<div class='form-group'>
|
||||||
<label class='col-sm-3 control-label'>".LAN_USER_76.":".req(varset($pref['signup_option_class']))."</label>
|
<label class='col-sm-3 control-label'>".LAN_USER_76.":".req(e107::getPref('signup_option_class'))."</label>
|
||||||
<div class='col-sm-9'>{---}</div>
|
<div class='col-sm-9'>{---}</div>
|
||||||
</div>
|
</div>
|
||||||
";
|
";
|
||||||
@@ -234,7 +235,7 @@ $USERSETTINGS_WRAPPER['edit']['PHOTO_UPLOAD'] = "<div class='form-group'>
|
|||||||
|
|
||||||
|
|
||||||
$USERSETTINGS_WRAPPER['edit']['SIGNATURE'] = "<div class='form-group'>
|
$USERSETTINGS_WRAPPER['edit']['SIGNATURE'] = "<div class='form-group'>
|
||||||
<label for='signature' class='col-sm-3 control-label'>".LAN_USER_71.req(varset($pref['signup_option_signature']))."</label>
|
<label for='signature' class='col-sm-3 control-label'>".LAN_USER_71.req(e107::getPref('signup_option_signature'))."</label>
|
||||||
<div class='col-sm-9'>{---}</div>
|
<div class='col-sm-9'>{---}</div>
|
||||||
</div>
|
</div>
|
||||||
";
|
";
|
||||||
@@ -257,18 +258,13 @@ $USERSETTINGS_TEMPLATE['edit'] = "
|
|||||||
|
|
||||||
|
|
||||||
<div class='form-group'>
|
<div class='form-group'>
|
||||||
<label for='email' class='col-sm-3 control-label'>".LAN_USER_60.req(!varset($pref['disable_emailcheck']))."</label>
|
<label for='email' class='col-sm-3 control-label'>".LAN_USER_60.req(!e107::getPref('disable_emailcheck'))."</label>
|
||||||
<div class='col-sm-9'>
|
<div class='col-sm-9'>
|
||||||
{EMAIL}
|
{EMAIL}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class='form-group'>
|
{REALNAME}
|
||||||
<label for='realname' class='col-sm-3 control-label'>".LAN_USER_63.req(varset($pref['signup_option_realname']))."</label>
|
|
||||||
<div class='col-sm-9'>
|
|
||||||
{REALNAME}
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
{CUSTOMTITLE}
|
{CUSTOMTITLE}
|
||||||
|
|
||||||
@@ -285,7 +281,7 @@ $USERSETTINGS_TEMPLATE['edit'] = "
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class='form-group'>
|
<div class='form-group'>
|
||||||
<label class='col-sm-3 control-label'>".LAN_USER_07.req(varset($pref['signup_option_image']))."</label>
|
<label class='col-sm-3 control-label'>".LAN_USER_07.req(e107::getPref('signup_option_image'))."</label>
|
||||||
<div class='col-sm-9'>
|
<div class='col-sm-9'>
|
||||||
{AVATAR_REMOTE}
|
{AVATAR_REMOTE}
|
||||||
</div>
|
</div>
|
||||||
|
Reference in New Issue
Block a user