Added table-building support to SetupBlock to allow easily building cleaner setup controls
This commit is contained in:
parent
4065540f0e
commit
8638a16694
@ -280,13 +280,17 @@ class Media extends Extension
|
||||
// $sb->add_label("<b style='color:red'>ImageMagick not detected</b>");
|
||||
// }
|
||||
// } else {
|
||||
$sb->add_text_option(MediaConfig::CONVERT_PATH, "convert command: ");
|
||||
$sb->start_table();
|
||||
$sb->add_table_header("Commands");
|
||||
|
||||
$sb->add_text_option(MediaConfig::CONVERT_PATH, "convert", true);
|
||||
// }
|
||||
|
||||
$sb->add_text_option(MediaConfig::FFMPEG_PATH, "<br/>ffmpeg command: ");
|
||||
$sb->add_text_option(MediaConfig::FFPROBE_PATH, "<br/>ffprobe command: ");
|
||||
$sb->add_text_option(MediaConfig::FFMPEG_PATH, "<br/>ffmpeg", true);
|
||||
$sb->add_text_option(MediaConfig::FFPROBE_PATH, "<br/>ffprobe", true);
|
||||
|
||||
$sb->add_shorthand_int_option(MediaConfig::MEM_LIMIT, "<br />Max memory use: ");
|
||||
$sb->add_shorthand_int_option(MediaConfig::MEM_LIMIT, "<br />Mem limit: ", true);
|
||||
$sb->end_table();
|
||||
|
||||
$event->panel->add_block($sb);
|
||||
|
||||
|
@ -98,7 +98,7 @@ class TranscodeImage extends Extension
|
||||
$sb->start_table();
|
||||
$sb->add_bool_option(TranscodeConfig::ENABLED, "Allow transcoding images: ", true);
|
||||
$sb->add_bool_option(TranscodeConfig::UPLOAD, "Transcode on upload: ", true);
|
||||
$sb->add_choice_option(TranscodeConfig::ENGINE, Media::IMAGE__MEDIA_ENGINES, "Engine", true);
|
||||
$sb->add_choice_option(TranscodeConfig::ENGINE, Media::IMAGE_MEDIA_ENGINES, "Engine", true);
|
||||
foreach (self::INPUT_FORMATS as $display=>$format) {
|
||||
if (in_array($format, MediaEngine::INPUT_SUPPORT[$engine])) {
|
||||
$outputs = $this->get_supported_output_formats($engine, $format);
|
||||
|
Loading…
x
Reference in New Issue
Block a user