Version 4.3.6
This commit is contained in:
1 parent
fe1acf984a
commit
1a0c7fd3c2
609 files changed
+14707
-5726
No files matched your search
@@ -428,13 +428,16 @@ class _ProfileStep extends \IPS\Node\Model
|
||||
{
|
||||
if ( isset( $subActions[ $item ] ) )
|
||||
{
|
||||
$lang[] = \IPS\Member::loggedIn()->language()->get( $subActions[ $item ] );
|
||||
$lang[] = \IPS\Member::loggedIn()->language()->addToStack( $subActions[ $item ] );
|
||||
}
|
||||
}
|
||||
|
||||
if ( count( $lang ) )
|
||||
{
|
||||
return \IPS\Member::loggedIn()->language()->get( 'complete_profile_' . $this->completion_act ) . ' (' . \IPS\Member::loggedIn()->language()->formatList( $lang ) . ')';
|
||||
$result = \IPS\Member::loggedIn()->language()->get( 'complete_profile_' . $this->completion_act ) . ' (' . \IPS\Member::loggedIn()->language()->formatList( $lang ) . ')';
|
||||
\IPS\Member::loggedIn()->language()->parseOutputForDisplay( $result );
|
||||
|
||||
return $result;
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -466,6 +469,46 @@ class _ProfileStep extends \IPS\Node\Model
|
||||
return $this->extension->completed( $this, $member );
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Can add cache
|
||||
*/
|
||||
protected static $canAdd = NULL;
|
||||
|
||||
/**
|
||||
* Can add new steps
|
||||
*
|
||||
* @return param
|
||||
*/
|
||||
public function canAdd()
|
||||
{
|
||||
if ( static::$canAdd === NULL )
|
||||
{
|
||||
$actions = static::actions();
|
||||
$subActions = static::subActions();
|
||||
$usedSubActions = $this->usedSubActions();
|
||||
|
||||
foreach( $actions as $key => $lang )
|
||||
{
|
||||
if ( isset( $subActions[ $key ] ) )
|
||||
{
|
||||
if ( isset( $usedSubActions[ $key ] ) )
|
||||
{
|
||||
if ( \count( $usedSubActions[ $key ] ) == \count( $subActions[ $key ] ) )
|
||||
{
|
||||
/* Nothing left to select, so skip this */
|
||||
unset( $actions[ $key ] );
|
||||
continue;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
static::$canAdd = \count( $actions );
|
||||
}
|
||||
|
||||
return static::$canAdd;
|
||||
}
|
||||
|
||||
/**
|
||||
* Form
|
||||
*
|
||||
@@ -491,6 +534,13 @@ class _ProfileStep extends \IPS\Node\Model
|
||||
|
||||
if ( isset( $usedSubActions[ $key ] ) )
|
||||
{
|
||||
if ( \count( $usedSubActions[ $key ] ) >= \count( $subActions[ $key ] ) )
|
||||
{
|
||||
/* Nothing left to select, so skip this */
|
||||
unset( $actions[ $key ] );
|
||||
continue;
|
||||
}
|
||||
|
||||
$disabled = $usedSubActions[ $key ];
|
||||
}
|
||||
|
||||
@@ -499,7 +549,7 @@ class _ProfileStep extends \IPS\Node\Model
|
||||
$toggles[ $key ][] = 'profile_step_subaction_' . $key;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
foreach( static::canBeRequired() AS $action )
|
||||
{
|
||||
$toggles[ $action ][] = 'step_required';
|
||||
|
||||
Reference in new issue
Block a user