@extends('layouts.master') @section('page_title',"Article") @section('content')
{{ Form::page_header("Article", "paper_stack") }} @if ($content_library->content_library) {{ Form::open(['url'=>action('ContentLibraryController@update', compact('content_library'))]) }} @else {{ Form::open(['url'=>action('ContentLibraryController@store')]) }} @endif {{ Form::hidden('content_library', $content_library->content_library) }} {{ Form::hidden('status', $content_library->status) }}
@include('super_admin.content_library._article_info_edit', ['data' => $content_library])
{{ Form::label_title("Article Type") }}
{{ Form::select_placeholder('article_type', $content_library->article_type, $article_type) }}
{{ Form::separator_row('grey-divider thin-divider') }}
{{ Form::label_title("Industry") }}
{{ Form::select_placeholder('industry', $content_library->industry, $industry, 'Select', null, null, "on_change_industry(this.value, '".$content_library->content_library."', '". action('ContentLibraryController@get_drivers')."');") }}
{{ Form::label_title("Subject Line") }}
{{ Form::text_ex("subject_line", $content_library->subject_line) }}
{{ Form::label_title("Directions") }}
{{ Form::text_ex("directions", $content_library->directions) }}
{{ Form::label_title("Key Points") }}
{{ Form::textarea_ex("key_points", $content_library->key_points) }}
{{ Form::label_title("Article Body") }}
{{ Form::tinymce('article_body', old('article_body') !== null ? old('article_body') : $content_library->article_body) }}
{{ Form::label_title("Excerpt") }}
{{ Form::textarea_ex("excerpt", $content_library->excerpt) }}
{{ Form::label_title("Call to Action") }}
{{ Form::textarea_ex("call_to_action", $content_library->call_to_action) }}
{{ Form::label_title("Pull Quote") }}
{{ Form::text_ex("pull_quote", $content_library->pull_quote) }}
@if($content_library->content_library)
{{ Form::label_title("Business that have used this Article") }}
@foreach($associated_business as $k => $v) @include('super_admin.content_library._associated_business_row', ['key' => $k, 'label' => $v]) @endforeach
{{ Form::separator_row_empty() }} {{ Form::separator_row_empty() }}
{{ Form::select_ex('business', null, \App\Models\Business::business_select(false), null, null, null, null, 'Select', 'business-search-select') }} {{ Form::button_ex('Add', 'link_associated_business()', 'add_btn') }}
{{ Form::hidden('link_business_array') }} {{ Form::hidden('unlink_business_array') }} @endif
{{ Form::button_save() }} @if ($content_library->content_library) {{ Form::button_link('Cancel', action('ContentLibraryController@view', compact('content_library'))) }} @else {{ Form::button_link('Cancel', action('ContentLibraryController@content_browse')) }} @endif
@include('super_admin.content_library._associated_business_row')
{{ Form::close() }} @endsection @section('page_script') @include('shared_script._tinymce_init') @include('shared_script._select_type_ahead', ['selectors' => ['.business-search-select'], 'hide_selected_options_onload' => array_keys($associated_business)]) @endsection @section('page_style') @endsection