aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDavid M <davidmj@users.sourceforge.net>2007-04-13 03:55:33 +0000
committerDavid M <davidmj@users.sourceforge.net>2007-04-13 03:55:33 +0000
commit252faba2d9ce3dc5baa2a660f4be2676e927baea (patch)
tree0e781ea1e47062788ff09b6c1f62369d38c73c64
parentd3a093e56d1b69d2516c083072aab9b4beb41816 (diff)
downloadforums-252faba2d9ce3dc5baa2a660f4be2676e927baea.tar
forums-252faba2d9ce3dc5baa2a660f4be2676e927baea.tar.gz
forums-252faba2d9ce3dc5baa2a660f4be2676e927baea.tar.bz2
forums-252faba2d9ce3dc5baa2a660f4be2676e927baea.tar.xz
forums-252faba2d9ce3dc5baa2a660f4be2676e927baea.zip
#9677
git-svn-id: file:///svn/phpbb/trunk@7338 89ea8834-ac86-4346-8a33-228a782c2dd0
-rw-r--r--phpBB/includes/functions_profile_fields.php4
-rw-r--r--phpBB/styles/prosilver/template/custom_profile_fields.html10
-rw-r--r--phpBB/styles/prosilver/template/ucp_profile_profile_info.html3
-rw-r--r--phpBB/styles/prosilver/template/ucp_register.html2
4 files changed, 12 insertions, 7 deletions
diff --git a/phpBB/includes/functions_profile_fields.php b/phpBB/includes/functions_profile_fields.php
index 05bea54bd7..a645b67a22 100644
--- a/phpBB/includes/functions_profile_fields.php
+++ b/phpBB/includes/functions_profile_fields.php
@@ -62,10 +62,14 @@ class custom_profile
// Return templated field
$tpl_snippet = $this->process_field_row('change', $row);
+ // Some types are multivalue, we can't give them a field_id as we would not know which to pick
+ $type = (int) $row['field_type'];
+
$template->assign_block_vars('profile_fields', array(
'LANG_NAME' => $row['lang_name'],
'LANG_EXPLAIN' => $row['lang_explain'],
'FIELD' => $tpl_snippet,
+ 'FIELD_ID' => ($type == 6 || ($type == 4 && $row['field_length'] == '1')) ? '' : 'pf_' . $row['field_ident'],
'S_REQUIRED' => ($row['field_required']) ? true : false)
);
}
diff --git a/phpBB/styles/prosilver/template/custom_profile_fields.html b/phpBB/styles/prosilver/template/custom_profile_fields.html
index 19f1dac6b6..2988bf8140 100644
--- a/phpBB/styles/prosilver/template/custom_profile_fields.html
+++ b/phpBB/styles/prosilver/template/custom_profile_fields.html
@@ -1,27 +1,27 @@
<!-- BEGIN dropdown -->
-<select name="{dropdown.FIELD_IDENT}">
+<select name="{dropdown.FIELD_IDENT}" id="{dropdown.FIELD_IDENT}">
<!-- BEGIN options --><option value="{dropdown.options.OPTION_ID}"{dropdown.options.SELECTED}>{dropdown.options.VALUE}</option><!-- END options -->
</select>
<!-- END dropdown -->
<!-- BEGIN text -->
-<textarea name="{text.FIELD_IDENT}" rows="{text.FIELD_ROWS}" cols="{text.FIELD_COLS}" class="inputbox">{text.FIELD_VALUE}</textarea>
+<textarea name="{text.FIELD_IDENT}" id="{text.FIELD_IDENT}" rows="{text.FIELD_ROWS}" cols="{text.FIELD_COLS}" class="inputbox">{text.FIELD_VALUE}</textarea>
<!-- END text -->
<!-- BEGIN string -->
-<input type="text" class="inputbox" name="{string.FIELD_IDENT}" size="{string.FIELD_LENGTH}" maxlength="{string.FIELD_MAXLEN}" value="{string.FIELD_VALUE}" />
+<input type="text" class="inputbox" name="{string.FIELD_IDENT}" id="{string.FIELD_IDENT}" size="{string.FIELD_LENGTH}" maxlength="{string.FIELD_MAXLEN}" value="{string.FIELD_VALUE}" />
<!-- END string -->
<!-- BEGIN bool -->
<!-- IF bool.FIELD_LENGTH eq 1 -->
<!-- BEGIN options --><label for="{bool.FIELD_IDENT}_{bool.options.OPTION_ID}"><input type="radio" name="{bool.FIELD_IDENT}" id="{bool.FIELD_IDENT}_{bool.options.OPTION_ID}" value="{bool.options.OPTION_ID}"{bool.options.CHECKED} /> {bool.options.VALUE}</label> <!-- END options -->
<!-- ELSE -->
- <input type="checkbox" name="{bool.FIELD_IDENT}"<!-- IF bool.FIELD_VALUE --> checked="checked"<!-- ENDIF --> />
+ <input type="checkbox" name="{bool.FIELD_IDENT}" id="{bool.FIELD_IDENT}"<!-- IF bool.FIELD_VALUE --> checked="checked"<!-- ENDIF --> />
<!-- ENDIF -->
<!-- END bool -->
<!-- BEGIN int -->
-<input type="text" class="inputbox" name="{int.FIELD_IDENT}" size="{int.FIELD_LENGTH}" value="{int.FIELD_VALUE}" />
+<input type="text" class="inputbox" name="{int.FIELD_IDENT}" id="{int.FIELD_IDENT}" size="{int.FIELD_LENGTH}" value="{int.FIELD_VALUE}" />
<!-- END int -->
<!-- BEGIN date -->
diff --git a/phpBB/styles/prosilver/template/ucp_profile_profile_info.html b/phpBB/styles/prosilver/template/ucp_profile_profile_info.html
index 7146918613..7ae6fd054b 100644
--- a/phpBB/styles/prosilver/template/ucp_profile_profile_info.html
+++ b/phpBB/styles/prosilver/template/ucp_profile_profile_info.html
@@ -56,7 +56,8 @@
</dl>
<!-- BEGIN profile_fields -->
<dl>
- <dt><label>{profile_fields.LANG_NAME}:</label><!-- IF profile_fields.LANG_EXPLAIN --><br /><span>{profile_fields.LANG_EXPLAIN}</span><!-- ENDIF --></dt>
+ <dt><label for="{profile_fields.FIELD_ID}">{profile_fields.LANG_NAME}:<!-- IF profile_fields.S_REQUIRED --> *<!-- ENDIF --></label>
+ <!-- IF profile_fields.LANG_EXPLAIN --><br /><span>{profile_fields.LANG_EXPLAIN}</span><!-- ENDIF --></dt>
<!-- IF profile_fields.ERROR --><dd class="error">{profile_fields.ERROR}</dd><!-- ENDIF -->
<dd>{profile_fields.FIELD}</dd>
</dl>
diff --git a/phpBB/styles/prosilver/template/ucp_register.html b/phpBB/styles/prosilver/template/ucp_register.html
index 3de28b0c43..13befd02da 100644
--- a/phpBB/styles/prosilver/template/ucp_register.html
+++ b/phpBB/styles/prosilver/template/ucp_register.html
@@ -63,7 +63,7 @@
<!-- BEGIN profile_fields -->
<dl>
- <dt><label for="lang">{profile_fields.LANG_NAME}:</label>
+ <dt><label for="{profile_fields.FIELD_ID}">{profile_fields.LANG_NAME}:<!-- IF profile_fields.S_REQUIRED --> *<!-- ENDIF --></label>
<!-- IF profile_fields.LANG_EXPLAIN --><br /><span>{profile_fields.LANG_EXPLAIN}</span><!-- ENDIF -->
<!-- IF profile_fields.ERROR --><br /><span style="color:red">{profile_fields.ERROR}</span><!-- ENDIF --></dt>
<dd>{profile_fields.FIELD}</dd>