Render values in editor

This commit is contained in:
Dennis Eichhorn 2019-02-16 19:39:43 +01:00
parent 265a4a0d5c
commit ecfde64c07
3 changed files with 24 additions and 6 deletions

View File

@ -12,8 +12,8 @@
*/
/**
* @var \phpOMS\Views\View $this
* @var \Mouldes\Organization\Models $department;
*/
$department = $this->getData('department');
echo $this->getData('nav')->render(); ?>
@ -37,7 +37,13 @@ echo $this->getData('nav')->render(); ?>
<option><?= $this->getHtml('Inactive') ?>
</select>
<tr><td><?= $this->getData('editor')->render('department-editor'); ?>
<tr><td><?= $this->getData('editor')->getData('text')->render('department-editor', 'description', 'iDepartment'); ?>
<tr><td><?= $this->getData('editor')->getData('text')->render(
'department-editor',
'description',
'iDepartment',
$department->getDescriptionRaw(),
$department->getDescription()
); ?>
<tr><td><input id="iSubmit" name="submit" type="submit" value="<?= $this->getHtml('Save', 0); ?>">
</table>
</form>

View File

@ -12,8 +12,8 @@
*/
/**
* @var \phpOMS\Views\View $this
* @var \Modules\Organization\Models\Position;
*/
$position = $this->getData('position');
echo $this->getData('nav')->render(); ?>
@ -37,7 +37,13 @@ echo $this->getData('nav')->render(); ?>
<option><?= $this->getHtml('Inactive') ?>
</select>
<tr><td><?= $this->getData('editor')->render('position-editor'); ?>
<tr><td><?= $this->getData('editor')->getData('text')->render('position-editor', 'description', 'iPosition'); ?>
<tr><td><?= $this->getData('editor')->getData('text')->render(
'position-editor',
'description',
'iPosition',
$position->getDescriptionRaw(),
$position->getDescription()
); ?>
<tr><td><input id="iSubmit" name="submit" type="submit" value="<?= $this->getHtml('Save', 0); ?>">
</table>
</form>

View File

@ -12,8 +12,8 @@
*/
/**
* @var \phpOMS\Views\View $this
* @var \Modules\Organization\Models\Unit $unit;
*/
$unit = $this->getData('unit');
echo $this->getData('nav')->render(); ?>
@ -35,7 +35,13 @@ echo $this->getData('nav')->render(); ?>
<option value="<?= $this->printHtml(\Modules\Organization\Models\Status::INACTIVE); ?>"<?= \Modules\Organization\Models\Status::INACTIVE === $unit->getStatus() ? ' selected' : ''; ?>><?= $this->getHtml('Inactive') ?>
</select>
<tr><td><?= $this->getData('editor')->render('unit-editor'); ?>
<tr><td><?= $this->getData('editor')->getData('text')->render('unit-editor', 'description', 'iUnit'); ?>
<tr><td><?= $this->getData('editor')->getData('text')->render(
'unit-editor',
'description',
'iUnit',
$unit->getDescriptionRaw(),
$unit->getDescription()
); ?>
<tr><td><input id="iSubmit" name="submit" type="submit" value="<?= $this->getHtml('Save', 0); ?>">
</table>
</form>