function asset_bonus_swfobject_form in Asset 5.2
File
- contrib/
asset_bonus/ asset_bonus.module, line 204
Code
function asset_bonus_swfobject_form($asset) {
require_once drupal_get_path('module', 'asset_bonus') . '/swfheader/swfheader.class.php';
$swf = new swfheader();
$swf
->getDimensions($asset->filepath);
$form['width'] = array(
'#type' => 'textfield',
'#title' => t('Width'),
'#description' => t('Width in pixels'),
'#default_value' => !isset($_GET['width']) ? $swf->width : filter_xss($_GET['width']),
'#size' => 5,
'#required' => true,
);
$form['height'] = array(
'#type' => 'textfield',
'#title' => t('Height'),
'#description' => t('Height in pixels'),
'#default_value' => !isset($_GET['height']) ? $swf->height : filter_xss($_GET['height']),
'#size' => 5,
'#required' => true,
);
$form['version'] = array(
'#type' => 'textfield',
'#title' => t('Minimum Version'),
'#default_value' => $swf->version,
'#size' => 5,
'#required' => true,
);
$form['bgcolor'] = array(
'#type' => 'textfield',
'#title' => t('Background Color'),
'#description' => t('Hex formatted background color like #FFFFFF. Make sure to include the #.'),
'#default_value' => '#FFFFFF',
'#size' => 7,
'#required' => true,
);
return $form;
}