Version 4.3.0
This commit is contained in:
1 parent
96997ddd8e
commit
fe1acf984a
1349 files changed
+116159
-67711
No files matched your search
@@ -79,6 +79,11 @@ class _Field extends \IPS\CustomField
|
||||
'module' => 'membersettings',
|
||||
'prefix' => 'profilefields_',
|
||||
);
|
||||
|
||||
/**
|
||||
* @brief [Node] Node Title
|
||||
*/
|
||||
public static $nodeTitle = 'profile_field';
|
||||
|
||||
/**
|
||||
* @brief [CustomField] Editor Options
|
||||
@@ -176,6 +181,7 @@ class _Field extends \IPS\CustomField
|
||||
$values['field_' . $row['pf_id'] ] = NULL;
|
||||
}
|
||||
|
||||
/* @todo Remove reliance on \IPS\Request here and instead pass an \IPS\Member object to the method */
|
||||
static::$editorOptions['autoSaveKey'] = md5( get_called_class() . '-' . $row['pf_id'] ) . ( isset( \IPS\Request::i()->id ) ? '-' . \IPS\Request::i()->id : '' );
|
||||
|
||||
if( $row['pf_type'] == 'Editor' )
|
||||
@@ -243,8 +249,12 @@ class _Field extends \IPS\CustomField
|
||||
if ( $location == static::CONTENT and $row['pf_format'] != '' and isset( $values[ 'field_' . $row['pf_id'] ] ) and $row['pf_type'] != 'Poll' )
|
||||
{
|
||||
$row = static::constructFromData( $row );
|
||||
$value = $row->type == 'Url' ? (string) $values[ 'field_' . $row->id ] : $row->displayValue( $values[ 'field_' . $row->id ] );
|
||||
$return[ $row->group_id ][ $row->id ] = str_replace( array( '{title}', '{content}' ), array( \IPS\Member::loggedIn()->language()->addToStack( static::$langKey . '_' . $row->id ), $value ), $row->format );
|
||||
|
||||
if( $row->displayValue( $values[ 'field_' . $row->id ] ) !== "" )
|
||||
{
|
||||
$value = $row->type == 'Url' ? (string) $values[ 'field_' . $row->id ] : $row->displayValue( $values[ 'field_' . $row->id ] );
|
||||
$return[ $row->group_id ][ $row->id ] = str_replace( array( '{title}', '{content}' ), array( \IPS\Member::loggedIn()->language()->addToStack( static::$langKey . '_' . $row->id ), $value ), $row->format );
|
||||
}
|
||||
}
|
||||
else if ( $location !== static::CONTENT )
|
||||
{
|
||||
@@ -270,7 +280,7 @@ class _Field extends \IPS\CustomField
|
||||
$form->addheader( 'pfield_permissions' );
|
||||
$form->add( new \IPS\Helpers\Form\YesNo( 'pf_admin_only', $this->id ? !$this->admin_only : TRUE, FALSE, array( 'togglesOn' => array( 'pf_show_on_reg', 'pf_member_edit', 'pf_member_hide' ) ) ) );
|
||||
|
||||
if ( \IPS\Settings::i()->quick_register )
|
||||
if ( \IPS\Login::registrationType() != 'full' )
|
||||
{
|
||||
/* Quick register is enabled, so do not allow required to be set */
|
||||
if ( isset( $form->elements['']['pf_not_null'] ) )
|
||||
|
||||
Reference in new issue
Block a user