mirror of
https://github.com/phpbb/phpbb.git
synced 2025-06-28 14:18:52 +00:00
git-svn-id: file:///svn/phpbb/trunk@7338 89ea8834-ac86-4346-8a33-228a782c2dd0
This commit is contained in:
parent
d3a093e56d
commit
252faba2d9
4 changed files with 12 additions and 7 deletions
|
@ -62,10 +62,14 @@ class custom_profile
|
||||||
// Return templated field
|
// Return templated field
|
||||||
$tpl_snippet = $this->process_field_row('change', $row);
|
$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(
|
$template->assign_block_vars('profile_fields', array(
|
||||||
'LANG_NAME' => $row['lang_name'],
|
'LANG_NAME' => $row['lang_name'],
|
||||||
'LANG_EXPLAIN' => $row['lang_explain'],
|
'LANG_EXPLAIN' => $row['lang_explain'],
|
||||||
'FIELD' => $tpl_snippet,
|
'FIELD' => $tpl_snippet,
|
||||||
|
'FIELD_ID' => ($type == 6 || ($type == 4 && $row['field_length'] == '1')) ? '' : 'pf_' . $row['field_ident'],
|
||||||
'S_REQUIRED' => ($row['field_required']) ? true : false)
|
'S_REQUIRED' => ($row['field_required']) ? true : false)
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,27 +1,27 @@
|
||||||
<!-- BEGIN dropdown -->
|
<!-- 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 -->
|
<!-- BEGIN options --><option value="{dropdown.options.OPTION_ID}"{dropdown.options.SELECTED}>{dropdown.options.VALUE}</option><!-- END options -->
|
||||||
</select>
|
</select>
|
||||||
<!-- END dropdown -->
|
<!-- END dropdown -->
|
||||||
|
|
||||||
<!-- BEGIN text -->
|
<!-- 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 -->
|
<!-- END text -->
|
||||||
|
|
||||||
<!-- BEGIN string -->
|
<!-- 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 -->
|
<!-- END string -->
|
||||||
|
|
||||||
<!-- BEGIN bool -->
|
<!-- BEGIN bool -->
|
||||||
<!-- IF bool.FIELD_LENGTH eq 1 -->
|
<!-- 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 -->
|
<!-- 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 -->
|
<!-- 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 -->
|
<!-- ENDIF -->
|
||||||
<!-- END bool -->
|
<!-- END bool -->
|
||||||
|
|
||||||
<!-- BEGIN int -->
|
<!-- 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 -->
|
<!-- END int -->
|
||||||
|
|
||||||
<!-- BEGIN date -->
|
<!-- BEGIN date -->
|
||||||
|
|
|
@ -56,7 +56,8 @@
|
||||||
</dl>
|
</dl>
|
||||||
<!-- BEGIN profile_fields -->
|
<!-- BEGIN profile_fields -->
|
||||||
<dl>
|
<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 -->
|
<!-- IF profile_fields.ERROR --><dd class="error">{profile_fields.ERROR}</dd><!-- ENDIF -->
|
||||||
<dd>{profile_fields.FIELD}</dd>
|
<dd>{profile_fields.FIELD}</dd>
|
||||||
</dl>
|
</dl>
|
||||||
|
|
|
@ -63,7 +63,7 @@
|
||||||
|
|
||||||
<!-- BEGIN profile_fields -->
|
<!-- BEGIN profile_fields -->
|
||||||
<dl>
|
<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.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>
|
<!-- IF profile_fields.ERROR --><br /><span style="color:red">{profile_fields.ERROR}</span><!-- ENDIF --></dt>
|
||||||
<dd>{profile_fields.FIELD}</dd>
|
<dd>{profile_fields.FIELD}</dd>
|
||||||
|
|
Loading…
Add table
Reference in a new issue