1
0
mirror of https://github.com/e107inc/e107.git synced 2025-08-02 12:48:26 +02:00

Issue #1767 - Tweak last commit.

This commit is contained in:
Cameron
2020-04-20 14:17:07 -07:00
parent 47a1460ac4
commit 9bd2b3d5f2

View File

@@ -486,8 +486,10 @@ class signup_shortcodes extends e_shortcode
continue; continue;
} }
foreach($extList as $ext) foreach($extList as $ext)
{ {
$opts = $parm;
if($ext['user_extended_struct_required'] == 1 || $ext['user_extended_struct_required'] == 2) if($ext['user_extended_struct_required'] == 1 || $ext['user_extended_struct_required'] == 2)
{ {
if(!$done_heading && ($cat['user_extended_struct_id'] > 0)) if(!$done_heading && ($cat['user_extended_struct_id'] > 0))
@@ -503,15 +505,15 @@ class signup_shortcodes extends e_shortcode
$label = $tp->toHTML(deftrue($ext['user_extended_struct_text'], $ext['user_extended_struct_text']), false, 'emotes_off,defs'); $label = $tp->toHTML(deftrue($ext['user_extended_struct_text'], $ext['user_extended_struct_text']), false, 'emotes_off,defs');
if(!empty($parm['placeholder'])) if(isset($opts['placeholder']))
{ {
$parm['placeholder'] = str_replace('[label]', $label, $parm['placeholder']); $opts['placeholder'] = str_replace('[label]', $label, $opts['placeholder']);
} }
$replace = array( $replace = array(
$label, $label,
($ext['user_extended_struct_required'] == 1 ? $this->sc_signup_is_mandatory('true') : ''), ($ext['user_extended_struct_required'] == 1 ? $this->sc_signup_is_mandatory('true') : ''),
$usere->renderElement($ext, $_POST['ue']['user_' . $ext['user_extended_struct_name']], $parm) $usere->renderElement($ext, $_POST['ue']['user_' . $ext['user_extended_struct_name']], $opts)
); );
$text .= str_replace($search, $replace, $SIGNUP_EXTENDED_USER_FIELDS); $text .= str_replace($search, $replace, $SIGNUP_EXTENDED_USER_FIELDS);