Version 4.7.0
This commit is contained in:
1 parent
517a5e1f70
commit
8ba7d43898
1933 files changed
+65613
-11332
No files matched your search
@@ -84,7 +84,7 @@ class _applications extends \IPS\Dispatcher\Controller
|
||||
|
||||
$apps[ (string) $app ] = array(
|
||||
'name' => (string) $name,
|
||||
'disabled' => ( !empty( $errors ) or (string) $app === 'core' ),
|
||||
'disabled' => ( !empty( $errors ) or ( (string) $app === 'core' or (string) $app === 'cloud' ) ),
|
||||
'errors' => $errors,
|
||||
);
|
||||
}
|
||||
@@ -93,6 +93,11 @@ class _applications extends \IPS\Dispatcher\Controller
|
||||
/* Bring core app to top */
|
||||
$system['core'] = $apps['core'];
|
||||
unset( $apps['core'] );
|
||||
if ( isset( $apps['cloud'] ) )
|
||||
{
|
||||
$system['cloud'] = $apps['cloud'];
|
||||
unset( $apps['cloud'] );
|
||||
}
|
||||
$apps = array_merge( $system, $apps );
|
||||
|
||||
$form->add( new \IPS\Helpers\Form\Custom( 'apps', $defaultTicks, TRUE, array(
|
||||
@@ -120,6 +125,7 @@ class _applications extends \IPS\Dispatcher\Controller
|
||||
$options = array_combine( array_keys( $apps ), array_map( function( $value ){ return $value['name']; }, $apps ) );
|
||||
/* But put system app at end of list to ensure it's not selected by default over something else */
|
||||
unset( $options['core'] );
|
||||
unset( $options['cloud'] );
|
||||
$options['core'] = $apps['core']['name'];
|
||||
return \IPS\Theme::i()->getTemplate( 'forms' )->select( 'default_app', $element->value, TRUE, $options );
|
||||
},
|
||||
|
||||
Reference in new issue
Block a user