Commit 5e9f6844 by David Adams Committed by Jason Bau

Made changes to professional designation drop down.

parent 72704551
...@@ -23,12 +23,16 @@ class CmeUserProfile(UserProfile): ...@@ -23,12 +23,16 @@ class CmeUserProfile(UserProfile):
middle_initial = models.CharField(max_length=1, blank=True, null=True) middle_initial = models.CharField(max_length=1, blank=True, null=True)
birth_date = models.CharField(max_length=5, blank=True, null=True) birth_date = models.CharField(max_length=5, blank=True, null=True)
PROFESSIONAL_DESIGNATION_CHOICES = (('DO', 'DO'), PROFESSIONAL_DESIGNATION_CHOICES = (('AuD', 'AuD'),
('DDS', 'DDS'),
('DO', 'DO'),
('MD', 'MD'), ('MD', 'MD'),
('MD, PhD', 'MD, PhD'), ('MD,PhD', 'MD,PhD'),
('MBBS', 'MBBS'), ('MBBS', 'MBBS'),
('NP', 'NP'), ('NP', 'NP'),
('PA', 'PA'), ('PA', 'PA'),
('PharmD', 'PharmD'),
('PhD', 'PhD'),
('RN', 'RN'), ('RN', 'RN'),
('Other', 'Other'), ('Other', 'Other'),
('None', 'None')) ('None', 'None'))
......
...@@ -354,7 +354,7 @@ def validate_professional_fields(post_vars): ...@@ -354,7 +354,7 @@ def validate_professional_fields(post_vars):
] ]
error = {} error = {}
if post_vars.get('professional_designation') in ['DO', 'MD', 'MD, PhD', 'MBBS']: if post_vars.get('professional_designation') in ['DO', 'MD', 'MD,PhD', 'MBBS']:
for required_field in required_fields_list: for required_field in required_fields_list:
for key, val in required_field.iteritems(): for key, val in required_field.iteritems():
if len(post_vars.get(key)) < 2: if len(post_vars.get(key)) < 2:
......
...@@ -83,7 +83,7 @@ ...@@ -83,7 +83,7 @@
$('select#professional_designation').change(function() { $('select#professional_designation').change(function() {
var dependentRequiredFields = 'li#license-number_container, li#license-country_container, li#physician_status_container, li#patient_population_container, li#specialty-container'; var dependentRequiredFields = 'li#license-number_container, li#license-country_container, li#physician_status_container, li#patient_population_container, li#specialty-container';
if ($(this).children("option:selected").val() === 'MD' || $(this).children("option:selected").val() === 'MD, PhD' || $(this).children("option:selected").val() === 'DO' || $(this).children("option:selected").val() === 'MBBS') { if ($(this).children("option:selected").val() === 'MD' || $(this).children("option:selected").val() === 'MD,PhD' || $(this).children("option:selected").val() === 'DO' || $(this).children("option:selected").val() === 'MBBS') {
$(this).parent().siblings(dependentRequiredFields).addClass('required'); $(this).parent().siblings(dependentRequiredFields).addClass('required');
} else { } else {
$(this).parent().siblings(dependentRequiredFields).removeClass('required'); $(this).parent().siblings(dependentRequiredFields).removeClass('required');
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment