mirror of
https://github.com/Karaka-Management/oms-Editor.git
synced 2026-01-24 23:38:41 +00:00
Fix #115
This commit is contained in:
parent
589396c77c
commit
37b66cc3f2
|
|
@ -21,7 +21,9 @@ use phpOMS\Message\ResponseAbstract;
|
|||
|
||||
class TextView extends View
|
||||
{
|
||||
private $id = '';
|
||||
private $id = '';
|
||||
private $name = '';
|
||||
private $form = '';
|
||||
|
||||
public function __construct(ApplicationAbstract $app, RequestAbstract $request, ResponseAbstract $response)
|
||||
{
|
||||
|
|
@ -34,9 +36,22 @@ class TextView extends View
|
|||
return $this->id;
|
||||
}
|
||||
|
||||
public function getName() : string
|
||||
{
|
||||
return $this->name;
|
||||
}
|
||||
|
||||
public function getForm() : string
|
||||
{
|
||||
return $this->form;
|
||||
}
|
||||
|
||||
public function render(...$data) : string
|
||||
{
|
||||
$this->id = $data[0];
|
||||
$this->id = $data[0] ?? '';
|
||||
$this->name = $data[1] ?? '';
|
||||
$this->form = $data[2] ?? '';
|
||||
|
||||
return parent::render();
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,15 +1,15 @@
|
|||
<div class="tabular">
|
||||
<ul class="tab-links">
|
||||
<li><label for="c-tab-1"><?= $this->getHtml('Text', 'Editor'); ?></label>
|
||||
<li><label for="c-tab-2"><?= $this->getHtml('Preview', 'Editor'); ?></label>
|
||||
<li><label for="<?= $this->printHtml($this->getId()); ?>-c-tab-1"><?= $this->getHtml('Text', 'Editor'); ?></label>
|
||||
<li><label for="<?= $this->printHtml($this->getId()); ?>-c-tab-2"><?= $this->getHtml('Preview', 'Editor'); ?></label>
|
||||
</ul>
|
||||
<div class="tab-content">
|
||||
<input type="radio" id="c-tab-1" name="tabular-1" checked>
|
||||
<input type="radio" id="<?= $this->printHtml($this->getId()); ?>-c-tab-1" name="tabular-1" checked>
|
||||
|
||||
<div class="tab">
|
||||
<textarea style="height: 300px" placeholder="" name="plain" form="docForm"><?= $this->printHtml(isset($doc) ? $doc->getPlain() : ''); ?></textarea><input type="hidden" id="iParsed" name="parsed">
|
||||
<textarea style="height: 300px" placeholder="" name="<?= $this->printHtml($this->getName()); ?>" form="<?= $this->printHtml($this->getForm()); ?>"><?= $this->printHtml(isset($doc) ? $doc->getPlain() : ''); ?></textarea><input type="hidden" id="<?= $this->printHtml($this->getId()); ?>-parsed">
|
||||
</div>
|
||||
<input type="radio" id="c-tab-2" name="tabular-1">
|
||||
<input type="radio" id="<?= $this->printHtml($this->getId()); ?>-c-tab-2" name="tabular-1">
|
||||
|
||||
<div class="tab">
|
||||
<?= $this->printHtml(isset($doc) ? $doc->getContent() : ''); ?>
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user