Kontaktpersonenfeld von Freitext auf Datum umstelen
[kivitendo-erp.git] / templates / webpages / dbupgrade / contacts_convert_cp_birthday_to_date_form.html
diff --git a/templates/webpages/dbupgrade/contacts_convert_cp_birthday_to_date_form.html b/templates/webpages/dbupgrade/contacts_convert_cp_birthday_to_date_form.html
new file mode 100644 (file)
index 0000000..c613264
--- /dev/null
@@ -0,0 +1,48 @@
+[%- USE HTML %]
+[%- USE L %]
+[%- USE LxERP %]
+
+<h1>[%- LxERP.t8('Conversion of "birthday" contact person attribute') %]</h1>
+
+<p>
+ [%- LxERP.t8('The contact person attribute "birthday" is converted from a free-form text field into a date field.') %]
+ [%- LxERP.t8('This requires you to manually correct entries for which an automatic conversion failed and to check those for which it succeeded.') %]
+</p>
+
+[% BLOCK birthday_table %]
+  <table>
+
+    <tr>
+      <th>[%- LxERP.t8('Database ID') %]</th>
+      <th>[%- LxERP.t8('Name') %]</th>
+      <th>[%- LxERP.t8('Given Name') %]</th>
+      <th>[%- LxERP.t8('Birthday (before conversion)') %]</th>
+      <th>[%- LxERP.t8('Birthday (after conversion)') %]</th>
+    </tr>
+
+    [% FOREACH row IN data %]
+      <tr class="listrow[% loop.count % 2 %]">
+        <input type="hidden" name="cp_id_[% row.row_index %]" value="[% row.cp_id %]">
+
+        <td>[% row.cp_id %]</td>
+        <td>[% row.cp_givenname | html %]</td>
+        <td>[% row.cp_name | html %]</td>
+        <td>[% row.cp_birthday_old | html %]</td>
+        <td>[% L.date_tag('cp_birthday_'_ row.row_index, row.cp_birthday) %]</td>
+      </tr>
+    [% END %]
+
+  </table>
+[% END %]
+
+<form action="[% script %]" method="POST">
+  <h2>[%- LxERP.t8('Entries for which automatic conversion failed:') %]</h2>
+  [% PROCESS birthday_table data = data %]
+
+  <h2>[%- LxERP.t8('Entries for which automatic conversion succeeded:') %]</h2>
+  [% PROCESS birthday_table data = auto_data %]
+
+  <input type="hidden" name="row_length" value="[% row_length %]">
+  <input type="hidden" name="action" value="LoginScreen/login">
+  <input type="submit" name="form_submitted" value="save">
+</form>