(self, initial)
Add initial values for content-related fields that are shared across
        all events in the schedule, whether it's a custom schedule or not.
Add initial values for content-related fields that are shared across
        all events in the schedule, whether it's a custom schedule or not.
Add initial values for content - related fields that are shared across all events in the schedule whether it s a custom schedule or not .
def add_initial_for_content(self, initial):
        """
        Add initial values for content-related fields that are shared across
        all events in the schedule, whether it's a custom schedule or not.
        """
        content = self.initial_schedule.memoized_events[0].content

        if isinstance(content, SMSContent):
            initial['content'] = self.CONTENT_SMS
        elif isinstance(content, EmailContent):
            initial['content'] = self.CONTENT_EMAIL
        elif isinstance(content, SMSSurveyContent):
            initial['content'] = self.CONTENT_SMS_SURVEY
            initial['submit_partially_completed_forms'] = content.submit_partially_completed_forms
            initial['include_case_updates_in_partial_submissions'] = \
                content.include_case_updates_in_partial_submissions
        elif isinstance(content, CustomContent):
            initial['content'] = self.CONTENT_CUSTOM_SMS
        elif isinstance(content, IVRSurveyContent):
            initial['content'] = self.CONTENT_IVR_SURVEY
            initial['submit_partially_completed_forms'] = content.submit_partially_completed_forms
            initial['include_case_updates_in_partial_submissions'] = \
                content.include_case_updates_in_partial_submissions
        elif isinstance(content, SMSCallbackContent):
            initial['content'] = self.CONTENT_SMS_CALLBACK
        else:
            raise TypeError("Unexpected content type: %s" % type(content))
def add_initial_for_content ( self , initial ) : content = self . initial_schedule . memoized_events [ 0 ] . content if isinstance ( content , SMSContent ) : initial [ 'content' ] = self . CONTENT_SMS elif isinstance ( content , EmailContent ) : initial [ 'content' ] = self . CONTENT_EMAIL elif isinstance ( content , SMSSurveyContent ) : initial [ 'content' ] = self . CONTENT_SMS_SURVEY initial [ 'submit_partially_completed_forms' ] = content . submit_partially_completed_forms initial [ 'include_case_updates_in_partial_submissions' ] = content . include_case_updates_in_partial_submissions elif isinstance ( content , CustomContent ) : initial [ 'content' ] = self . CONTENT_CUSTOM_SMS elif isinstance ( content , IVRSurveyContent ) : initial [ 'content' ] = self . CONTENT_IVR_SURVEY initial [ 'submit_partially_completed_forms' ] = content . submit_partially_completed_forms initial [ 'include_case_updates_in_partial_submissions' ] = content . include_case_updates_in_partial_submissions elif isinstance ( content , SMSCallbackContent ) : initial [ 'content' ] = self . CONTENT_SMS_CALLBACK else : raise TypeError ( "Unexpected content type: %s" % type ( content ) )