Implement Web Assets' theme system and selection, and add 'light' theme #118
@ -1,4 +1,20 @@
|
||||
(function() {
|
||||
// Create function agreeWithTerms
|
||||
function agreeWithTerms() {
|
||||
const agreeWithTermsInput = document.querySelector('#id_agreed_with_terms');
|
||||
|
||||
agreeWithTermsInput.addEventListener('change', function(e) {
|
||||
const agreeWithTermsBtnSubmit = document.querySelector('.js-agree-with-terms-btn-submit');
|
||||
|
||||
// Check if checkbox is checked
|
||||
if (e.target.checked == true) {
|
||||
agreeWithTermsBtnSubmit.removeAttribute('disabled');
|
||||
} else {
|
||||
agreeWithTermsBtnSubmit.setAttribute('disabled', true);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
// Create function btnBack
|
||||
function btnBack() {
|
||||
const btnBack = document.querySelectorAll('.js-btn-back');
|
||||
@ -90,6 +106,7 @@
|
||||
}
|
||||
// Create function init
|
||||
function init() {
|
||||
agreeWithTerms();
|
||||
btnBack();
|
||||
commentForm();
|
||||
copyInstallUrl();
|
||||
|
4
common/static/common/styles/_button.sass
Normal file
4
common/static/common/styles/_button.sass
Normal file
@ -0,0 +1,4 @@
|
||||
button,
|
||||
.btn
|
||||
&[type=submit]
|
||||
transition: opacity var(--transition-speed)
|
@ -18,6 +18,7 @@ $container-width: map-get($container-max-widths, 'xl')
|
||||
@import '_alert.sass'
|
||||
@import '_badge.sass'
|
||||
@import '_box.sass'
|
||||
@import '_button.sass'
|
||||
@import '_cards.sass'
|
||||
@import '_code.sass'
|
||||
@import '_comments.sass'
|
||||
|
@ -70,7 +70,7 @@
|
||||
</div>
|
||||
</div>
|
||||
<div class="mt-4">
|
||||
<button type="submit" class="btn btn-block btn-primary px-5 py-2">
|
||||
<button type="submit" class="btn btn-block btn-primary js-agree-with-terms-btn-submit px-5 py-2" disabled>
|
||||
<i class="i-upload"></i>
|
||||
<span>
|
||||
{% if extension %}
|
||||
|
Loading…
Reference in New Issue
Block a user