-
-
Notifications
You must be signed in to change notification settings - Fork 197
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[qa] Switched to prettier for CSS/JS formatting
- Loading branch information
1 parent
02c05dd
commit 918faa1
Showing
13 changed files
with
194 additions
and
253 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,6 @@ | ||
table, th, td{ | ||
table, | ||
th, | ||
td { | ||
text-align: center; | ||
padding: 10px; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
.field-csvfile label, | ||
.field-prefix label, | ||
.field-number_of_users label{ | ||
.field-number_of_users label { | ||
font-weight: bold; | ||
color: #000; | ||
} |
60 changes: 31 additions & 29 deletions
60
openwisp_radius/static/openwisp-radius/js/mode-switcher.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,31 +1,33 @@ | ||
(function ($) { | ||
'use strict'; | ||
$(document).ready(function () { | ||
var mode = $('#id_mode'), | ||
allExceptMode = $('.form-row:not(.field-mode)'), | ||
neutral = $('.form-row:not(.field-group, .field-groupname, ' + | ||
'.field-user, .field-username)'), | ||
guided = $('.field-group, .field-user'), | ||
custom = $('.field-groupname, .field-username'); | ||
mode.change(function () { | ||
allExceptMode.hide(); | ||
if (mode.val() === 'guided') { | ||
guided.show(); | ||
neutral.show(); | ||
$('#id_groupname').val(''); | ||
$('#id_username').val(''); | ||
} else if (mode.val() === 'custom') { | ||
custom.show(); | ||
neutral.show(); | ||
$('#id_group').val(null).change(); | ||
$('#id_user').val(null).change(); | ||
} | ||
}); | ||
if ($('#id_group').val() || $('#id_user').val()) { | ||
mode.val('guided'); | ||
} else if ($('#id_groupname').val() || $('#id_username').val()) { | ||
mode.val('custom'); | ||
} | ||
mode.trigger('change'); | ||
"use strict"; | ||
$(document).ready(function () { | ||
var mode = $("#id_mode"), | ||
allExceptMode = $(".form-row:not(.field-mode)"), | ||
neutral = $( | ||
".form-row:not(.field-group, .field-groupname, " + | ||
".field-user, .field-username)", | ||
), | ||
guided = $(".field-group, .field-user"), | ||
custom = $(".field-groupname, .field-username"); | ||
mode.change(function () { | ||
allExceptMode.hide(); | ||
if (mode.val() === "guided") { | ||
guided.show(); | ||
neutral.show(); | ||
$("#id_groupname").val(""); | ||
$("#id_username").val(""); | ||
} else if (mode.val() === "custom") { | ||
custom.show(); | ||
neutral.show(); | ||
$("#id_group").val(null).change(); | ||
$("#id_user").val(null).change(); | ||
} | ||
}); | ||
}(django.jQuery)); | ||
if ($("#id_group").val() || $("#id_user").val()) { | ||
mode.val("guided"); | ||
} else if ($("#id_groupname").val() || $("#id_username").val()) { | ||
mode.val("custom"); | ||
} | ||
mode.trigger("change"); | ||
}); | ||
})(django.jQuery); |
Oops, something went wrong.