aboutsummaryrefslogtreecommitdiffstats
path: root/python
diff options
context:
space:
mode:
Diffstat (limited to 'python')
-rw-r--r--python/Dawn/static/dawn.js12
-rw-r--r--python/Dawn/views.py4
2 files changed, 14 insertions, 2 deletions
diff --git a/python/Dawn/static/dawn.js b/python/Dawn/static/dawn.js
index 6f500031..57788ce1 100644
--- a/python/Dawn/static/dawn.js
+++ b/python/Dawn/static/dawn.js
@@ -55,6 +55,18 @@ $(function() {
$('#clearing_facility').parent().parent().css('display', 'none');
$('#clearing_facility').val('');
break;
+ case 'SWAPTION':
+ $('#fixed_rate').parent().parent().css('display', 'none');
+ $('#index_ref').parent().parent().css('display', 'none');
+ $('#security_desc').parent().parent().css('display', 'none');
+ $('#portfolio').val('IR');
+ break;
+ case 'CD_INDEX_OPTION':
+ $('#fixed_rate').parent().parent().css('display', 'block');
+ $('#index_ref').parent().parent().css('display', 'block');
+ $('#security_desc').parent().parent().css('display', 'block');
+ $('#portfolio').val('OPTIONS');
+ break;
}
});
$('#swap_type').change();
diff --git a/python/Dawn/views.py b/python/Dawn/views.py
index fc76fe4f..8ec84899 100644
--- a/python/Dawn/views.py
+++ b/python/Dawn/views.py
@@ -97,7 +97,7 @@ class CDSForm(ModelForm):
model = CDSDeal
include_foreign_keys = True
exclude = ['dealid', 'lastupdate', 'termination_amount',
- 'termination_cp']
+ 'termination_cp', 'termination_date']
class SwaptionForm(ModelForm):
upload_globeop = BooleanField(label="Upload to globeop?")
@@ -106,7 +106,7 @@ class SwaptionForm(ModelForm):
model = SwaptionDeal
include_foreign_keys = True
exclude = ['dealid', 'lastupdate', 'termination_amount',
- 'termination_cp']
+ 'termination_cp', 'termination_date']
class FutureForm(ModelForm):