mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-02-28 01:53:25 +00:00
Replace inline-alert angular directive
This commit is contained in:
committed by
Filipe
parent
32e3fc0175
commit
7a3b4d394b
@@ -1,7 +0,0 @@
|
||||
angular.module('Darkswarm').directive "ofnInlineAlert", ->
|
||||
restrict: 'A'
|
||||
scope: true
|
||||
link: (scope, elem, attrs) ->
|
||||
scope.visible = true
|
||||
scope.close = ->
|
||||
scope.visible = false
|
||||
@@ -13,10 +13,10 @@
|
||||
%form{ name: 'about', novalidate: true, "ng-controller": "RegistrationFormCtrl", "ng-submit": "selectIfValid('images', about)" }
|
||||
.row
|
||||
.small-12.columns
|
||||
.alert-box.info{ "ofn-inline-alert": true, "ng-show": "visible" }
|
||||
.alert-box.info{ "data-controller": "toggle-control", "data-toggle-control-target": "content", style: "display: block;" }
|
||||
%h6{ "ng-bind" => "'registration.steps.about.success' | t:{enterprise: enterprise.name}" }
|
||||
%span= t(".registration_exit_message")
|
||||
%a.close{ "ng-click": "close()" } ×
|
||||
%a.close{ "data-action": "toggle-control#toggleDisplay" } ×
|
||||
|
||||
.small-12.large-8.columns
|
||||
.row
|
||||
|
||||
@@ -42,9 +42,9 @@
|
||||
.row
|
||||
.columns.large-12
|
||||
- if order.changes_allowed?
|
||||
.alert-box.order-summary{ "ofn-inline-alert" => true, "ng-show" => "visible" }
|
||||
.alert-box.order-summary{ "data-controller": "toggle-control", "data-toggle-control-target": "content", style: "display: block;" }
|
||||
= t(:orders_changeable_orders_alert_html, oc_close: l(order.order_cycle.orders_close_at, format: "%b %d, %Y %H:%M"))
|
||||
%a.close{ "ng-click" => "close()" } ×
|
||||
%a.close{ "data-action": "toggle-control#toggleDisplay" } ×
|
||||
|
||||
= form_for order, url: main_app.order_path(order), html: {id: 'update-order', name: 'update_order_form' } do |order_form|
|
||||
- if order.changes_allowed?
|
||||
|
||||
Reference in New Issue
Block a user