app/views/admin/cms/pages/_form.html.haml in cms-fortress-1.0.0 vs app/views/admin/cms/pages/_form.html.haml in cms-fortress-1.0.1

- old
+ new

@@ -29,13 +29,13 @@ = render :partial => 'admin/cms/categories/form', :object => form = render :partial => 'form_blocks' =# form.check_box :is_published, :label => t('.is_published') - +- @page.page_workflow ||= Cms::PageWorkflow.new = form.fields_for :page_workflow do |wf| = wf.select :status_id, Cms::PageWorkflow.statuses_for_select, {}, {class: "status-control"} - = wf.text_field :published_date, class: "status-control", :data => {:utc_date => @page.page_workflow.published_date.utc.strftime("%d %B, %Y")} + = wf.text_field :published_date, class: "status-control", :data => {:utc_date => (@page.page_workflow.published_date.nil? ? Time.now : @page.page_workflow.published_date).utc.strftime("%d %B, %Y") } = render 'admin/cms/partials/page_form_after', :object => form .form-actions = form.submit t('.preview'), :name => 'preview', :id => nil, :class => 'btn'