mirror of
https://github.com/Karaka-Management/oms-Tag.git
synced 2026-01-11 15:48:42 +00:00
fix tag selector
This commit is contained in:
parent
e6410cdeeb
commit
3022ca1f3e
|
|
@ -46,6 +46,14 @@ class BaseView extends View
|
|||
*/
|
||||
private bool $isRequired = false;
|
||||
|
||||
/**
|
||||
* Dom form
|
||||
*
|
||||
* @var string
|
||||
* @since 1.0.0
|
||||
*/
|
||||
private string $form = '';
|
||||
|
||||
/**
|
||||
* Dom name
|
||||
*
|
||||
|
|
@ -87,6 +95,18 @@ class BaseView extends View
|
|||
return $this->name;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get form
|
||||
*
|
||||
* @return string
|
||||
*
|
||||
* @since 1.0.0
|
||||
*/
|
||||
public function getForm() : string
|
||||
{
|
||||
return $this->form;
|
||||
}
|
||||
|
||||
/**
|
||||
* Is required?
|
||||
*
|
||||
|
|
@ -106,7 +126,8 @@ class BaseView extends View
|
|||
{
|
||||
$this->id = $data[0];
|
||||
$this->name = $data[1];
|
||||
$this->isRequired = $data[2] ?? false;
|
||||
$this->form = $data[2];
|
||||
$this->isRequired = $data[3] ?? false;
|
||||
return parent::render();
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -38,9 +38,9 @@
|
|||
</div>
|
||||
<div class="ipt-second"><button><?= $this->getHtml('Select', '0', '0'); ?></button></div>
|
||||
</div>
|
||||
<div class="box" id="<?= $this->printHtml($this->getId()); ?>-tags" data-limit="0" data-active="true">
|
||||
<div class="box" data-form="<?= $this->printHtml($this->getForm()); ?>" id="<?= $this->printHtml($this->getId()); ?>-tags" data-limit="0" data-active="true">
|
||||
<template id="<?= $this->printHtml($this->getId()); ?>-tagTemplate">
|
||||
<span class="tag red" data-tpl-value="/id" data-value="" data-uuid="" data-name="<?= $this->printHtml($this->getName()); ?>" style="background: {/color};">
|
||||
<span class="tag" data-tpl-value="/id" data-value="" data-uuid="" data-name="<?= $this->printHtml($this->getName()); ?>" style="background: {/color};">
|
||||
<i class="fa fa-times"></i>
|
||||
<span data-tpl-text="/id" data-name="id" data-tpl-value="/id" data-value=""></span>
|
||||
<span data-tpl-text="/title" data-tpl-value="/title" data-value=""></span>
|
||||
|
|
|
|||
|
|
@ -28,7 +28,7 @@ echo $this->getData('nav')->render(); ?>
|
|||
<tr><td><label for="iTitle"><?= $this->getHtml('Title') ?></label>
|
||||
<tr><td><input type="text" name="title" id="iTitle" placeholder=" oms" required>
|
||||
<tr><td><label for="iColor"><?= $this->getHtml('Color') ?></label>
|
||||
<tr><td><input type="text" name="color" id="iColor" placeholder="#ff0000ff" required>
|
||||
<tr><td><input type="color" name="color" id="iColor"required>
|
||||
</table>
|
||||
</div>
|
||||
<div class="portlet-foot">
|
||||
|
|
|
|||
|
|
@ -30,7 +30,7 @@ echo $this->getData('nav')->render(); ?>
|
|||
<tr><td><label for="iTitle"><?= $this->getHtml('Title') ?></label>
|
||||
<tr><td><input type="text" name="title" id="iTitle" placeholder=" oms" value="<?= $this->printHtml($tag->getTitle()); ?>" required>
|
||||
<tr><td><label for="iColor"><?= $this->getHtml('Color') ?></label>
|
||||
<tr><td><input type="text" name="color" id="iColor" placeholder="#ff0000ff" value="<?= $this->printHtml($tag->getColor()); ?>" required>
|
||||
<tr><td><input type="color" name="color" id="iColor" value="<?= $this->printHtml(\substr($tag->getColor(), 0, 7)); ?>" required>
|
||||
</table>
|
||||
</div>
|
||||
<div class="portlet-foot">
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user