Changeset 6321
- Timestamp:
- Oct 1, 2008, 2:02:15 PM (16 years ago)
- Location:
- trunk/exodus
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/exodus/models.py
r6320 r6321 78 78 class Interface(models.Model): 79 79 node = models.ForeignKey(Node) 80 type = models.CharField(max_length=10, choices=INTERFACE_TYPE_CHOICES )81 iface = models.CharField(max_length=10, verbose_name="interface" )80 type = models.CharField(max_length=10, choices=INTERFACE_TYPE_CHOICES, default=1) 81 iface = models.CharField(max_length=10, verbose_name="interface", default='eth0') 82 82 ip = models.IPAddressField(unique=True) 83 83 netmask = models.IntegerField(default=30) -
trunk/exodus/templates/addnic.html
r6287 r6321 10 10 </form> 11 11 12 <script type="text/javascript"> 13 window.onload = function() 14 { 15 document.getElementById('id_polar').disabled = 'true'; 16 document.getElementById('id_antenna').disabled = 'true'; 17 document.getElementById('id_type').onchange = function() 18 { 19 var newValue = document.getElementById('id_type').value; 20 document.getElementById('id_iface').value = newValue; 21 if (newValue == 'eth') { 22 newValue = 'true'; 23 } else { 24 newValue = ''; 25 } 26 document.getElementById('id_polar').disabled = newValue; 27 document.getElementById('id_antenna').disabled = newValue; 28 } 29 } 30 </script> 31 32 12 33 {% endblock %}
Note:
See TracChangeset
for help on using the changeset viewer.