Version 4.1.19

This commit is contained in:
Neo committed 2025-12-19 05:38:56 -08:00
1 parent 28bd025b35
commit 2bd5025018
2674 files changed
+233518 -77766

No files matched your search

+24 -14
View File
@@ -2,9 +2,9 @@
/**
* @brief Abstract Class for input types for Form Builder
* @author <a href='http://www.invisionpower.com'>Invision Power Services, Inc.</a>
* @copyright (c) 2001 - SVN_YYYY Invision Power Services, Inc.
* @copyright (c) 2001 - 2016 Invision Power Services, Inc.
* @license http://www.invisionpower.com/legal/standards/
* @package IPS Social Suite
* @package IPS Community Suite
* @since 18 Feb 2013
* @version SVN_VERSION_NUMBER
*/
@@ -33,6 +33,11 @@ abstract class _FormAbstract
*/
public $label = NULL;
/**
* @brief Description
*/
public $description = NULL;
/**
* @brief Default Value
*/
@@ -163,6 +168,7 @@ abstract class _FormAbstract
}
catch ( \LogicException $e )
{
$this->valueSet = TRUE;
$this->error = $e->getMessage();
}
}
@@ -255,10 +261,18 @@ abstract class _FormAbstract
$label = \IPS\Member::loggedIn()->language()->addToStack( $label );
}
}
$desc = $this->name . '_desc';
$template = \IPS\Theme::i()->getTemplate( 'forms', 'core', 'global' )->rowDesc( $label, $this->html(), $this->appearRequired, $this->error, $this->prefix, $this->suffix, $this->htmlId ?: ( $form ? "{$form->id}_{$this->name}" : NULL ), $this, $form );
$desc = \IPS\Member::loggedIn()->language()->addToStack( $desc, FALSE, array( 'returnBlank' => TRUE, 'htmlsprintf' => (string) $template, 'flipsprintf' => true ) );
$html = $this->html();
if ( $this->description )
{
$desc = $this->description;
}
else
{
$desc = $this->name . '_desc';
$desc = \IPS\Member::loggedIn()->language()->addToStack( $desc, FALSE, array( 'returnBlank' => TRUE, 'returnInto' => \IPS\Theme::i()->getTemplate( 'forms', 'core', 'global' )->rowDesc( $label, $html, $this->appearRequired, $this->error, $this->prefix, $this->suffix, $this->htmlId ?: ( $form ? "{$form->id}_{$this->name}" : NULL ), $this, $form ) ) );
}
if ( $this->warningBox )
{
@@ -267,15 +281,11 @@ abstract class _FormAbstract
else
{
$warning = $this->name . '_warning';
$template = \IPS\Theme::i()->getTemplate( 'forms', 'core', 'global' )->rowWarning( $label, $this->html(), $this->appearRequired, $this->error, $this->prefix, $this->suffix, $this->htmlId ?: ( $form ? "{$form->id}_{$this->name}" : NULL ), $this, $form );
$warning = \IPS\Member::loggedIn()->language()->addToStack( $warning, FALSE, array( 'returnBlank' => TRUE, 'htmlsprintf' => (string) $template, 'flipsprintf' => true ) );
$warning = \IPS\Member::loggedIn()->language()->addToStack( $warning, FALSE, array( 'returnBlank' => TRUE, 'returnInto' => \IPS\Theme::i()->getTemplate( 'forms', 'core', 'global' )->rowWarning( $label, $html, $this->appearRequired, $this->error, $this->prefix, $this->suffix, $this->htmlId ?: ( $form ? "{$form->id}_{$this->name}" : NULL ), $this, $form ) ) );
}
/* Some form helpers might want to allow nested and outer suffixes */
$html = $this->html();
if( array_key_exists( 'endSuffix', $this->options ) and ! empty( $this->options['endSuffix'] ) )
{
if( array_key_exists( 'endSuffix', $this->options ) )
{
$this->suffix = $this->options['endSuffix'];
}
@@ -347,7 +357,7 @@ abstract class _FormAbstract
{
if ( !static::utf8mb4Check( $this->value ) )
{
throw new \DomainException( 'form_multibyte_unicode' );
throw new \DomainException( \IPS\Member::loggedIn()->isAdmin() ? 'form_multibyte_unicode_admin' : 'form_multibyte_unicode' );
}
}