@extends('layouts.master') @section('page_title', $campaign->campaign ? $campaign->name : "New ".\App\Models\Campaign::$campaign_type_map[$type]." Campaign") @section('content')
@if (sizeof(session()->getOldInput()) > 0) {{ $campaign->init_with_old_request(session()->getOldInput()) }} @endif {{ Form::page_header(($campaign->campaign ? $campaign->name : "New ".\App\Models\Campaign::$campaign_type_map[$type]." Campaign"), $type == \App\Models\Campaign::CAMPAIGN_TYPE_BUILD ? "build_campaign" : "convo_engage") }} @if($campaign->campaign) {{ Form::open(['url' => action('CampaignController@post_edit_campaign', compact('business', 'campaign', 'type')),'autocomplete' => 'off','files' => true]) }} @else {{ Form::open(['url' => action('CampaignController@post_create_campaign', compact('business', 'type')),'autocomplete' => 'off','files' => true]) }} @endif
@include('shared._message_all')
{{ Form::label_title("Campaign Details") }}
{{ Form::row_label_inline('Status', \App\Models\Campaign::$status_map[$campaign->campaign ? $campaign->status : \App\Models\Campaign::STATUS_PLANNING], 'label-grey bt-label-small', 4, 7, \App\Helpers\FormComponentHelper::SIZE_MEDIUM) }} {{ Form::row_label_inline('Created By', $auth_user->full_name, 'label-grey bt-label-small', 4, 7, \App\Helpers\FormComponentHelper::SIZE_MEDIUM) }} {{ Form::row_label_inline('Campaign Type', \App\Models\Campaign::$campaign_type_map[$type], 'label-grey bt-label-small', 4, 7, \App\Helpers\FormComponentHelper::SIZE_MEDIUM) }}
{{ Form::separator_row_bottom('grey-divider') }} {{ Form::separator_row_empty() }}
{{ Form::row_text_inline('name', "Campaign Name", $campaign->campaign ? $campaign->name : null, 4, 7, \App\Helpers\FormComponentHelper::SIZE_MEDIUM) }} {{ Form::row_text_inline('default_from_name', "Default From Name", $campaign->campaign ? $campaign->default_from_name : $business->company, 4, 7, \App\Helpers\FormComponentHelper::SIZE_MEDIUM) }} @if($type == \App\Models\Campaign::CAMPAIGN_TYPE_ENGAGE) {{ Form::row_select_inline('approximate_duration','Approximate Duration', $campaign->campaign ? $campaign->approximate_duration : null, \App\Models\Campaign::$approximate_duration_map, 4, 7, \App\Helpers\FormComponentHelper::SIZE_MEDIUM, null, 'Select One') }} @endif @if($type == \App\Models\Campaign::CAMPAIGN_TYPE_BUILD) {{ Form::row_date_inline('start_date','Start Date',$campaign->campaign ? Carbon\Carbon::parse($campaign->start_date)->format('m/d/Y') : Carbon\Carbon::today()->format('m/d/Y'), 4, 7, \App\Helpers\FormComponentHelper::SIZE_MEDIUM, 'date-picker') }} @endif
{{ Form::label_ex('Default Delay', \App\Helpers\FormComponentHelper::SIZE_MEDIUM, 'default_delay', 4) }} {{ Form::number_ex('default_delay', is_numeric($campaign->default_delay) ? $campaign->default_delay : \App\Models\Campaign::DEFAULT_DELAY, 7) }}
{{ Form::row_select_inline('business_milestone','Milestone', $campaign->campaign ? $campaign->business_milestone : null, $business->active_business_milestone_select(), 4, 7, \App\Helpers\FormComponentHelper::SIZE_MEDIUM, null, 'Select') }} @if($type == \App\Models\Campaign::CAMPAIGN_TYPE_BUILD) {{ Form::row_text_inline('default_sendtime', "Default Send Time", $campaign->default_sendtime ? $campaign->default_sendtime : \App\Models\Campaign::DEFAULT_SENDTIME, 4, 7, \App\Helpers\FormComponentHelper::SIZE_MEDIUM) }}
{{ Form::label_ex('Default Duration', \App\Helpers\FormComponentHelper::SIZE_MEDIUM, 'default_duration', 4) }} {{ Form::number_ex('default_duration', is_numeric($campaign->default_duration) ? $campaign->default_duration : \App\Models\Campaign::DEFAULT_DURATION, 7) }}
@endif {{ Form::row_label_inline('Industry', $industry->industry_name, 'label-grey bt-label-small label-cat', 4, 7, \App\Helpers\FormComponentHelper::SIZE_MEDIUM) }} {{ Form::hidden('industry', $industry->industry) }} {{ Form::hidden('created_by', $auth_user->user) }} @if($campaign->campaign) {{ Form::hidden('type', $campaign->type) }} @else {{ Form::hidden('type', $type) }} @endif @if ($type == \App\Models\Campaign::CAMPAIGN_TYPE_ENGAGE) {{ Form::row_select_inline('when_done','When Done', $campaign->campaign ? $campaign->when_done : \App\Models\Campaign::WHEN_DONE_NOTHING, \App\Models\Campaign::$when_done_map, 4, 7, \App\Helpers\FormComponentHelper::SIZE_MEDIUM, 'on_when_done_select(this.value);', 'Select') }} {{ Form::select_ex('when_done_campaign', $campaign->campaign ? $campaign->when_done_campaign : null, $business->engage_campaign_select($campaign->campaign), 7, 4, null, null, 'Select') }} {{ Form::select_multiple('when_done_mailing[]', sizeof(session()->getOldInput()) > 0 ? Form::old('when_done_mailing[]') : $when_done_audience, $audience->pluck('name', 'marketing_list'), 7, 4, null, 'when_done_mailing' ) }}
@endif
{{ Form::row_select_inline('diction','Diction',$campaign->campaign ? $campaign->diction : null, \App\Models\Campaign::$diction_map, 4, 7, \App\Helpers\FormComponentHelper::SIZE_MEDIUM, null, 'Select') }} {{ Form::row_select_inline('tone_1','Tone',$campaign->campaign ? $campaign->tone_1 : null, \App\Models\Campaign::$tone_1_map, 4, 7, \App\Helpers\FormComponentHelper::SIZE_MEDIUM, null, 'Select') }} {{ Form::row_select_inline('tone_2',' ',$campaign->campaign ? $campaign->tone_2 : null, \App\Models\Campaign::$tone_2_map, 4, 7, \App\Helpers\FormComponentHelper::SIZE_MEDIUM, null, 'Select') }} {{ Form::row_select_inline('tone_3',' ',$campaign->campaign ? $campaign->tone_3 : null, \App\Models\Campaign::$tone_3_map, 4, 7, \App\Helpers\FormComponentHelper::SIZE_MEDIUM, null, 'Select') }} {{ Form::row_select_inline('delivery','Delivery',$campaign->campaign ? $campaign->delivery : null, \App\Helpers\RequestDataHelper::$delivery_map, 4, 7, \App\Helpers\FormComponentHelper::SIZE_MEDIUM, null, 'Select') }} {{ Form::row_select_inline('voice','Voice',$campaign->campaign ? $campaign->delivery : null, \App\Helpers\RequestDataHelper::$voice_map, 4, 7, \App\Helpers\FormComponentHelper::SIZE_MEDIUM, null, 'Select') }} {{-- {{ Form::row_checkbox_inline('campaign_driver[]',$business_driver->income_stream_name, false, 4, 7) }}--}}
@if(!empty($audience))
@foreach($audience as $key => $aud)
{{ Form::checkbox_ex('audience['.$aud->marketing_list.']', !empty($campaign_audience) && in_array($aud->marketing_list, $campaign_audience) ? true : null, $aud->name, null, null, null, null, null, $aud->marketing_list) }}
@endforeach
{{ Form::button_ex("Add Mailing List","add_mailing_list();","add_mailing_list_btn", null, \App\Helpers\FormComponentHelper::SIZE_TINY) }}
@endif
{{ Form::separator_row_bottom('grey-divider') }}
@if(!$campaign->campaign) {{ Form::button_ex("Add Recording Links","post_create_campaign_ajax();","add_recording_links_btn") }} @endif {{ Form::button_save() }} @if($campaign->campaign) {{ Form::button_link('CANCEL', action('CampaignController@campaign_content', compact('business', 'campaign'))) }} @else {{ Form::button_link('CANCEL', action('CampaignController@campaigns', compact('business')), 'cancel_btn') }} @endif
{{ Form::close() }}
@if($campaign->campaign) @endif
@endsection @section('page_script') {!! HTML::script('/js/moment.min.js') !!} {!! HTML::script('/js/daterangepicker.js') !!} {!! Html::script('/js/jquery.timepicker.js') !!} {!! Html::script('/js/multiple-select.js') !!} @endsection @section('page_style') {!! HTML::style('/css/daterangepicker.css') !!} {!! HTML::style('/css/daterangepicker_custom.css') !!} {!! HTML::style('/css/jquery.timepicker.css') !!} {!! HTML::style('/css/multiple-select.css') !!} @endsection