<?php
namespace App\Form;
use App\Entity\FilmProjectProgressReport;
use App\Entity\User;
use App\Utility\DropdownValues;
use App\String\Constant;
use Symfony\Component\Form\AbstractType;
use Symfony\Component\Form\Extension\Core\Type\CheckboxType;
use Symfony\Component\Form\Extension\Core\Type\ChoiceType;
use Symfony\Component\Form\Extension\Core\Type\CountryType;
use Symfony\Component\Form\Extension\Core\Type\EmailType;
use Symfony\Component\Form\Extension\Core\Type\FileType;
use Symfony\Component\Form\Extension\Core\Type\HiddenType;
use Symfony\Component\Form\Extension\Core\Type\PasswordType;
use Symfony\Component\Form\Extension\Core\Type\RepeatedType;
use Symfony\Component\Form\Extension\Core\Type\TelType;
use Symfony\Component\Form\Extension\Core\Type\TextType;
use Symfony\Component\Form\Extension\Core\Type\UrlType;
use Symfony\Component\Form\Extension\Core\Type\TextareaType;
use Symfony\Component\Form\FormBuilderInterface;
use Symfony\Component\OptionsResolver\OptionsResolver;
class ProgressReportFormType extends AbstractType
{
private const EXTENT_DROPDOWN_VALUES = [
'Not at all' => 'Not at all',
'To some extent' => 'To some extent',
'To a great extent' => 'To a great extent',
'N/A - not a goal' => 'N/A - not a goal',
];
private const AGREE_DROPDOWN_VALUES = [
'Strongly disagree' => 'Strongly disagree',
'Disagree' => 'Disagree',
'Neutral' => 'Neutral',
'Agree' => 'Agree',
'Strongly agree' => 'Strongly agree',
];
private const DEFAULT_YESNO_VALUES = [
'Yes' => true,
'No' => false,
];
public function buildForm(FormBuilderInterface $builder, array $options)
{
$currentYear = (int)date('Y'); // Get the current year
$startYear = $currentYear - 15;
$years = range($startYear, $currentYear);
// Use array_combine to make the year the key and the value
$yearsArray = array_combine($years, $years);
$builder
->add('isUptodate', ChoiceType::class, [
'required' => false,
'empty_data' => '',
'label' => 'Please check your current project details are correct, and update if not.',
'choices' => [
'My project information is up-to-date' => true,
],
'expanded' => true,
'placeholder' => false,
])
->add('projectUpdate', TextareaType::class, [
'required' => false,
'label' => 'Please provide an update on your project, including any progress and achievements in that last year. <span class="text-danger">*</span>',
'attr' => [
'rows' => '4'
],
])
// ->add('isStillFundraising', ChoiceType::class, [
// 'required' => false,
// 'label' => 'Are you still fundraising for your film or impact campaign?',
// 'choices' => self::DEFAULT_YESNO_VALUES,
// 'expanded' => true,
// 'placeholder' => false,
// ])
->add('fundraisingStatus', ChoiceType::class, [
'required' => false,
'label' => 'Are you still fundraising for your film or impact campaign?',
'choices' => [
'Yes' => 'Yes',
'No' => 'No',
],
'expanded' => true,
'placeholder' => false,
])
->add('currentStage', ChoiceType::class, [
'required' => false,
'label' => 'What is the current stage of your project <span class="text-danger">*</span>',
'label_html' => true,
'choices' => [
'Development' => 'Development',
'Production' => 'Production',
'Post-Production' => 'Post-Production',
'Film complete' => 'Film Complete',
'Outreach / Impact' => 'Outreach',
],
'expanded' => true,
'placeholder' => false,
])
->add('projectActiveStatus', ChoiceType::class, [
'required' => false,
'label' => 'Would you like your project to: <span class="text-danger">*</span>',
'label_html' => true,
'choices' => [
'Remain ACTIVE on our website' => 'active',
'Become INACTIVE on the website but remain VISIBLE (e.g. freeze your fundraising but still be seen and able to provide updates)' => 'inactive',
'Have the project ARCHIVED so it is no longer visible on the website.' => 'archived',
],
'expanded' => true,
'placeholder' => false,
])
->add('filmWebsiteUrl', HiddenType::class, [
'required' => false,
'label' => 'Film Website URL',
])
->add('completeFilmYear', ChoiceType::class, [
'required' => false,
'label' => 'What year was your film completed?',
'choices' => $yearsArray,
'placeholder' => 'Please select a year',
])
->add('isCompleteFilmRelease', ChoiceType::class, [
'required' => false,
'label' => 'Has your film been released? <span class="text-danger">*</span>',
'label_html' => true,
'choices' => [
'Yes' => true,
'No, not yet' => false,
],
'expanded' => true,
'placeholder' => false,
])
->add('isDocument', ChoiceType::class, [
'required' => false,
'label' => 'Do you have any new reports or assets you would like to share? Including impact reports, digital assets, EPK or other updates?<br><p>Note please only share documents you are happy to be made public</p>',
'label_html' => true,
'choices' => [
'Yes' => true,
'No' => false,
],
'expanded' => true,
'placeholder' => false,
])
->add('screenerLink', UrlType::class, [
'required' => false,
'label' => 'If your film has been completed, please provide a screener link for your film',
'label_html' => true,
'attr' => ['maxlength' => 255],
])
->add('screenPassword', TextType::class, [
'required' => false,
'label' => 'Screener password (if applicable)',
'attr' => ['maxlength' => 30],
// 'attr' => [
// 'type' => 'password'
// ],
])
// ->add('trailerLink', UrlType::class, [
// 'required' => false,
// 'label' => 'If your film has a trailer link, please provide it here',
// ])
// ->add('trailerPassword', PasswordType::class, [
// 'required' => false,
// 'label' => 'Trailer password (if applicable)',
// ])
->add('completeFilmWhereAvailable', TextareaType::class, [
'required' => false,
'label' => 'Where is your film available to watch?',
'attr' => [
'rows' => '4',
'maxlength' => 100,
],
])
->add('completeFilmType', ChoiceType::class, [
'required' => false,
'label' => 'Select all that apply for your project',
'choices' => [
'FESTIVAL acceptance' => 'FESTIVAL acceptance',
'Confirmed CINEMA release' => 'Confirmed CINEMA release',
'Confirmed BROADCASTER' => 'Confirmed BROADCASTER',
'Confirmed STREAMER' => 'Confirmed STREAMER',
'Confirmed for CINEMA ON DEMAND (e.g. via Fanforce)' => 'Confirmed for CINEMA ON DEMAND',
'Confirmed educational partner (e.g. ATOM, Cool Australia)' => 'Confirmed educational partner',
'Nominated for won AWARDS' => 'Nominated for won AWARDS',
'MEDIA coverage' => 'MEDIA coverage',
'Other' => 'Other',
],
'expanded' => true,
'multiple' => true,
])
->add('digitalAssetsLink', UrlType::class, [
'required' => false,
'label' => 'If you would like to share a library of digital assets (or an EPK) for the purpose of featuring the project in marketing etc, please provide a link here',
])
->add('completeFilmProgressDetails', TextareaType::class, [
'required' => false,
'label' => 'Please provide details on anything that is in progress but not yet confirmed here.',
'attr' => [
'rows' => '4'
],
])
->add('reachResponseDetails', TextareaType::class, [
'required' => false,
'label' => 'Share any details you have on the reach and release of your film here (estimated audiences, who you have reached, where and how, audience feedback, partner feedback, critic reviews, media etc)',
'attr' => [
'rows' => '4'
],
])
->add('reachResponseUse', ChoiceType::class, [
'required' => false,
'label' => 'Will your film be used for any of the following? (Select all that apply)',
'choices' => [
'Fundraisers' => 'Fundraisers',
'Education & training' => 'Education & training',
'Organisational uses' => 'Organisational uses',
'Advocacy and information campaigns' => 'Advocacy and information campaigns',
'Community events' => 'Community events',
'Council / Festivals' => 'Council / Festivals',
'Political campaign' => 'Political campaign',
'Other (please specify)' => 'Other',
],
'expanded' => true,
'multiple' => true,
])
->add('outcomeChange', TextareaType::class, [
'required' => false,
'label' => 'What is the most significant change that has occurred as a result of your project so far? ',
'attr' => [
'rows' => '4'
],
])
->add('isOutcomeMeasuredImpact', ChoiceType::class, [
'required' => false,
'label' => 'Have you been measuring and evaluating the impact of your film during release and outreach?',
'choices' => [
'No' => false,
'Yes - please specify' => true,
],
'expanded' => true,
'placeholder' => false,
])
->add('outcomeMeasuredImpactDetails', TextareaType::class, [
'required' => false,
'label' => 'Please specify',
'attr' => [
'rows' => '4'
],
])
->add('outcomeAwarenessExtent', ChoiceType::class, [
'required' => false,
'label' => 'Improved awareness, understanding or attitudes',
'choices' => self::EXTENT_DROPDOWN_VALUES,
'expanded' => true,
'placeholder' => false,
])
->add('outcomeVisibilityExtent', ChoiceType::class, [
'required' => false,
'label' => 'Increased visibility of diverse voices and experiences',
'choices' => self::EXTENT_DROPDOWN_VALUES,
'expanded' => true,
'placeholder' => false,
])
->add('outcomeConnectionExtent', ChoiceType::class, [
'required' => false,
'label' => 'Improved connection and engagement around a social issue',
'choices' => self::EXTENT_DROPDOWN_VALUES,
'expanded' => true,
'placeholder' => false,
])
->add('outcomeActionExtent', ChoiceType::class, [
'required' => false,
'label' => 'Increased action on a social issue (e.g. discuss, donate, advocate, volunteer)',
'choices' => self::EXTENT_DROPDOWN_VALUES,
'expanded' => true,
'placeholder' => false,
])
->add('outcomeOrganisationExtent', ChoiceType::class, [
'required' => false,
'label' => 'Organisational outcomes (e.g. improved initiatives or profile, more resources)',
'choices' => self::EXTENT_DROPDOWN_VALUES,
'expanded' => true,
'placeholder' => false,
])
->add('outcomeCommunityExtent', ChoiceType::class, [
'required' => false,
'label' => 'Community outcomes (e.g. increased connection, educational outcomes, new initiatives, research)',
'choices' => self::EXTENT_DROPDOWN_VALUES,
'expanded' => true,
'placeholder' => false,
])
->add('outcomeSystemExtent', ChoiceType::class, [
'required' => false,
'label' => 'Systems change (e.g. increased public pressure, policy/ legislative influence)',
'choices' => self::EXTENT_DROPDOWN_VALUES,
'expanded' => true,
'placeholder' => false,
])
->add('outcomeAdditionalInformation', TextareaType::class, [
'required' => false,
'label' => 'Share any additional information about your film and impact campaign outcomes here',
'attr' => [
'rows' => '4'
],
])
->add('feedbackEngagement', ChoiceType::class, [
'required' => false,
'label' => 'Have you engaged with DA in any of the following ways? (select all that apply) ',
'choices' => [
'DA resources and information on our website' => 'DA resources and information on our website',
'DA programs or Fellowships' => 'DA programs or Fellowships',
'DA workshops or webinars' => 'DA workshops or webinars',
'DA screening or pitch events' => 'DA screening or pitch events',
'Fundraising or grants' => 'Fundraising or grants',
'General support from DA staff' => 'General support from DA staff',
'Other (Please specify) ' => 'Other',
],
'expanded' => true,
'multiple' => true,
])
->add('feedbackEngagementDetails', TextareaType::class, [
'required' => false,
'label' => 'Please specify',
'attr' => [
'rows' => '4'
],
])
->add('generalSupportArea', ChoiceType::class, [
'required' => false,
'label' => 'If you have received general support from DA, please specify the relevent area(s):',
'choices' => [
'Communications' => 'Communications',
'Event showcase' => 'Event showcase',
'Evaluation' => 'Evaluation',
'Fundraising' => 'Fundraising',
'Grants' => 'Grants',
'Finance' => 'Finance',
'Partnerships' => 'Partnerships',
'Impact campaign' => 'Impact campaign',
'Other (Please specify)' => 'Other',
],
'expanded' => true,
'multiple' => true,
])
->add('generalSupportAreaDetails', TextareaType::class, [
'required' => false,
'label' => 'Please specify',
'attr' => [
'rows' => '4'
],
])
->add('feedbackExperienceAgreement', ChoiceType::class, [
'required' => false,
'label' => 'Please rate your level of agreement or disagreement:',
'choices' => self::AGREE_DROPDOWN_VALUES,
'expanded' => true,
'placeholder' => false,
])
->add('feedbackBenefitAgreement', ChoiceType::class, [
'required' => false,
'label' => 'Please rate your level of agreement or disagreement:',
'choices' => self::AGREE_DROPDOWN_VALUES,
'expanded' => true,
'placeholder' => false,
])
->add('feedbackRecommendAgreement', ChoiceType::class, [
'required' => false,
'label' => 'Please rate your level of agreement or disagreement:',
'choices' => self::AGREE_DROPDOWN_VALUES,
'expanded' => true,
'placeholder' => false,
])
->add('feedbackCriticalRoleAgreement', ChoiceType::class, [
'required' => false,
'label' => 'Please rate your level of agreement or disagreement:',
'choices' => self::AGREE_DROPDOWN_VALUES,
'expanded' => true,
'placeholder' => false,
])
->add('feedbackDoingWell', TextareaType::class, [
'required' => false,
'label' => 'What do you think Documentary Australia is doing well?',
'attr' => [
'rows' => '4'
],
])
->add('feedbackImprovement', TextareaType::class, [
'required' => false,
'label' => 'What could Documentary Australia improve?',
'attr' => [
'rows' => '4'
],
])
->add('feedbackInvolvement', ChoiceType::class, [
'required' => false,
'label' => 'Please select whether your involvement with Documentary Australia has: (select all that apply)',
'choices' => [
'Enabled you to access funds you wouldn’t have otherwise' => 'Enabled film team to access funds they wouldn’t have otherwise',
'Contributed to the progression of your project' => 'Contributed to the progression of project',
'Built your skills and capacity' => 'Built film team skills and capacity',
'Contributed to the quality of your film' => 'Contributed to the quality of film',
'Maximised the impact of your film' => 'Maximised the impact of film',
'Increased the visibility of your film' => 'Increased the visibility of film',
'Played a role in securing partnerships for your film' => 'Played a role in securing partnerships for film',
'Other (please specify)' => 'Other',
],
'expanded' => true,
'multiple' => true,
])
->add('feedbackComment', TextareaType::class, [
'required' => false,
'label' => 'Any other comments or feedback?',
'attr' => [
'rows' => '4'
],
])
->add('files', FileType::class, [
'required' => false,
'multiple' => true,
'attr' => [
'multiple' => 'multiple',
'accept' => 'image/*,application/pdf',
]
])
->add('onlineDocumentLink', UrlType::class, [
'required' => false,
'label' => 'Share a link to online documents here:',
])
->add('reachResponseUseDetails', TextareaType::class, [
'required' => false,
'label' => 'Please specify',
'attr' => [
'rows' => '4'
],
])
->add('completeFilmTypeDetails', TextareaType::class, [
'required' => false,
'label' => 'Please specify',
'attr' => [
'rows' => '4'
],
])
->add('feedbackImprovementDetails', TextareaType::class, [
'required' => false,
'label' => 'Please specify',
'attr' => [
'rows' => '4'
],
])
->add('projectUpdateTags', ChoiceType::class, [
'label_html' => true,
'choices' => [
Constant::PROJECT_UPDATE_TYPE_MILESTONES => Constant::PROJECT_UPDATE_TYPE_MILESTONES,
Constant::PROJECT_UPDATE_TYPE_FUNDRAISING => Constant::PROJECT_UPDATE_TYPE_FUNDRAISING,
Constant::PROJECT_UPDATE_TYPE_PARTNERSHIPS => Constant::PROJECT_UPDATE_TYPE_PARTNERSHIPS,
Constant::PROJECT_UPDATE_TYPE_NOMINATION => Constant::PROJECT_UPDATE_TYPE_NOMINATION,
Constant::PROJECT_UPDATE_TYPE_UPDATES => Constant::PROJECT_UPDATE_TYPE_UPDATES,
Constant::PROJECT_UPDATE_TYPE_EVENTS => Constant::PROJECT_UPDATE_TYPE_EVENTS,
Constant::PROJECT_UPDATE_TYPE_EDUCATION => Constant::PROJECT_UPDATE_TYPE_EDUCATION,
Constant::PROJECT_UPDATE_TYPE_RESPONSE => Constant::PROJECT_UPDATE_TYPE_RESPONSE,
Constant::PROJECT_UPDATE_TYPE_IMPACTS => Constant::PROJECT_UPDATE_TYPE_IMPACTS,
Constant::PROJECT_UPDATE_TYPE_INVOLVED => Constant::PROJECT_UPDATE_TYPE_INVOLVED,
Constant::PROJECT_UPDATE_TYPE_OTHER => Constant::PROJECT_UPDATE_TYPE_OTHER,
],
'expanded' => false,
'multiple' => true,
])
->add('isDraft', HiddenType::class)
;
}
public function configureOptions(OptionsResolver $resolver)
{
$resolver->setDefaults([
'data_class' => FilmProjectProgressReport::class,
]);
}
}