mirror of https://github.com/go-gitea/gitea.git
Fix the format
Signed-off-by: Alex Lau(AvengerMoJo) <avengermojo@gmail.com>
This commit is contained in:
parent
325842db66
commit
d68a821455
|
@ -1382,12 +1382,12 @@ func registerRoutes(m *web.Route) {
|
||||||
}, ignSignIn, context.RepoAssignment, reqRepoProjectsReader, repo.MustEnableRepoProjects)
|
}, ignSignIn, context.RepoAssignment, reqRepoProjectsReader, repo.MustEnableRepoProjects)
|
||||||
// end "/{username}/{reponame}/projects"
|
// end "/{username}/{reponame}/projects"
|
||||||
|
|
||||||
m.Group("/actions", func() {
|
m.Group("/actions", func() {
|
||||||
m.Get("", actions.List)
|
m.Get("", actions.List)
|
||||||
m.Post("/disable", reqRepoAdmin, actions.DisableWorkflowFile)
|
m.Post("/disable", reqRepoAdmin, actions.DisableWorkflowFile)
|
||||||
m.Post("/enable", reqRepoAdmin, actions.EnableWorkflowFile)
|
m.Post("/enable", reqRepoAdmin, actions.EnableWorkflowFile)
|
||||||
m.Post("/global_disable", reqRepoAdmin, actions.DisableGlobalWorkflowFile)
|
m.Post("/global_disable", reqRepoAdmin, actions.DisableGlobalWorkflowFile)
|
||||||
m.Post("/global_enable", reqRepoAdmin, actions.EnableGlobalWorkflowFile)
|
m.Post("/global_enable", reqRepoAdmin, actions.EnableGlobalWorkflowFile)
|
||||||
|
|
||||||
m.Group("/runs/{run}", func() {
|
m.Group("/runs/{run}", func() {
|
||||||
m.Combo("").
|
m.Combo("").
|
||||||
|
|
|
@ -2,18 +2,18 @@ export function initRequireActionsSelect() {
|
||||||
const raselect = document.getElementById('add-require-actions-modal');
|
const raselect = document.getElementById('add-require-actions-modal');
|
||||||
if (!raselect) return;
|
if (!raselect) return;
|
||||||
const checkboxes = document.querySelectorAll('.ui.radio.checkbox');
|
const checkboxes = document.querySelectorAll('.ui.radio.checkbox');
|
||||||
checkboxes.forEach(function(checkbox) {
|
for (const box of checkboxes) {
|
||||||
checkbox.addEventListener('change', function() {
|
box.addEventListener('change', function() {
|
||||||
var hiddenInput = this.nextElementSibling;
|
const hiddenInput = this.nextElementSibling;
|
||||||
var isChecked = this.querySelector('input[type="radio"]').checked;
|
const isChecked = this.querySelector('input[type="radio"]').checked;
|
||||||
hiddenInput.disabled = !isChecked;
|
hiddenInput.disabled = !isChecked;
|
||||||
// Disable other hidden inputs
|
// Disable other hidden inputs
|
||||||
checkboxes.forEach(function(otherCheckbox) {
|
for (const otherbox of checkboxes) {
|
||||||
var otherHiddenInput = otherCheckbox.nextElementSibling;
|
const otherHiddenInput = otherbox.nextElementSibling;
|
||||||
if (otherCheckbox !== checkbox) {
|
if (otherbox !== box) {
|
||||||
otherHiddenInput.disabled = isChecked;
|
otherHiddenInput.disabled = isChecked;
|
||||||
}
|
}
|
||||||
});
|
}
|
||||||
});
|
});
|
||||||
});
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue