aboutsummaryrefslogtreecommitdiff
path: root/scripts/src/account-edit.js
diff options
context:
space:
mode:
authorluxagraf <sng@luxagraf.net>2019-01-13 11:42:01 -0600
committerluxagraf <sng@luxagraf.net>2019-01-13 11:42:01 -0600
commit5b9343d77d8321e44d1ffc60769c651771dc38dd (patch)
tree8bbce1b415fbf2fd4c4ee1a7913ca41d362216ec /scripts/src/account-edit.js
parent261f9df4911f861a71e11eb3f0bfbe1a5a5d12b9 (diff)
Refactored Javascript, started on forums
Diffstat (limited to 'scripts/src/account-edit.js')
-rw-r--r--scripts/src/account-edit.js8
1 files changed, 7 insertions, 1 deletions
diff --git a/scripts/src/account-edit.js b/scripts/src/account-edit.js
index c9d3e9a..b592666 100644
--- a/scripts/src/account-edit.js
+++ b/scripts/src/account-edit.js
@@ -1 +1,7 @@
-getElementById('FileField').value = getElementById('file-upload-wrapper').value;
+if (typeof(document.getElementById('id_photo')) != 'undefined' && document.getElementById('id_photo') != null) {
+ var input = document.getElementById('id_photo');
+ input.fname = document.getElementById('filename');
+ input.addEventListener('change', function(e){
+ e.target.fname.innerHTML = e.target.value.split("\\")[2];
+ });
+}