Version 5.0.14
This commit is contained in:
1 parent
5efe744c5f
commit
dbd774b30c
364 files changed
+7048
-1377
No files matched your search
@@ -18,11 +18,13 @@ use IPS\Application;
|
||||
use IPS\Data\Store;
|
||||
use IPS\Db;
|
||||
use IPS\Extensions\ProfileStepsAbstract;
|
||||
use IPS\File;
|
||||
use IPS\Helpers\Form;
|
||||
use IPS\Helpers\Form\Radio;
|
||||
use IPS\Helpers\Form\Translatable;
|
||||
use IPS\Helpers\Form\YesNo;
|
||||
use IPS\Lang;
|
||||
use IPS\Login;
|
||||
use IPS\Member;
|
||||
use IPS\Node\Model;
|
||||
use IPS\Patterns\ActiveRecordIterator;
|
||||
@@ -612,7 +614,15 @@ class ProfileStep extends Model
|
||||
}
|
||||
|
||||
$form->add( new YesNo( 'profile_step_required', $this->required, FALSE, array(), NULL, NULL, NULL, 'step_required' ) );
|
||||
$form->add( new YesNo( 'profile_step_registration', $this->registration, false, array(), null, null, null, 'step_registration' ) );
|
||||
|
||||
$form->add( new YesNo( 'profile_step_registration', $this->registration, false, array(
|
||||
'disabled' => ( Login::registrationType() != 'full' )
|
||||
), null, null, null, 'step_registration' ) );
|
||||
|
||||
if( Login::registrationType() != 'full' )
|
||||
{
|
||||
$form->addMessage( 'profile_step_no_registration', 'ipsMessage ipsMessage--warning' );
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -623,6 +633,14 @@ class ProfileStep extends Model
|
||||
public function formatFormValues( array $values ): array
|
||||
{
|
||||
$return = array();
|
||||
|
||||
/* Do we have an editor field to clear? */
|
||||
$autoSaveKey = null;
|
||||
$choiceType = static::actionMultipleChoice( $values['profile_step_completion_act'] );
|
||||
if( $choiceType === null )
|
||||
{
|
||||
$autoSaveKey = 'core-step-' . $values['profile_step_completion_act'] . ( $this->id ?: 0 );
|
||||
}
|
||||
|
||||
if ( !$this->id )
|
||||
{
|
||||
@@ -638,6 +656,11 @@ class ProfileStep extends Model
|
||||
|
||||
$this->save();
|
||||
}
|
||||
|
||||
if( $autoSaveKey )
|
||||
{
|
||||
File::claimAttachments( $autoSaveKey, $this->id, null, null, true );
|
||||
}
|
||||
|
||||
if ( isset( $values[ 'profile_step_subaction_' . $values['profile_step_completion_act'] ] ) )
|
||||
{
|
||||
|
||||
Reference in new issue
Block a user