mirror of
https://github.com/Karaka-Management/oms-Tag.git
synced 2026-01-11 15:48:42 +00:00
fix color change bug
This commit is contained in:
parent
cbe3d16e4c
commit
1548e762ab
|
|
@ -98,7 +98,7 @@ final class ApiController extends Controller
|
|||
/** @var Tag $tag */
|
||||
$tag = TagMapper::get((int) $request->getData('id'));
|
||||
$tag->setTitle((string) ($request->getData('title') ?? $tag->getTitle()));
|
||||
$tag->setColor($request->getData('color') ?? $tag->getColor());
|
||||
$tag->setColor(\str_pad($request->getData('color') ?? $tag->getColor(), 9, 'ff', \STR_PAD_RIGHT));
|
||||
|
||||
return $tag;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -15,6 +15,7 @@ declare(strict_types=1);
|
|||
use phpOMS\Localization\ISO639Enum;
|
||||
use phpOMS\Uri\UriFactory;
|
||||
|
||||
/** @var \Modules\Tag\Models\Tag */
|
||||
$tag = $this->getData('tag');
|
||||
$l11n = $this->getData('l11n') ?? [];
|
||||
|
||||
|
|
@ -23,7 +24,7 @@ echo $this->getData('nav')->render(); ?>
|
|||
<div class="row">
|
||||
<div class="col-xs-12 col-md-6">
|
||||
<div class="portlet">
|
||||
<form id="fUnitCreate" method="put" action="<?= UriFactory::build('{/api}tag'); ?>">
|
||||
<form id="fTagUpdate" method="post" action="<?= UriFactory::build('{/api}tag'); ?>">
|
||||
<div class="portlet-head"><?= $this->getHtml('Tag'); ?></div>
|
||||
<div class="portlet-body">
|
||||
<table class="layout wf-100" style="table-layout: fixed">
|
||||
|
|
@ -34,6 +35,7 @@ echo $this->getData('nav')->render(); ?>
|
|||
</table>
|
||||
</div>
|
||||
<div class="portlet-foot">
|
||||
<input type="hidden" name="id" value="<?= $tag->getId(); ?>">
|
||||
<input id="iSubmit" name="submit" type="submit" value="<?= $this->getHtml('Save', '0', '0'); ?>">
|
||||
</div>
|
||||
</form>
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user