Compare commits
3 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
9aa8378599 | ||
|
|
f0c28a4961 | ||
|
|
a46223e5ac |
38
.github/ISSUE_TEMPLATE/bug_report.md
vendored
Normal file
38
.github/ISSUE_TEMPLATE/bug_report.md
vendored
Normal file
@@ -0,0 +1,38 @@
|
||||
---
|
||||
name: Bug report
|
||||
about: Create a report to help us improve
|
||||
title: ''
|
||||
labels: ''
|
||||
assignees: ''
|
||||
|
||||
---
|
||||
|
||||
**Describe the bug**
|
||||
A clear and concise description of what the bug is.
|
||||
|
||||
**To Reproduce**
|
||||
Steps to reproduce the behavior:
|
||||
1. Go to '...'
|
||||
2. Click on '....'
|
||||
3. Scroll down to '....'
|
||||
4. See error
|
||||
|
||||
**Expected behavior**
|
||||
A clear and concise description of what you expected to happen.
|
||||
|
||||
**Screenshots**
|
||||
If applicable, add screenshots to help explain your problem.
|
||||
|
||||
**Desktop (please complete the following information):**
|
||||
- OS: [e.g. iOS]
|
||||
- Browser [e.g. chrome, safari]
|
||||
- Version [e.g. 22]
|
||||
|
||||
**Smartphone (please complete the following information):**
|
||||
- Device: [e.g. iPhone6]
|
||||
- OS: [e.g. iOS8.1]
|
||||
- Browser [e.g. stock browser, safari]
|
||||
- Version [e.g. 22]
|
||||
|
||||
**Additional context**
|
||||
Add any other context about the problem here.
|
||||
20
.github/ISSUE_TEMPLATE/feature_request.md
vendored
Normal file
20
.github/ISSUE_TEMPLATE/feature_request.md
vendored
Normal file
@@ -0,0 +1,20 @@
|
||||
---
|
||||
name: Feature request
|
||||
about: Suggest an idea for this project
|
||||
title: ''
|
||||
labels: ''
|
||||
assignees: ''
|
||||
|
||||
---
|
||||
|
||||
**Is your feature request related to a problem? Please describe.**
|
||||
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
|
||||
|
||||
**Describe the solution you'd like**
|
||||
A clear and concise description of what you want to happen.
|
||||
|
||||
**Describe alternatives you've considered**
|
||||
A clear and concise description of any alternative solutions or features you've considered.
|
||||
|
||||
**Additional context**
|
||||
Add any other context or screenshots about the feature request here.
|
||||
@@ -27,7 +27,7 @@ add_hook('ClientAreaFooterOutput', 1, function ($vars) {
|
||||
foreach ($templates_data['data'] as $osCategory) {
|
||||
foreach ($osCategory['templates'] as $template) {
|
||||
$optionValue = $template['id'];
|
||||
$optionLabel = $template['name'] . " " . $template['version'] . " " . $template['variant'];
|
||||
$optionLabel = $template['name']." ".$template['version']." ".$template['variant'];
|
||||
$dropdownOptions[] = ['id' => $optionValue, 'name' => $optionLabel];
|
||||
}
|
||||
}
|
||||
@@ -65,18 +65,20 @@ add_hook('ClientAreaFooterOutput', 1, function ($vars) {
|
||||
return "
|
||||
<script>
|
||||
document.addEventListener('DOMContentLoaded', function() {
|
||||
var osTemplates = " . json_encode($dropdownOptions) . ";
|
||||
var sshKeys = " . json_encode($sshKeysOptions) . ";
|
||||
let osTemplates = ".json_encode($dropdownOptions, JSON_THROW_ON_ERROR).";
|
||||
let sshKeys = ".json_encode($sshKeysOptions, JSON_THROW_ON_ERROR).";
|
||||
|
||||
var osInputField = document.querySelector('[name=\"customfield[" . ($osID[0] ?? null) . "]\"]');
|
||||
var sshInputField = document.querySelector('[name=\"customfield[" . ($sshID[0] ?? null) . "]\"]');
|
||||
const osInputField = document.querySelector('[name=\"customfield[".($osID[0] ?? null)."]\"]');
|
||||
const osInputLabel = document.querySelector('[for=\"customfield".($osID[0] ?? null)."\"]');
|
||||
const sshInputField = document.querySelector('[name=\"customfield[".($sshID[0] ?? null)."]\"]');
|
||||
const sshInputLabel = document.querySelector('[for=\"customfield".($sshID[0] ?? null)."\"]');
|
||||
|
||||
// Create dropdown options menu, then add it to the DOM then on change, update the regular input.
|
||||
var osSelect = document.createElement('select');
|
||||
let osSelect = document.createElement('select');
|
||||
osSelect.className = 'form-control';
|
||||
|
||||
osTemplates.forEach(function(template) {
|
||||
var option = document.createElement('option');
|
||||
let option = document.createElement('option');
|
||||
option.value = template.id;
|
||||
option.text = template.name;
|
||||
osSelect.appendChild(option);
|
||||
@@ -95,11 +97,11 @@ add_hook('ClientAreaFooterOutput', 1, function ($vars) {
|
||||
|
||||
if (sshKeys.length > 0) {
|
||||
// Create dropdown options menu, then add it to the DOM then on change, update the regular input.
|
||||
var sshSelect = document.createElement('select');
|
||||
let sshSelect = document.createElement('select');
|
||||
sshSelect.className = 'form-control';
|
||||
|
||||
sshKeys.forEach(function(sshkey) {
|
||||
var option = document.createElement('option');
|
||||
let option = document.createElement('option');
|
||||
option.value = sshkey.id;
|
||||
option.text = sshkey.name;
|
||||
sshSelect.appendChild(option);
|
||||
@@ -116,8 +118,9 @@ add_hook('ClientAreaFooterOutput', 1, function ($vars) {
|
||||
sshInputField.style.display = 'none';
|
||||
} else {
|
||||
sshInputField.style.display = 'none';
|
||||
sshInputLabel.style.display = 'none';
|
||||
}
|
||||
});
|
||||
</script>
|
||||
";
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user