Skip to content

Commit

Permalink
Fixed issue #18593: Float attributes are not supported anymore (#3411)
Browse files Browse the repository at this point in the history
Co-authored-by: lapiudevgit <devgit@lapiu.biz>
  • Loading branch information
gabrieljenik and lapiudevgit committed Sep 7, 2023
1 parent ecef134 commit 1a5abb1
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 0 deletions.
Expand Up @@ -11,6 +11,7 @@ class AdvancedSettingWidget extends CWidget
const SINGLEINPUTTYPE = array(
'columns',
'integer',
'float',
'singleselect',
'text',
'textarea'
Expand Down
22 changes: 22 additions & 0 deletions application/extensions/AdvancedSettingWidget/views/float.php
@@ -0,0 +1,22 @@
<div class="input-group col-12">
<?php if (isset($this->setting['aFormElementOptions']['inputGroup']['prefix'])) : ?>
<div class="input-group-addon">
<?= $this->setting['aFormElementOptions']['inputGroup']['prefix']; ?>
</div>
<?php endif; ?>
<input
type="number"
class="form-control"
name="<?= $inputBaseName ?>"
id="<?= CHtml::getIdByName($inputBaseName); ?>"
<?= ($this->setting['help']) ? 'aria-describedby="help-' . CHtml::getIdByName($inputBaseName) . '"' : "" ?>
value="<?= CHtml::encode($this->setting['value']); ?>"
<?= isset($this->setting['min']) ? 'min="' . $this->setting['min'] . '"' : '' ?>
<?= isset($this->setting['max']) ? 'max="' . $this->setting['max'] . '"' : '' ?>
/>
<?php if (isset($this->setting['aFormElementOptions']['inputGroup']['suffix'])) : ?>
<div class="input-group-addon">
<?= $this->setting['aFormElementOptions']['inputGroup']['suffix']; ?>
</div>
<?php endif; ?>
</div>

0 comments on commit 1a5abb1

Please sign in to comment.