bug fixes
Some checks failed
Image optimization / general_image_workflow (push) Has been cancelled
CI / general_module_workflow_php (push) Has been cancelled
CI / general_module_workflow_js (push) Has been cancelled

This commit is contained in:
Dennis Eichhorn 2024-10-11 19:17:40 +00:00
parent 632ce70d1c
commit 034182734b
2 changed files with 12 additions and 2 deletions

View File

@ -54,6 +54,10 @@ class BaseView extends View
*/
public string $name = '';
public string $apiUri = '';
public string $ref = '';
/**
* Media files
*
@ -81,6 +85,8 @@ class BaseView extends View
$this->name = $data[1] ?? 'UNDEFINED';
$this->virtualPath = $data[2] ?? $this->virtualPath;
$this->files = $data[3] ?? $this->files;
$this->apiUri = $data[4] ?? '';
$this->ref = $data[5] ?? '';
return parent::render();
}

View File

@ -19,7 +19,7 @@ use phpOMS\Uri\UriFactory;
<div class="col-xs-12 col-md-6">
<section class="portlet">
<div class="portlet-head"><?= $this->getHtml('Upload', 'Media', 'Backend'); ?></div>
<form id="<?= $this->form; ?>-upload">
<form id="<?= $this->form; ?>-upload" action="<?= UriFactory::build($this->apiUri); ?>" method="put">
<div class="portlet-body">
<div class="form-group">
<label for="mediaInput"><?= $this->getHtml('Media', 'Media', 'Backend'); ?></label>
@ -48,7 +48,7 @@ use phpOMS\Uri\UriFactory;
</div>
</div>
</div>
<div class="ipt-second"><button><?= $this->getHtml('Select', 'Media', 'Backend'); ?></button></div>
<!--<div class="ipt-second"><button><?= $this->getHtml('Select', 'Media', 'Backend'); ?></button></div>-->
</div>
</div>
@ -56,10 +56,14 @@ use phpOMS\Uri\UriFactory;
<label for="iUpload"><?= $this->getHtml('Upload', 'Media', 'Backend'); ?></label>
<div class="wf-100">
<input type="hidden" name="virtualPath" form="<?= $this->form; ?>" value="<?= $this->virtualPath; ?>">
<input type="hidden" name="ref" form="<?= $this->form; ?>" value="<?= $this->ref; ?>">
<input type="file" id="iUpload" name="upload" form="<?= $this->form; ?>" multiple>
</div>
</div>
</div>
<div class="portlet-foot">
<input id="iSubmit" name="submit" type="submit" value="<?= $this->getHtml('Create', '0', '0'); ?>">
</div>
</form>
</section>