aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSenky <jakubsenko@gmail.com>2013-04-13 11:29:53 +0200
committerSenky <jakubsenko@gmail.com>2013-05-20 18:42:06 +0200
commit4c03c22e503a4317db93e7e61f676a396318b097 (patch)
tree16ecbecd00c9a1f918c59e391f5caeab7cb85129
parent178f23d4d8e37724e5f27cfb9b19dd2ab867e888 (diff)
downloadforums-4c03c22e503a4317db93e7e61f676a396318b097.tar
forums-4c03c22e503a4317db93e7e61f676a396318b097.tar.gz
forums-4c03c22e503a4317db93e7e61f676a396318b097.tar.bz2
forums-4c03c22e503a4317db93e7e61f676a396318b097.tar.xz
forums-4c03c22e503a4317db93e7e61f676a396318b097.zip
[ticket/11010] dealing with dimensions problem, removing extra code
PHPBB3-11010
-rw-r--r--phpBB/includes/functions_acp.php7
-rw-r--r--phpBB/includes/functions_profile_fields.php6
-rw-r--r--phpBB/styles/prosilver/template/mcp_topic.html2
-rw-r--r--phpBB/styles/subsilver2/template/mcp_topic.html2
4 files changed, 10 insertions, 7 deletions
diff --git a/phpBB/includes/functions_acp.php b/phpBB/includes/functions_acp.php
index eb89dbebc8..247d181fb0 100644
--- a/phpBB/includes/functions_acp.php
+++ b/phpBB/includes/functions_acp.php
@@ -282,15 +282,18 @@ function build_cfg_template($tpl_type, $key, &$new, $config_key, $vars)
break;
case 'dimension':
- $min = $max = $maxlength = '';
+ $min = $max = $maxlength = $size = '';
+
$min = (int) $tpl_type[1];
+
if ( isset($tpl_type[2]) )
{
$max = (int) $tpl_type[2];
$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;
case 'textarea':
diff --git a/phpBB/includes/functions_profile_fields.php b/phpBB/includes/functions_profile_fields.php
index 1261e363c7..7dd0b0e87d 100644
--- a/phpBB/includes/functions_profile_fields.php
+++ b/phpBB/includes/functions_profile_fields.php
@@ -1040,9 +1040,9 @@ class custom_profile_admin extends custom_profile
global $user;
$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'] . '" />'),
- 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'] . '" />'),
- 2 => array('TITLE' => $user->lang['MAX_FIELD_CHARS'], 'FIELD' => '<input type="number" min="0" maxlength="5" size="5" value="' . $this->vars['field_maxlen'] . '" />'),
+ 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" name="field_minlen" size="5" value="' . $this->vars['field_minlen'] . '" />'),
+ 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>')
);
diff --git a/phpBB/styles/prosilver/template/mcp_topic.html b/phpBB/styles/prosilver/template/mcp_topic.html
index 3277e4b282..8dfee55cbf 100644
--- a/phpBB/styles/prosilver/template/mcp_topic.html
+++ b/phpBB/styles/prosilver/template/mcp_topic.html
@@ -43,7 +43,7 @@ onload_functions.push('subPanels()');
<fieldset id="display-panel" class="fields2">
<dl>
<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>
<dt><label>{L_DISPLAY_POSTS}{L_COLON}</label></dt>
diff --git a/phpBB/styles/subsilver2/template/mcp_topic.html b/phpBB/styles/subsilver2/template/mcp_topic.html
index 4af6c6c78a..014d8b9468 100644
--- a/phpBB/styles/subsilver2/template/mcp_topic.html
+++ b/phpBB/styles/subsilver2/template/mcp_topic.html
@@ -55,7 +55,7 @@
</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="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>
<td class="cat" colspan="3" align="center"><span class="gensmall">{L_DISPLAY_POSTS}{L_COLON}</span> {S_SELECT_SORT_DAYS}&nbsp;<span class="gensmall">{L_SORT_BY}</span> {S_SELECT_SORT_KEY} {S_SELECT_SORT_DIR}&nbsp;<input class="btnlite" type="submit" name="sort" value="{L_GO}" /></td>