Browse code

Kontakt kopieren

Bernd Wurst authored on16/01/2018 15:17:08
Showing4 changed files
1 1
new file mode 100644
2 2
Binary files /dev/null and b/images/page_copy.png differ
... ...
@@ -34,6 +34,9 @@ if ($_REQUEST['id'] == 'new') {
34 34
 $c = new_contact();
35 35
 if (! $new) {
36 36
     $c = get_contact($_REQUEST['id']);
37
+} elseif (isset($_REQUEST['copy'])) {
38
+    $c = get_contact($_REQUEST['copy']);
39
+    $c['nic_handle'] = NULL;
37 40
 }
38 41
 
39 42
 $readonly = '';
... ...
@@ -18,15 +18,10 @@ require_once('inc/debug.php');
18 18
 require_role(array(ROLE_CUSTOMER));
19 19
 
20 20
 /*
21
-require_once('external/http.net/domainRobotApi.php');
22
-
23
-function api_fetch_contact($nic_id)
24
-{
25
-  if (! config('http.net-apikey')) {
26
-    system_failure("Kein API-Key vorhanden!");
27
-  }
28
-  $api = new domainRobotApi(config('http.net-apikey'));
29
-}
21
+Todo:
22
+    - Wenn ein Domain-Handle aktualisiert wird, das beim Provider ändern
23
+    - "separate Rechnungsadresse einrichten" / "Zusätzliche Adresse für den Notfall"
24
+    - Domaininhaber festlegen    
30 25
 */
31 26
 
32 27
 
... ...
@@ -16,6 +16,7 @@ Nevertheless, in case you use a significant part of this code, we ask (but not r
16 16
 
17 17
 require_once('contacts.php');
18 18
 require_once('inc/debug.php');
19
+require_once('inc/icons.php');
19 20
 
20 21
 require_once('session/start.php');
21 22
 
... ...
@@ -57,7 +58,13 @@ foreach ($contacts as $id => $contact) {
57 58
     if ($new_email) {
58 59
         $email = "<strike>$email</strike><br/>".$new_email.footnote('Die E-Mail-Adresse wurde noch nicht bestätigt');
59 60
     }
60
-    output("<tr><td>{$contact['id']}</td><td><strong>".internal_link('edit', $name, 'id='.$contact['id'])."</strong></td><td>$adresse</td><td>$email</td><td>$usage</td><td>...</td></tr>");
61
+    $actions = array(
62
+        internal_link('edit', icon_edit('Adresse bearbeiten'), 'id='.$contact['id']),
63
+        internal_link('edit', other_icon('page_copy.png', 'Kopie erstellen'), 'id=new&copy='.$contact['id']),
64
+        
65
+    );
66
+    
67
+    output("<tr><td>{$contact['id']}</td><td><strong>".internal_link('edit', $name, 'id='.$contact['id'])."</strong></td><td>$adresse</td><td>$email</td><td>$usage</td><td>".implode(' ', $actions)."</td></tr>");
61 68
 }
62 69
 output('</table>');
63 70
 output("<br />");