fix: features & quality batch (#95, #103, #104, #107)
Universal: PR Check / Branch Policy (pull_request) Successful in 2s
Universal: PR Check / Validate PR (pull_request) Failing after 7s
RC Revert / Rename rc/ back to dev/ (pull_request) Has been skipped
Branch Cleanup / Delete merged branch (pull_request) Failing after 2s
Universal: PR Check / Secret Scan (pull_request) Successful in 16s
Generic: Project CI / Lint & Validate (pull_request) Successful in 48s
Joomla: Metadata Validation / Validate Joomla Metadata (pull_request) Failing after 52s
Universal: Pre-Release / Build Pre-Release (${{ inputs.stability || github.ref_name }}) (push) Failing after 5s
Generic: Project CI / Tests (pull_request) Has been cancelled
Universal: PR Check / Build RC Package (pull_request) Has been cancelled
Universal: PR Check / Report Issues (pull_request) Has been cancelled
Universal: PR Check / Branch Policy (pull_request) Successful in 2s
Universal: PR Check / Validate PR (pull_request) Failing after 7s
RC Revert / Rename rc/ back to dev/ (pull_request) Has been skipped
Branch Cleanup / Delete merged branch (pull_request) Failing after 2s
Universal: PR Check / Secret Scan (pull_request) Successful in 16s
Generic: Project CI / Lint & Validate (pull_request) Successful in 48s
Joomla: Metadata Validation / Validate Joomla Metadata (pull_request) Failing after 52s
Universal: Pre-Release / Build Pre-Release (${{ inputs.stability || github.ref_name }}) (push) Failing after 5s
Generic: Project CI / Tests (pull_request) Has been cancelled
Universal: PR Check / Build RC Package (pull_request) Has been cancelled
Universal: PR Check / Report Issues (pull_request) Has been cancelled
#95 — ACL + Options: - Add access.xml (core actions + mokoog.batch / mokoog.import custom actions) - Add config.xml (Permissions tab + note pointing settings to the system plugin) - Declare both in the manifest; Batch/ImportExport controllers now check the custom actions with a fallback to the prior core checks (no lockout) #103 — CSV import is now reachable: - Add an Import toolbar button that toggles a multipart file-upload form (jform[csv_file]) posting to importexport.import with a CSRF token #104 — Dead code + disk leak: - Delete unused ImageGenerator class and JsonLdBuilder::buildOrganization() - Add ImageHelper::pruneOldFiles() (deletes generated images older than 30d) and call it on content save so the generated-image cache is bounded #107 — Packaging: - Declare language/en-US in the component manifest (was never installed) - Remove undeclared empty stub dirs src/Field, src/Service
This commit is contained in:
@@ -173,6 +173,23 @@ $token = Session::getFormToken();
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- CSV Import -->
|
||||
<div id="mokoog-import-panel" style="display:none;" class="card mt-3">
|
||||
<div class="card-body">
|
||||
<h4><?php echo Text::_('COM_MOKOOG_TOOLBAR_IMPORT'); ?></h4>
|
||||
<form action="<?php echo Route::_('index.php?option=com_mokoog&task=importexport.import'); ?>" method="post" enctype="multipart/form-data" class="mt-2">
|
||||
<div class="mb-2">
|
||||
<input type="file" name="jform[csv_file]" accept=".csv" class="form-control" required>
|
||||
</div>
|
||||
<button type="submit" class="btn btn-primary">
|
||||
<span class="icon-upload" aria-hidden="true"></span>
|
||||
<?php echo Text::_('COM_MOKOOG_TOOLBAR_IMPORT'); ?>
|
||||
</button>
|
||||
<?php echo HTMLHelper::_('form.token'); ?>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<script>
|
||||
document.addEventListener('DOMContentLoaded', function() {
|
||||
// Intercept the batch.generate toolbar button
|
||||
@@ -182,6 +199,13 @@ document.addEventListener('DOMContentLoaded', function() {
|
||||
mokoogBatchGenerate();
|
||||
return;
|
||||
}
|
||||
if (task === 'mokoog.showimport') {
|
||||
var ip = document.getElementById('mokoog-import-panel');
|
||||
if (ip) {
|
||||
ip.style.display = (ip.style.display === 'none' ? 'block' : 'none');
|
||||
}
|
||||
return;
|
||||
}
|
||||
if (origSubmitbutton) {
|
||||
origSubmitbutton(task);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user