From b3aa96b1feb3d071ef857a066113bf2dab50cc2d Mon Sep 17 00:00:00 2001
From: Arnaud Levy <contact@arnaudlevy.com>
Date: Mon, 14 Feb 2022 10:29:13 +0100
Subject: [PATCH] curation 1.8

---
 Gemfile.lock                                  | 118 +++++++++---------
 .../education/program/roles/_form.html.erb    |   2 +-
 .../education/program/roles/index.html.erb    |   4 +-
 .../education/program/teachers/_form.html.erb |   2 +-
 .../education/program/teachers/index.html.erb |   4 +-
 docs/communication/wysiwyg.md                 |   2 +-
 6 files changed, 68 insertions(+), 64 deletions(-)

diff --git a/Gemfile.lock b/Gemfile.lock
index 0f6129952..888c9387d 100644
--- a/Gemfile.lock
+++ b/Gemfile.lock
@@ -20,60 +20,60 @@ GIT
 GEM
   remote: https://rubygems.org/
   specs:
-    actioncable (6.1.4.4)
-      actionpack (= 6.1.4.4)
-      activesupport (= 6.1.4.4)
+    actioncable (6.1.4.6)
+      actionpack (= 6.1.4.6)
+      activesupport (= 6.1.4.6)
       nio4r (~> 2.0)
       websocket-driver (>= 0.6.1)
-    actionmailbox (6.1.4.4)
-      actionpack (= 6.1.4.4)
-      activejob (= 6.1.4.4)
-      activerecord (= 6.1.4.4)
-      activestorage (= 6.1.4.4)
-      activesupport (= 6.1.4.4)
+    actionmailbox (6.1.4.6)
+      actionpack (= 6.1.4.6)
+      activejob (= 6.1.4.6)
+      activerecord (= 6.1.4.6)
+      activestorage (= 6.1.4.6)
+      activesupport (= 6.1.4.6)
       mail (>= 2.7.1)
-    actionmailer (6.1.4.4)
-      actionpack (= 6.1.4.4)
-      actionview (= 6.1.4.4)
-      activejob (= 6.1.4.4)
-      activesupport (= 6.1.4.4)
+    actionmailer (6.1.4.6)
+      actionpack (= 6.1.4.6)
+      actionview (= 6.1.4.6)
+      activejob (= 6.1.4.6)
+      activesupport (= 6.1.4.6)
       mail (~> 2.5, >= 2.5.4)
       rails-dom-testing (~> 2.0)
-    actionpack (6.1.4.4)
-      actionview (= 6.1.4.4)
-      activesupport (= 6.1.4.4)
+    actionpack (6.1.4.6)
+      actionview (= 6.1.4.6)
+      activesupport (= 6.1.4.6)
       rack (~> 2.0, >= 2.0.9)
       rack-test (>= 0.6.3)
       rails-dom-testing (~> 2.0)
       rails-html-sanitizer (~> 1.0, >= 1.2.0)
-    actiontext (6.1.4.4)
-      actionpack (= 6.1.4.4)
-      activerecord (= 6.1.4.4)
-      activestorage (= 6.1.4.4)
-      activesupport (= 6.1.4.4)
+    actiontext (6.1.4.6)
+      actionpack (= 6.1.4.6)
+      activerecord (= 6.1.4.6)
+      activestorage (= 6.1.4.6)
+      activesupport (= 6.1.4.6)
       nokogiri (>= 1.8.5)
-    actionview (6.1.4.4)
-      activesupport (= 6.1.4.4)
+    actionview (6.1.4.6)
+      activesupport (= 6.1.4.6)
       builder (~> 3.1)
       erubi (~> 1.4)
       rails-dom-testing (~> 2.0)
       rails-html-sanitizer (~> 1.1, >= 1.2.0)
-    activejob (6.1.4.4)
-      activesupport (= 6.1.4.4)
+    activejob (6.1.4.6)
+      activesupport (= 6.1.4.6)
       globalid (>= 0.3.6)
-    activemodel (6.1.4.4)
-      activesupport (= 6.1.4.4)
-    activerecord (6.1.4.4)
-      activemodel (= 6.1.4.4)
-      activesupport (= 6.1.4.4)
-    activestorage (6.1.4.4)
-      actionpack (= 6.1.4.4)
-      activejob (= 6.1.4.4)
-      activerecord (= 6.1.4.4)
-      activesupport (= 6.1.4.4)
+    activemodel (6.1.4.6)
+      activesupport (= 6.1.4.6)
+    activerecord (6.1.4.6)
+      activemodel (= 6.1.4.6)
+      activesupport (= 6.1.4.6)
+    activestorage (6.1.4.6)
+      actionpack (= 6.1.4.6)
+      activejob (= 6.1.4.6)
+      activerecord (= 6.1.4.6)
+      activesupport (= 6.1.4.6)
       marcel (~> 1.0.0)
       mini_mime (>= 1.1.0)
-    activesupport (6.1.4.4)
+    activesupport (6.1.4.6)
       concurrent-ruby (~> 1.0, >= 1.0.2)
       i18n (>= 1.6, < 2)
       minitest (>= 5.1)
@@ -87,7 +87,7 @@ GEM
     autoprefixer-rails (10.4.2.0)
       execjs (~> 2)
     aws-eventstream (1.2.0)
-    aws-partitions (1.553.0)
+    aws-partitions (1.554.0)
     aws-sdk-core (3.126.0)
       aws-eventstream (~> 1, >= 1.0.2)
       aws-partitions (~> 1, >= 1.525.0)
@@ -139,7 +139,7 @@ GEM
       countries (~> 4.2)
       sort_alphabetical (~> 1.1)
     crass (1.0.6)
-    curation (1.7)
+    curation (1.8)
       metainspector
       nokogiri
     delayed_job (4.1.10)
@@ -253,7 +253,7 @@ GEM
     listen (3.7.1)
       rb-fsevent (~> 0.10, >= 0.10.3)
       rb-inotify (~> 0.9, >= 0.9.10)
-    loofah (2.13.0)
+    loofah (2.14.0)
       crass (~> 1.0.2)
       nokogiri (>= 1.5.9)
     mail (2.7.1)
@@ -291,7 +291,7 @@ GEM
     pg (1.3.1)
     popper_js (2.9.3)
     public_suffix (4.0.6)
-    puma (5.6.1)
+    puma (5.6.2)
       nio4r (~> 2.0)
     racc (1.6.0)
     rack (2.2.3)
@@ -301,32 +301,32 @@ GEM
       rack
     rack-test (1.1.0)
       rack (>= 1.0, < 3)
-    rails (6.1.4.4)
-      actioncable (= 6.1.4.4)
-      actionmailbox (= 6.1.4.4)
-      actionmailer (= 6.1.4.4)
-      actionpack (= 6.1.4.4)
-      actiontext (= 6.1.4.4)
-      actionview (= 6.1.4.4)
-      activejob (= 6.1.4.4)
-      activemodel (= 6.1.4.4)
-      activerecord (= 6.1.4.4)
-      activestorage (= 6.1.4.4)
-      activesupport (= 6.1.4.4)
+    rails (6.1.4.6)
+      actioncable (= 6.1.4.6)
+      actionmailbox (= 6.1.4.6)
+      actionmailer (= 6.1.4.6)
+      actionpack (= 6.1.4.6)
+      actiontext (= 6.1.4.6)
+      actionview (= 6.1.4.6)
+      activejob (= 6.1.4.6)
+      activemodel (= 6.1.4.6)
+      activerecord (= 6.1.4.6)
+      activestorage (= 6.1.4.6)
+      activesupport (= 6.1.4.6)
       bundler (>= 1.15.0)
-      railties (= 6.1.4.4)
+      railties (= 6.1.4.6)
       sprockets-rails (>= 2.0.0)
     rails-dom-testing (2.0.3)
       activesupport (>= 4.2.0)
       nokogiri (>= 1.6)
     rails-html-sanitizer (1.4.2)
       loofah (~> 2.3)
-    rails-i18n (7.0.1)
+    rails-i18n (7.0.2)
       i18n (>= 0.7, < 2)
       railties (>= 6.0.0, < 8)
-    railties (6.1.4.4)
-      actionpack (= 6.1.4.4)
-      activesupport (= 6.1.4.4)
+    railties (6.1.4.6)
+      actionpack (= 6.1.4.6)
+      activesupport (= 6.1.4.6)
       method_source
       rake (>= 0.13)
       thor (~> 1.0)
@@ -335,7 +335,7 @@ GEM
     rb-fsevent (0.11.1)
     rb-inotify (0.10.1)
       ffi (~> 1.0)
-    regexp_parser (2.2.0)
+    regexp_parser (2.2.1)
     responders (3.0.1)
       actionpack (>= 5.0)
       railties (>= 5.0)
diff --git a/app/views/admin/education/program/roles/_form.html.erb b/app/views/admin/education/program/roles/_form.html.erb
index 54d99730b..071666536 100644
--- a/app/views/admin/education/program/roles/_form.html.erb
+++ b/app/views/admin/education/program/roles/_form.html.erb
@@ -8,7 +8,7 @@
           <h5 class="card-title mb-0"><%= t('admin.infos') %></h5>
         </div>
         <div class="card-body">
-          <%= f.input :description %>
+          <%= f.input :description, as: :string %>
         </div>
       </div>
     </div>
diff --git a/app/views/admin/education/program/roles/index.html.erb b/app/views/admin/education/program/roles/index.html.erb
index fa4e8a549..9efa6d56e 100644
--- a/app/views/admin/education/program/roles/index.html.erb
+++ b/app/views/admin/education/program/roles/index.html.erb
@@ -2,5 +2,7 @@
 <%= render 'admin/education/program/roles/list', roles: @roles %>
 
 <% content_for :action_bar_right do %>
-  <%= link_to t('add'), new_admin_education_program_role_path(program_id: @program.id), class: button_classes if can? :create, University::Role %>
+  <%= link_to t('create'),
+              new_admin_education_program_role_path(program_id: @program.id),
+              class: button_classes if can? :create, University::Role %>
 <% end %>
diff --git a/app/views/admin/education/program/teachers/_form.html.erb b/app/views/admin/education/program/teachers/_form.html.erb
index b77505dfd..08f8fcb78 100644
--- a/app/views/admin/education/program/teachers/_form.html.erb
+++ b/app/views/admin/education/program/teachers/_form.html.erb
@@ -11,7 +11,7 @@
           <%= f.association :person, collection: @available_people %>
         </div>
         <div class="col-md-6">
-          <%= f.input :description %>
+          <%= f.input :description, as: :string %>
         </div>
       </div>
     </div>
diff --git a/app/views/admin/education/program/teachers/index.html.erb b/app/views/admin/education/program/teachers/index.html.erb
index f37281009..2c4ebc711 100644
--- a/app/views/admin/education/program/teachers/index.html.erb
+++ b/app/views/admin/education/program/teachers/index.html.erb
@@ -2,5 +2,7 @@
 <%= render 'admin/education/program/teachers/list', involvements: @involvements %>
 
 <% content_for :action_bar_right do %>
-  <%= link_to t('add'), new_admin_education_program_teacher_path(program_id: @program.id), class: button_classes %>
+  <%= link_to t('create'),
+              new_admin_education_program_teacher_path(program_id: @program.id),
+              class: button_classes %>
 <% end %>
diff --git a/docs/communication/wysiwyg.md b/docs/communication/wysiwyg.md
index 83b220e7b..75926052b 100644
--- a/docs/communication/wysiwyg.md
+++ b/docs/communication/wysiwyg.md
@@ -88,10 +88,10 @@ A l'enregistrement, la balise est vidée.
 
 Etapes normales :
 -[x] A l'import d'une image, ajouter l'action-text-attachement autour
+-[x] A la suppression d'une image dans l'éditeur, supprimer l'action-text-attachement autour
 -[x] A l'enregistrement, déshydrater les action-text-attachements
 -[x] A l'édition, réhydrater les action-text-attachements
 -[x] Après l'enregistrement mettre à jour les blobs attachés à l'objet parent (le post, par exemple)
--[x] A la suppression d'une image dans l'éditeur, bien supprimer l'élément <figure data-trix-attachment="..."></figure>
 
 Si un programme a 5 champs summernote avec 3 images dans chaque champ, cela fait 15 attachments à lier au programme.
 Si on enlève une image d'un champ, il faut mettre à jour la liste pour avoir les 14 bons attachments.
-- 
GitLab