mirror of
https://github.com/phpbb/phpbb.git
synced 2025-02-13 12:35:06 +01:00
git-svn-id: file:///svn/phpbb/trunk@7338 89ea8834-ac86-4346-8a33-228a782c2dd0
This commit is contained in:
parent
d3a093e56d
commit
252faba2d9
@ -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)
|
||||
);
|
||||
}
|
||||
|
@ -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 -->
|
||||
|
@ -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>
|
||||
|
@ -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>
|
||||
|
Loading…
x
Reference in New Issue
Block a user