Version 5.0.0 beta 4
This commit is contained in:
1 parent
e86153356a
commit
2f24f9de48
276 files changed
+8614
-6044
No files matched your search
@@ -969,16 +969,38 @@ class Fields extends CustomField implements Permissions
|
||||
{
|
||||
foreach( $value as $idx => $val )
|
||||
{
|
||||
if ( $val instanceof FileSystem )
|
||||
if ( $val instanceof File )
|
||||
{
|
||||
$value[ $idx ] = (string) $val->url;
|
||||
$fileKey = Encrypt::fromPlaintext( (string) $val )->tag();
|
||||
$downloadUrl = Url::internal( 'applications/core/interface/file/cfield.php', 'none' )->setqueryString( array(
|
||||
'storage' => $val->storageExtension,
|
||||
'path' => $val->originalFilename,
|
||||
'fileKey' => $fileKey
|
||||
) );
|
||||
|
||||
$value[ $idx ] = Theme::i()->getTemplate( 'global', 'cms', 'front' )->uploadDisplay( File::get( static::$uploadStorageExtension, $val ), $record, $downloadUrl, $fileKey );
|
||||
}
|
||||
}
|
||||
}
|
||||
else if ( $value instanceof FileSystem )
|
||||
else if ( $value instanceof File )
|
||||
{
|
||||
$value = (string) $value->url;
|
||||
$fileKey = Encrypt::fromPlaintext( (string) $value )->tag();
|
||||
$downloadUrl = Url::internal( 'applications/core/interface/file/cfield.php', 'none' )->setqueryString( array(
|
||||
'storage' => $value->storageExtension,
|
||||
'path' => $value->originalFilename,
|
||||
'fileKey' => $fileKey
|
||||
) );
|
||||
|
||||
$value = Theme::i()->getTemplate( 'global', 'cms', 'front' )->uploadDisplay( File::get( static::$uploadStorageExtension, $value ), $record, $downloadUrl, $fileKey );
|
||||
}
|
||||
|
||||
/* Restructure formValue so that it has the full URL */
|
||||
$updatedFormValue = [];
|
||||
foreach( explode( ",", $formValue ) as $val )
|
||||
{
|
||||
$updatedFormValue[] = File::get( static::$uploadStorageExtension, $val )->url;
|
||||
}
|
||||
$formValue = implode( ",", $updatedFormValue );
|
||||
}
|
||||
if ( ! isset( Store::i()->$functionName ) )
|
||||
{
|
||||
@@ -2235,7 +2257,7 @@ class Fields extends CustomField implements Permissions
|
||||
if ( ! $isTitleOrContent )
|
||||
{
|
||||
$form->add( new YesNo( 'field_display_listing', $this->id ? $this->display_listing : 1, FALSE, array(
|
||||
'togglesOn' => array('field_truncate', 'field_display_listing_json_badge', 'field_show_map_listing' )
|
||||
'togglesOn' => array('field_display_listing_json_badge', 'field_show_map_listing', 'media_display_listing_method' )
|
||||
), NULL, NULL, NULL, 'field_display_listing' ) );
|
||||
}
|
||||
|
||||
@@ -2277,7 +2299,7 @@ class Fields extends CustomField implements Permissions
|
||||
if ( ! $isTitleOrContent )
|
||||
{
|
||||
$form->add( new YesNo( 'field_display_display', $this->id ? $this->display_display : 1, FALSE, array(
|
||||
'togglesOn' => array( 'field_display_display_json_badge', 'field_show_map_display', 'field_display_display_json_where' )
|
||||
'togglesOn' => array( 'field_display_display_json_badge', 'field_show_map_display', 'field_display_display_json_where', 'media_display_display_method' )
|
||||
), NULL, NULL, NULL, 'field_display_display' ) );
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user