add Note as an afformEntity
authorbrienne <brienne@megaphonetech>
Fri, 11 Aug 2023 17:07:03 +0000 (13:07 -0400)
committerbrienne <brienne@megaphonetech>
Mon, 21 Aug 2023 19:43:23 +0000 (15:43 -0400)
make afformEntity a join

join Note to Contact Entity

ext/afform/admin/afformEntities/Note.php [new file with mode: 0644]
ext/afform/core/ang/afblockContactNote.aff.html [new file with mode: 0644]
ext/afform/core/ang/afblockContactNote.aff.json [new file with mode: 0644]

diff --git a/ext/afform/admin/afformEntities/Note.php b/ext/afform/admin/afformEntities/Note.php
new file mode 100644 (file)
index 0000000..a8a3554
--- /dev/null
@@ -0,0 +1,5 @@
+<?php
+return [
+  'type' => 'join',
+  'repeat_max' => NULL,
+];
diff --git a/ext/afform/core/ang/afblockContactNote.aff.html b/ext/afform/core/ang/afblockContactNote.aff.html
new file mode 100644 (file)
index 0000000..d02d2f6
--- /dev/null
@@ -0,0 +1,5 @@
+<div class="af-container af-layout-inline">
+    <af-field name="note" />
+    <af-field name="subject" />
+  </div>
+  
\ No newline at end of file
diff --git a/ext/afform/core/ang/afblockContactNote.aff.json b/ext/afform/core/ang/afblockContactNote.aff.json
new file mode 100644 (file)
index 0000000..b341287
--- /dev/null
@@ -0,0 +1,7 @@
+{
+    "title": "Contact Note(s)",
+    "type": "block",
+    "entity_type": "Contact",
+    "join_entity": "Note"
+  }
+  
\ No newline at end of file