Replace inline-alert angular directive

This commit is contained in:
Cillian O'Ruanaidh
2025-08-22 15:04:39 +01:00
committed by Filipe
parent 32e3fc0175
commit 7a3b4d394b
3 changed files with 4 additions and 11 deletions

View File

@@ -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

View File

@@ -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

View File

@@ -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?