ADD fields, field manipulators

This commit is contained in:
2023-10-14 21:15:09 +02:00
parent 436734cd4c
commit d122312ddd
8 changed files with 387 additions and 23 deletions

View File

@ -8,6 +8,7 @@
* @since 0.0.3
*/
use Joomla\CMS\HTML\HTMLHelper;
use Joomla\CMS\Language\Text;
use Joomla\CMS\Router\Route;
/** @var Joomla\CMS\WebAsset\WebAssetManager $wa */
@ -19,9 +20,35 @@ $wa->useScript('form.validate')
<form action="<?= Route::_('index.php?option=com_depot&view=part&layout=edit&id=' . (int) $this->item->id); ?>"
method="post" name="adminForm" id="item-form" class="form-validate">
<?= $this->form->renderField('component_name'); ?>
<?= $this->form->renderField('id'); ?>
<div class="form-horizontal">
<?= HtmlHelper::_(
'bootstrap.startTabSet',
'myTab',
['active' => 'details']
); ?>
<?= HTMLHelper::_(
'bootstrap.addTab',
'myTab',
'details',
empty($this->item->id) ? Text::_('COM_DEPOT_TAB_NEW_PART') :
Text::_('COM_DEPOT_TAB_EDIT_PART')
); ?>
<fieldset class="adminform">
<legend>
<?= Text::_('COM_DEPOT_LEGEND_DETAILS') ?>
</legend>
<div class="row">
<div class="col-12 col-lg-3">
<?= $this->form->renderFieldset('details'); ?>
</div>
<div class="col-12 col-lg-9">
<?= $this->form->getInput('description'); ?>
</div>
</div>
</fieldset>
<?= HtmlHelper::_('bootstrap.endTab'); ?>
<?= HtmlHelper::_('bootstrap.endTabSet'); ?>
</div>
<input type="hidden" name="task" value="part.edit" />
<?= HTMLHelper::_('form.token'); ?>
</form>