Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
52 changes: 44 additions & 8 deletions css/styles.css
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,9 @@ textarea {
margin-top: 20px;
margin-bottom: 20px;
background: lightgray;
width: 100%;
max-width: 800px;
box-sizing: border-box;
width: 100%;
max-width: 800px;
box-sizing: border-box;
}

#github-url-form {
Expand All @@ -24,9 +24,9 @@ textarea {
}

#repo-url {
width: 100%;
max-width: 750px;
box-sizing: border-box;
width: 100%;
max-width: 750px;
box-sizing: border-box;
}

#repo-url-button {
Expand All @@ -51,12 +51,48 @@ textarea {
}

@keyframes slideDown {
from {
from {
opacity: 0;
transform: translateY(-10px);
}
to {

to {
opacity: 1;
transform: translateY(0);
}
}

.actions {
display: flex;
flex-direction: column;
}

.local-actions,
.submission-actions {
display: flex;
flex-direction: row;
justify-content: center;

}

.action {
margin-top: 10px;
width: 100%
}

.copy,
.download,
.formio-button-add-row {
display: block;
width: 100%;
}

.issue,
.email {
display: block;
width: 100%;
}

#copy {
margin-right: 10px;
}
40 changes: 31 additions & 9 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -62,18 +62,40 @@
<div id="formio"></div>

<div id="output">
<label for="json-result">Your Form Data </label>
<label for="json-result">Submit your response below </label>
<textarea class="form-control" rows="10" id="json-result" readonly></textarea>
<button type="button" class="btn btn-outline" href="#" onclick="copyToClipboard(event)">Copy</button>
<button type="button" class="btn btn-outline" href="#" onclick="downloadFile(event)">Download</button>
<div class="actions">
<div class="local-actions">
<div class="action" id="copy">
<p>Copy your results</p>
<button type="button" class="btn btn-primary copy" href="#"
onclick="copyToClipboard(event)">Copy</button>
</div>
<div class="action" id="download">
<p>Download results to a json file</p>
<button type="button" class="btn btn-primary download" href="#"
onclick="downloadFile(event)">Download</button>
</div>
</div>
<!-- <div class="submission-actions"> -->
<div class="action">
<p>Use for public and non-sensitive resources (must be logged in to GitHub):</p>
<button type="button" class="btn btn-primary issue" href="#"
onclick="createGitHubIssueForm(event)">Create
GitHub
Issue</button>
</div>
<div class="action">
<p>Use for private and sensitive resources:</p>
<button type="button" class="btn btn-success email" href="#" onclick="emailFile(event)">Email</button>
</div>
<!-- </div> -->
</div>
<!-- <button type="button" class="btn btn-outline" href="#" onclick="createAutoGitHubIssue(event)">Auto-Create Issue
(API Key Required)</button> -->
<!-- <button type="button" class="btn btn-outline" href="#" onclick="createProjectPR(event)">Create Pull Request</button> -->
<button type="button" class="btn btn-outline" href="#" onclick="createGitHubIssueForm(event)">Create GitHub
Issue (Must be logged in to GitHub)</button>
<button type="button" class="btn btn-outline" href="#" onclick="createAutoGitHubIssue(event)">Auto-Create Issue
(API Key Required)</button>
<button type="button" class="btn btn-outline" href="#" onclick="emailFile(event)">Email</button>
</div>

</body>

</html>
</html>
24 changes: 12 additions & 12 deletions js/generateFormComponents.js
Original file line number Diff line number Diff line change
Expand Up @@ -306,18 +306,18 @@ async function createFormComponents() {
components = createAllComponents(jsonData);

//Form text box to input GitHub API Key
components.push({
"label": "GitHub API Key (optional)",
"disableSortingAndFiltering": false,
"tableView": true,
"key": "gh_api_key",
"type": "password",
"input": true,
"description": "Generate a Github API Key from here: https://github.com/settings/tokens/new .\n\
The token should have these permissions: \n\
- Contents: read & write \n- Workflows: read & write\
- Pull requests: read & write"
});
// components.push({
// "label": "GitHub API Key (optional)",
// "disableSortingAndFiltering": false,
// "tableView": true,
// "key": "gh_api_key",
// "type": "password",
// "input": true,
// "description": "Generate a Github API Key from here: https://github.com/settings/tokens/new .\n\
// The token should have these permissions: \n\
// - Contents: read & write \n- Workflows: read & write\
// - Pull requests: read & write"
// });

// Add submit button to form
components.push({
Expand Down
Loading