| 1 |
<?php |
<?php |
| 2 |
// $Id: fckeditor.user.inc,v 1.1.2.15 2009/08/16 17:10:45 jorrit Exp $ |
// $Id: fckeditor.user.inc,v 1.1.2.16 2009/10/22 20:35:18 jorrit Exp $ |
| 3 |
/** |
/** |
| 4 |
* FCKeditor - The text editor for Internet - http://www.fckeditor.net |
* FCKeditor - The text editor for Internet - http://www.fckeditor.net |
| 5 |
* Copyright (C) 2003-2008 Frederico Caldeira Knabben |
* Copyright (C) 2003-2008 Frederico Caldeira Knabben |
| 125 |
'#type' => 'textfield', |
'#type' => 'textfield', |
| 126 |
'#title' => t('Width'), |
'#title' => t('Width'), |
| 127 |
'#default_value' => isset($user->fckeditor_width) ? $user->fckeditor_width : (isset($profile->settings['width']) ? $profile->settings['width'] : '100%'), |
'#default_value' => isset($user->fckeditor_width) ? $user->fckeditor_width : (isset($profile->settings['width']) ? $profile->settings['width'] : '100%'), |
| 128 |
'#description' => t('Width in pixels or percent.'). ' '. t('Example'). ': 400 '. t('or') .' 100%.', |
'#description' => t('Width in pixels or percent.') .' '. t('Example') .': 400 '. t('or') .' 100%.', |
| 129 |
'#size' => 40, |
'#size' => 40, |
| 130 |
'#maxlength' => 128, |
'#maxlength' => 128, |
| 131 |
); |
); |
| 163 |
} |
} |
| 164 |
|
|
| 165 |
if (isset($edit['fckeditor_width']) && !preg_match('/^\d+%?$/', $edit['fckeditor_width'])) { |
if (isset($edit['fckeditor_width']) && !preg_match('/^\d+%?$/', $edit['fckeditor_width'])) { |
| 166 |
form_set_error('width', t('Enter valid width.') .' '. t('Example'). ': 400 '. t('or') .' 100%.'); |
form_set_error('width', t('Enter valid width.') .' '. t('Example') .': 400 '. t('or') .' 100%.'); |
| 167 |
} |
} |
| 168 |
} |
} |
| 169 |
|
|