Version 5.0.0 beta 3

This commit is contained in:
Neo committed 2025-12-19 16:47:22 -08:00
1 parent f61b0da85d
commit e86153356a
108 files changed
+2927 -1573

No files matched your search

+21 -3
View File
@@ -907,10 +907,28 @@ class Fields extends CustomField implements Permissions
foreach( $files AS $file )
{
$file = File::get( static::$uploadStorageExtension, (string) $file );
$parsed[] = Theme::i()->getTemplate( 'global', 'core', 'global' )->basicUrl( $file->fullyQualifiedUrl( $file->url ) );
if( $options[ $type ]['method'] == 'simple' )
{
$fileKey = Encrypt::fromPlaintext( (string) $file )->tag();
$downloadUrl = Url::internal( 'applications/core/interface/file/cfield.php', 'none' )->setqueryString( array(
'storage' => $file->storageExtension,
'path' => $file->originalFilename,
'fileKey' => $fileKey
) );
$parsed[] = Theme::i()->getTemplate( 'global', 'cms', 'front' )->uploadDisplay( File::get( static::$uploadStorageExtension, $file ), $record, $downloadUrl, $fileKey );
}
else
{
$parsed[] = Theme::i()->getTemplate( 'global', 'core', 'global' )->basicUrl( $file->fullyQualifiedUrl( $file->url ) );
}
}
$value = implode( '', $parsed );
}
$value = implode( " ", $parsed );
}
$value = Theme::i()->getTemplate( 'records', 'cms', 'global' )->fieldDefault( $this->_title, $value );
@@ -1966,8 +1984,8 @@ class Fields extends CustomField implements Permissions
}
/* Number specific */
$form->add( new Number( 'field_number_min', $this->id and $this->extra['min'] ?? NULL, FALSE, array( 'unlimited' => '', 'unlimitedLang' => 'any' ), NULL, NULL, NULL, 'field_number_min' ) );
$form->add( new Number( 'field_number_max', $this->id and $this->extra['max'] ?? NULL, FALSE, array( 'unlimited' => '', 'unlimitedLang' => 'any' ), NULL, NULL, NULL, 'field_number_max' ) );
$form->add( new Number( 'field_number_min', ( $this->id and isset( $this->extra['min'] ) ) ? $this->extra['min'] : NULL, FALSE, array( 'unlimited' => '', 'unlimitedLang' => 'any', 'decimals' => true ), NULL, NULL, NULL, 'field_number_min' ) );
$form->add( new Number( 'field_number_max', ( $this->id and isset( $this->extra['max'] ) ) ? $this->extra['max'] : NULL, FALSE, array( 'unlimited' => '', 'unlimitedLang' => 'any', 'decimals' => true ), NULL, NULL, NULL, 'field_number_max' ) );
$form->add( new YesNo( 'field_number_decimals_on', $this->id && ( isset( $this->extra['on'] ) and $this->extra['on'] ), FALSE, array( 'togglesOn' => array( 'field_number_decimals' ) ), NULL, NULL, NULL, 'field_number_decimals_on' ) );
$form->add( new Number( 'field_number_decimals', $this->id ? ( ( isset( $this->extra['places'] ) and $this->extra['places'] ) ? $this->extra['places'] : 0 ) : 0, FALSE, array( 'max' => 6 ), NULL, NULL, NULL, 'field_number_decimals' ) );