aboutsummaryrefslogtreecommitdiffstats
path: root/accounts/templates
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--accounts/templates/accounts/index.html21
1 files changed, 18 insertions, 3 deletions
diff --git a/accounts/templates/accounts/index.html b/accounts/templates/accounts/index.html
index 9a8a79c..69d0717 100644
--- a/accounts/templates/accounts/index.html
+++ b/accounts/templates/accounts/index.html
@@ -75,7 +75,7 @@
<label for="birth_date">Data di nascita</label>
</div>
<div class="input-field col l4 s12">
- <select name="branca">
+ <select name="branca" disabled>
<option value="" disabled {{branca_default}}>Scegli</option>
<option value="colonia" {{branca_castorini}}>Castorini</option>
<option value="muta" {{branca_lupetti}}>Lupetti</option>
@@ -278,7 +278,7 @@
<div class="file-field input-field">
<div class="btn teal">
<span><i class="material-icons left">file_upload</i>File</span>
- <input type="file" name="vac_certificate">
+ <input type="file" name="vac_certificate" id="vac_certificate">
</div>
<div class="file-path-wrapper">
<input id="vac_file" value="{{vac_certificate}}" class="file-path" type="text" placeholder="Certificato di vacinazione">
@@ -298,7 +298,7 @@
<div class="file-field input-field">
<div class="btn teal">
<span><i class="material-icons left">file_upload</i>File</span>
- <input type="file" name="health_care_certificate">
+ <input type="file" name="health_care_certificate" id="health_care_certificate">
</div>
<div class="file-path-wrapper">
<input id="health_care_file" value="{{health_care_certificate}}" class="file-path" type="text" placeholder="Tessera cassa malati">
@@ -377,6 +377,21 @@ $(document).ready(function() {
{% if error %}
M.toast({html: '{{ error_text}}', classes: 'orange'})
{% endif %}
+
+ document.getElementById("vac_certificate").onchange = function() {
+ if(this.files[0].size > 1048576*10){
+ M.toast({html: 'Il file è troppo grande. Grandezza massima 10MB', classes: 'orange'});
+ this.value = "";
+ }
+ };
+
+ document.getElementById("health_care_certificate").onchange = function() {
+ if(this.files[0].size > 1048576*10){
+ M.toast({html: 'Il file è troppo grande. Grandezza massima 10MB', classes: 'orange'});
+ this.value = "";
+ }
+ };
+
});
/*!