27
27
$request['page']->drawTitle(sprintf('%s <b>%s</b>',_('Copy'),get_rdn($request['dn'])));
28
28
$request['page']->drawSubTitle();
30
printf('<script type="text/javascript" language="javascript" src="%sdnChooserPopup.js"></script>',JSDIR);
30
printf('<script type="text/javascript" src="%sdnChooserPopup.js"></script>',JSDIR);
31
echo '<div style="text-align: center;">';
32
32
printf('%s <b>%s</b> %s:<br /><br />',_('Copy'),get_rdn($request['dn']),_('to a new object'));
34
echo '<form action="cmd.php" method="post" name="copy_form">';
35
echo '<form action="cmd.php" method="post" id="copy_form">';
35
37
echo '<input type="hidden" name="cmd" value="copy" />';
36
38
printf('<input type="hidden" name="server_id" value="%s" />',$app['server']->getIndex());
37
39
printf('<input type="hidden" name="server_id_src" value="%s" />',$app['server']->getIndex());
38
40
printf('<input type="hidden" name="dn_src" value="%s" />',htmlspecialchars($request['dn']));
41
echo '<table style="border-spacing: 10px">';
44
echo '<table border="0" style="border-spacing: 10px; margin-left: auto; margin-right: auto;">';
44
47
printf('<td><acronym title="%s">%s</acronym>:</td>',
45
48
_('The full DN of the new entry to be created when copying the source entry'),_('Destination DN'));
47
50
printf('<input type="text" name="dn_dst" size="45" value="%s" />',htmlspecialchars($request['dn']));
48
draw_chooser_link('copy_form.dn_dst','true',get_rdn($request['dn']));
51
draw_chooser_link('copy_form','dn_dst','true',get_rdn($request['dn']));
59
62
if (count($request['children']) > 0) {
61
64
printf('<td><label for="recursive">%s</label>:</td>',_('Recursive copy'));
62
echo '<td><input type="checkbox" id="recursive" name="recursive" onClick="copy_field_toggle(this)" />';
65
echo '<td><input type="checkbox" id="recursive" name="recursive" onclick="copy_field_toggle(this)" />';
63
66
printf('<small>(%s)</small></td>',_('Recursively copy all children of this object as well.'));
86
printf('<tr><td colspan="2" align="right"><input type="submit" value="%s" /></td></tr>',_('Copy '));
89
printf('<tr><td colspan="2" style="text-align: center;"><input type="submit" value="%s" /></td></tr>',_('Copy '));
92
95
if ($_SESSION[APPCONFIG]->getValue('appearance','show_hints'))
93
printf('<small><img src="%s/light.png" alt="Light" /><span class="hint">%s</span></small>',
96
printf('<div style="text-align: center;"><small><img src="%s/light.png" alt="Light" /><span class="hint">%s</span></small></div>',
94
97
IMGDIR,_('Hint: Copying between different servers only works if there are no schema violations'));
98
100
# Draw the javascrpt to enable/disable the filter field if this may be a recursive copy
99
101
if (count($request['children']) > 0)
100
printf('<script type="text/javascript" language="javascript" src="%sform_field_toggle_enable.js"></script>',JSDIR);
102
printf('<script type="text/javascript" src="%sform_field_toggle_enable.js"></script>',JSDIR);