mirror of
https://github.com/phpbb/phpbb.git
synced 2025-05-08 08:35:31 +02:00
[ticket/11010] dealing with dimensions problem, removing extra code
PHPBB3-11010
This commit is contained in:
parent
178f23d4d8
commit
4c03c22e50
@ -282,15 +282,18 @@ function build_cfg_template($tpl_type, $key, &$new, $config_key, $vars)
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
case 'dimension':
|
case 'dimension':
|
||||||
$min = $max = $maxlength = '';
|
$min = $max = $maxlength = $size = '';
|
||||||
|
|
||||||
$min = (int) $tpl_type[1];
|
$min = (int) $tpl_type[1];
|
||||||
|
|
||||||
if ( isset($tpl_type[2]) )
|
if ( isset($tpl_type[2]) )
|
||||||
{
|
{
|
||||||
$max = (int) $tpl_type[2];
|
$max = (int) $tpl_type[2];
|
||||||
$maxlength = strlen( (string) $max );
|
$maxlength = strlen( (string) $max );
|
||||||
|
$size = strlen( (string) $max );
|
||||||
}
|
}
|
||||||
|
|
||||||
$tpl = '<input id="' . $key . '" type="number" maxlength="' . (($maxlength != '') ? $maxlength : 255) . '"' . (( $min != '' ) ? ' min="' . $min . '"' : '') . (( $max != '' ) ? ' max="' . $max . '"' : '') . ' name="config[' . $config_key . '_width]" value="' . $new[$config_key . '_width'] . '" /> x <input type="number" maxlength="' . (($maxlength != '') ? $maxlength : 255) . '"' . (( $min != '' ) ? ' min="' . $min . '"' : '') . (( $max != '' ) ? ' max="' . $max . '"' : '') . ' name="config[' . $config_key . '_height]" value="' . $new[$config_key . '_height'] . '" />';
|
$tpl = '<input id="' . $key . '" type="number" ' . (( $size != '' ) ? ' size="' . $size . '"' : '') . ' maxlength="' . (($maxlength != '') ? $maxlength : 255) . '"' . (( $min != '' ) ? ' min="' . $min . '"' : '') . (( $max != '' ) ? ' max="' . $max . '"' : '') . ' name="config[' . $config_key . '_width]" value="' . $new[$config_key . '_width'] . '" /> x <input type="number" ' . (( $size != '' ) ? ' size="' . $size . '"' : '') . ' maxlength="' . (($maxlength != '') ? $maxlength : 255) . '"' . (( $min != '' ) ? ' min="' . $min . '"' : '') . (( $max != '' ) ? ' max="' . $max . '"' : '') . ' name="config[' . $config_key . '_height]" value="' . $new[$config_key . '_height'] . '" />';
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 'textarea':
|
case 'textarea':
|
||||||
|
@ -1040,9 +1040,9 @@ class custom_profile_admin extends custom_profile
|
|||||||
global $user;
|
global $user;
|
||||||
|
|
||||||
$options = array(
|
$options = array(
|
||||||
0 => array('TITLE' => $user->lang['FIELD_LENGTH'], 'FIELD' => '<input type="number" min="0" maxlength="5" name="field_length" size="5" value="' . $this->vars['field_length'] . '" />'),
|
0 => array('TITLE' => $user->lang['FIELD_LENGTH'], 'FIELD' => '<input type="number" min="0" name="field_length" size="5" value="' . $this->vars['field_length'] . '" />'),
|
||||||
1 => array('TITLE' => $user->lang['MIN_FIELD_CHARS'], 'FIELD' => '<input type="number" min="0" maxlength="5" name="field_minlen" size="5" value="' . $this->vars['field_minlen'] . '" />'),
|
1 => array('TITLE' => $user->lang['MIN_FIELD_CHARS'], 'FIELD' => '<input type="number" min="0" name="field_minlen" size="5" value="' . $this->vars['field_minlen'] . '" />'),
|
||||||
2 => array('TITLE' => $user->lang['MAX_FIELD_CHARS'], 'FIELD' => '<input type="number" min="0" maxlength="5" size="5" value="' . $this->vars['field_maxlen'] . '" />'),
|
2 => array('TITLE' => $user->lang['MAX_FIELD_CHARS'], 'FIELD' => '<input type="number" min="0" size="5" value="' . $this->vars['field_maxlen'] . '" />'),
|
||||||
3 => array('TITLE' => $user->lang['FIELD_VALIDATION'], 'FIELD' => '<select name="field_validation">' . $this->validate_options() . '</select>')
|
3 => array('TITLE' => $user->lang['FIELD_VALIDATION'], 'FIELD' => '<select name="field_validation">' . $this->validate_options() . '</select>')
|
||||||
);
|
);
|
||||||
|
|
||||||
|
@ -43,7 +43,7 @@ onload_functions.push('subPanels()');
|
|||||||
<fieldset id="display-panel" class="fields2">
|
<fieldset id="display-panel" class="fields2">
|
||||||
<dl>
|
<dl>
|
||||||
<dt><label for="posts_per_page">{L_POSTS_PER_PAGE}{L_COLON}</label><br /><span>{L_POSTS_PER_PAGE_EXPLAIN}</span></dt>
|
<dt><label for="posts_per_page">{L_POSTS_PER_PAGE}{L_COLON}</label><br /><span>{L_POSTS_PER_PAGE_EXPLAIN}</span></dt>
|
||||||
<dd><input class="inputbox autowidth" type="number" min="1" maxlenght="6" name="posts_per_page" id="posts_per_page" size="6" value="{POSTS_PER_PAGE}" /></dd>
|
<dd><input class="inputbox autowidth" type="number" min="1" name="posts_per_page" id="posts_per_page" size="6" value="{POSTS_PER_PAGE}" /></dd>
|
||||||
</dl>
|
</dl>
|
||||||
<dl>
|
<dl>
|
||||||
<dt><label>{L_DISPLAY_POSTS}{L_COLON}</label></dt>
|
<dt><label>{L_DISPLAY_POSTS}{L_COLON}</label></dt>
|
||||||
|
@ -55,7 +55,7 @@
|
|||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td class="row1" nowrap="nowrap"><span class="gen">{L_POSTS_PER_PAGE}</span><br /><span class="gensmall">{L_POSTS_PER_PAGE_EXPLAIN}</span></td>
|
<td class="row1" nowrap="nowrap"><span class="gen">{L_POSTS_PER_PAGE}</span><br /><span class="gensmall">{L_POSTS_PER_PAGE_EXPLAIN}</span></td>
|
||||||
<td class="row2" colspan="2"><input class="post" type="number" min="1" maxlenght="6" name="posts_per_page" size="6" value="{POSTS_PER_PAGE}" /></td>
|
<td class="row2" colspan="2"><input class="post" type="number" min="1" name="posts_per_page" size="6" value="{POSTS_PER_PAGE}" /></td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td class="cat" colspan="3" align="center"><span class="gensmall">{L_DISPLAY_POSTS}{L_COLON}</span> {S_SELECT_SORT_DAYS} <span class="gensmall">{L_SORT_BY}</span> {S_SELECT_SORT_KEY} {S_SELECT_SORT_DIR} <input class="btnlite" type="submit" name="sort" value="{L_GO}" /></td>
|
<td class="cat" colspan="3" align="center"><span class="gensmall">{L_DISPLAY_POSTS}{L_COLON}</span> {S_SELECT_SORT_DAYS} <span class="gensmall">{L_SORT_BY}</span> {S_SELECT_SORT_KEY} {S_SELECT_SORT_DIR} <input class="btnlite" type="submit" name="sort" value="{L_GO}" /></td>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user