mirror of
https://github.com/Karaka-Management/oms-Attribute.git
synced 2026-02-16 09:28:41 +00:00
fix templates
This commit is contained in:
parent
99b28178c5
commit
64aa72888b
|
|
@ -36,10 +36,10 @@ class AttributeValueView extends View
|
||||||
/**
|
/**
|
||||||
* Attributes
|
* Attributes
|
||||||
*
|
*
|
||||||
* @var \Modules\Attribute\Models\AttributeType
|
* @var null|\Modules\Attribute\Models\AttributeType
|
||||||
* @since 1.0.0
|
* @since 1.0.0
|
||||||
*/
|
*/
|
||||||
public AttributeType $type;
|
public ?AttributeType $type = null;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Attributes
|
* Attributes
|
||||||
|
|
|
||||||
|
|
@ -38,19 +38,21 @@ echo $this->data['nav']->render(); ?>
|
||||||
|
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label for="iValue"><?= $this->getHtml('Value', 'Attribute', 'Backend'); ?></label>
|
<label for="iValue"><?= $this->getHtml('Value', 'Attribute', 'Backend'); ?></label>
|
||||||
<?php if ($this->type->datatype === AttributeValueType::_INT || $this->type->datatype === AttributeValueType::_FLOAT_INT) : ?>
|
<?php if ($this->type?->datatype === AttributeValueType::_INT || $this->type?->datatype === AttributeValueType::_FLOAT_INT) : ?>
|
||||||
<input id="iValue" type="number" name="value" value="<?= $this->attribute->valueInt; ?>">
|
<input id="iValue" type="number" name="value" value="<?= $this->attribute->valueInt; ?>">
|
||||||
<?php elseif ($this->type->datatype === AttributeValueType::_FLOAT) : ?>
|
<?php elseif ($this->type?->datatype === AttributeValueType::_FLOAT) : ?>
|
||||||
<input id="iValue" type="number" name="value" step="any" value="<?= $this->attribute->valueDec; ?>">
|
<input id="iValue" type="number" name="value" step="any" value="<?= $this->attribute->valueDec; ?>">
|
||||||
<?php elseif ($this->type->datatype === AttributeValueType::_STRING) : ?>
|
<?php elseif ($this->type?->datatype === AttributeValueType::_STRING) : ?>
|
||||||
<input id="iValue" type="text" name="value" value="<?= $this->printHtml($this->attribute->valueStr); ?>">
|
<input id="iValue" type="text" name="value" value="<?= $this->printHtml($this->attribute->valueStr); ?>">
|
||||||
<?php elseif ($this->type->datatype === AttributeValueType::_DATETIME) : ?>
|
<?php elseif ($this->type?->datatype === AttributeValueType::_DATETIME) : ?>
|
||||||
<input id="iValue" type="text" name="value" value="<?= $this->attribute->valueDat->format('Y-m-d\TH:i'); ?>">
|
<input id="iValue" type="text" name="value" value="<?= $this->attribute->valueDat->format('Y-m-d\TH:i'); ?>">
|
||||||
<?php elseif ($this->type->datatype === AttributeValueType::_BOOL) : ?>
|
<?php elseif ($this->type?->datatype === AttributeValueType::_BOOL) : ?>
|
||||||
<label class="checkbox" for="iValue">
|
<label class="checkbox" for="iValue">
|
||||||
<input type="checkbox" id="iValue" name="value" value="1"<?= $this->attribute->valueInt > 0 ? ' checked' : ''; ?>>
|
<input type="checkbox" id="iValue" name="value" value="1"<?= $this->attribute->valueInt > 0 ? ' checked' : ''; ?>>
|
||||||
<span class="checkmark"></span>
|
<span class="checkmark"></span>
|
||||||
</label>
|
</label>
|
||||||
|
<?php else : ?>
|
||||||
|
<input id="iValue" type="text" name="value" value="<?= $this->printHtml($this->attribute->getValue()); ?>">
|
||||||
<?php endif; ?>
|
<?php endif; ?>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user