diff --git a/assets/config.json b/assets/config.json index 5c18915..a181d7c 100644 --- a/assets/config.json +++ b/assets/config.json @@ -1,6 +1,7 @@ { "bundles": { "app": "js/app.js", + "fm": "js/fm.js", "layout": "sass/layout.scss", "error": "sass/error.scss", "logo": "img/logo.svg", diff --git a/assets/js/fm.js b/assets/js/fm.js new file mode 100644 index 0000000..65f6307 --- /dev/null +++ b/assets/js/fm.js @@ -0,0 +1,9 @@ +document.addEventListener('DOMContentLoaded', () => { + const neverExpireCheckbox = document.getElementById('field-never_expire'); + const expireAfterDaysField = document.getElementById('field-expire_after_days'); + + neverExpireCheckbox.addEventListener('change', () => { + // noinspection RedundantConditionalExpressionJS + expireAfterDaysField.disabled = neverExpireCheckbox.value ? true : false; + }); +}); \ No newline at end of file diff --git a/views/file-manager.njk b/views/file-manager.njk index df4b371..ab930b0 100644 --- a/views/file-manager.njk +++ b/views/file-manager.njk @@ -2,6 +2,10 @@ {% set title = 'ily.li - File manager' %} +{% block scripts %} + +{% endblock %} + {% block body %}
You're their manager, please be nice with them.
@@ -12,12 +16,27 @@ - -# | +url | +name | +Expires at | +
---|