diff --git a/assets/management/commands/generateSampleAssetsData.py b/assets/management/commands/generateSampleAssetsData.py index a4e0dcdb..3ed45eed 100644 --- a/assets/management/commands/generateSampleAssetsData.py +++ b/assets/management/commands/generateSampleAssetsData.py @@ -29,8 +29,8 @@ class Command(BaseCommand): def create_profile(self): name = "Fred Johnson" models.Profile.objects.create(username=name.replace(" ", ""), first_name=name.split(" ")[0], last_name=name.split(" ")[-1], - email=name.replace(" ", "") + "@example.com", - initials="".join([j[0].upper() for j in name.split()])) + email=name.replace(" ", "") + "@example.com", + initials="".join([j[0].upper() for j in name.split()])) def create_categories(self): categories = ['Case', 'Video', 'General', 'Sound', 'Lighting', 'Rigging'] diff --git a/assets/models.py b/assets/models.py index c7376a4f..bda0a30f 100644 --- a/assets/models.py +++ b/assets/models.py @@ -104,7 +104,7 @@ class Asset(models.Model, RevisionMixin): length = models.DecimalField(decimal_places=1, max_digits=10, blank=True, null=True, help_text='m') csa = models.DecimalField(decimal_places=2, max_digits=10, - blank=True, null=True, help_text='mm^2') + blank=True, null=True, help_text='mm²') circuits = models.IntegerField(blank=True, null=True) cores = models.IntegerField(blank=True, null=True) diff --git a/assets/templates/asset_audit.html b/assets/templates/asset_audit.html index f918ae84..e31ce451 100644 --- a/assets/templates/asset_audit.html +++ b/assets/templates/asset_audit.html @@ -14,6 +14,9 @@ function setLength(length) { $('#id_length').val(length); } + function setCSA(CSA) { + $('#id_csa').val(CSA); + } function checkIfCableHidden() { if (document.getElementById("id_is_cable").checked) { document.getElementById("cable-table").hidden = false; @@ -106,19 +109,23 @@