new validation 02/22/2016

This commit is contained in:
Nicolas Blanc
2016-02-22 13:00:27 +00:00
parent 614f83799e
commit 1738db9e1f
4 changed files with 16 additions and 16 deletions

View File

@@ -212,7 +212,7 @@ angular.module("ofn.admin").controller "AdminProductEditCtrl", ($scope, $timeout
).error (data, status) ->
if status == 400 && data.errors? && data.errors.length > 0
errors = error + "\n" for error in data.errors
alert t("products_update_error") + errors
alert t("products_update_error") + "\n" + errors
$scope.displayFailure t("products_update_error")
else
$scope.displayFailure t("products_update_error_data") + status

View File

@@ -70,7 +70,7 @@ angular.module("admin.lineItems").controller 'LineItemsCtrl', ($scope, $timeout,
if $scope.bulk_order_form.$valid
StatusMessage.display 'progress', "Saving..."
$q.all(LineItems.saveAll()).then(->
StatusMessage.display 'success', "All changes saved"v
StatusMessage.display 'success', "All changes saved"
$scope.bulk_order_form.$setPristine()
).catch ->
StatusMessage.display 'failure', {t("unsaved_changes_warning")}

View File

@@ -31,7 +31,7 @@
.alert-box
= t "spree_admin_single_enterprise_alert_mail_confirmation"
%strong= "#{@enterprise.name}."
= t(:spree_admin_single_enterprise_alert_mail_sent)
= t "spree_admin_single_enterprise_alert_mail_sent"
%strong= "#{@enterprise.email}."
= link_to(t('resend'), main_app.enterprise_confirmation_path(enterprise: { id: @enterprise.id, email: @enterprise.email } ), method: :post)
%a.close{ href: "#" } ×
@@ -39,7 +39,7 @@
.alert-box
%strong
= t "spree_admin_single_enterprise_hint"
%strong= "#{t:manage} #{@enterprise.name}."
%strong= "#{t 'manage'} #{@enterprise.name}."
%a.close{ href: "#" } ×
.row
@@ -47,15 +47,15 @@
.header
%h3
%span.icon-map-marker
= t:your_profil_live
= t "your_profil_live"
%p
= t:on_ofn_map
= t "on_ofn_map"
.list
/-# Can we pass an anchor here to zoom to our enterprise?
%a.button.bottom{href: main_app.map_path, target: '_blank'}
= t:see
= t "see"
= @enterprise.name
= t:live
= t "live"
%span.icon-arrow-right
.two.columns
 
@@ -64,12 +64,12 @@
.header
%h3
%span.icon-edit
= t:edit_profile_details
= t "edit_profile_details"
%p
= t:edit_profile_details_etc
= t "edit_profile_details_etc"
.list
%a.button.bottom{href: main_app.edit_admin_enterprise_path(@enterprise)}
= t:manage
= t "manage"
= @enterprise.name
%span.icon-arrow-right
@@ -79,10 +79,10 @@
.header
%h3
%span.icon-th-large
= t:add_and_manage_products
= t "add_and_manage_products"
.list
%a.button.bottom{href: bulk_edit_admin_products_path}
= t:manage_products
= t "manage_products"
%span.icon-arrow-right
.two.columns
@@ -93,8 +93,8 @@
.header
%h3
%span.icon-shopping-cart
= t:add_and_manage_order_cycles
= t "add_and_manage_order_cycles"
.list
%a.button.bottom{href: main_app.admin_order_cycles_path}
= t:manage_order_cycles
= t "manage_order_cycles"
%span.icon-arrow-right

View File

@@ -31,7 +31,7 @@ en:
welcome_to: 'Welcome to '
description: "We begin from the ground up. With farmers and growers ready to tell their stories proudly and truly. With distributors ready to connect people with products fairly and honestly. With buyers who believe that better weekly shopping decisions can…"
search_by_name: Search by name or suburb...
producers: Aussie Producers #FIXME
producers: 'Australian Producers'
producers_join: Australian producers are now welcome to join the Open Food Network. #FIXME
charges_sales_tax: Charges GST?
print_invoice: "Print Invoice"