From d8b648d531ff811870bd5802ee70475795f081b2 Mon Sep 17 00:00:00 2001 From: Rohan Mitchell Date: Fri, 17 Oct 2014 16:51:03 +1100 Subject: [PATCH] Extract name and timing form from order cycles --- app/views/admin/order_cycles/_form.html.haml | 12 +----------- .../order_cycles/_name_and_timing_form.html.haml | 11 +++++++++++ 2 files changed, 12 insertions(+), 11 deletions(-) create mode 100644 app/views/admin/order_cycles/_name_and_timing_form.html.haml diff --git a/app/views/admin/order_cycles/_form.html.haml b/app/views/admin/order_cycles/_form.html.haml index e859374a3b..82146fabdd 100644 --- a/app/views/admin/order_cycles/_form.html.haml +++ b/app/views/admin/order_cycles/_form.html.haml @@ -1,14 +1,4 @@ -= f.label :name -= f.text_field :name, 'ng-model' => 'order_cycle.name', 'required' => true -%br/ - -.date-field - = f.label :orders_open_at, 'Orders open' - = f.text_field :orders_open_at, 'datetimepicker' => 'order_cycle.orders_open_at', 'ng-model' => 'order_cycle.orders_open_at' -.date-field - = f.label :orders_close_at, 'Orders close' - = f.text_field :orders_close_at, 'datetimepicker' => 'order_cycle.orders_close_at', 'ng-model' => 'order_cycle.orders_close_at' -%br/ += render 'name_and_timing_form', f: f %h2 Incoming diff --git a/app/views/admin/order_cycles/_name_and_timing_form.html.haml b/app/views/admin/order_cycles/_name_and_timing_form.html.haml new file mode 100644 index 0000000000..437a6a44f7 --- /dev/null +++ b/app/views/admin/order_cycles/_name_and_timing_form.html.haml @@ -0,0 +1,11 @@ += f.label :name += f.text_field :name, 'ng-model' => 'order_cycle.name', 'required' => true +%br/ + +.date-field + = f.label :orders_open_at, 'Orders open' + = f.text_field :orders_open_at, 'datetimepicker' => 'order_cycle.orders_open_at', 'ng-model' => 'order_cycle.orders_open_at' +.date-field + = f.label :orders_close_at, 'Orders close' + = f.text_field :orders_close_at, 'datetimepicker' => 'order_cycle.orders_close_at', 'ng-model' => 'order_cycle.orders_close_at' +%br/