~piersharding/udi/master-udi

« back to all changes in this revision

Viewing changes to htdocs/copy_form.php

  • Committer: Piers Harding
  • Date: 2011-10-02 21:27:04 UTC
  • mfrom: (151.1.63)
  • Revision ID: git-v1:a3e8fccd857706bbe9f37a05061ddc2e2d0b8143
Merge branch 'master' into test-master-merge

Conflicts:
        lib/ds_ldap_pla.php
        lib/page.php

Show diffs side-by-side

added added

removed removed

Lines of Context:
27
27
$request['page']->drawTitle(sprintf('%s <b>%s</b>',_('Copy'),get_rdn($request['dn'])));
28
28
$request['page']->drawSubTitle();
29
29
 
30
 
printf('<script type="text/javascript" language="javascript" src="%sdnChooserPopup.js"></script>',JSDIR);
31
 
echo '<center>';
 
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'));
 
33
echo '</div>';
33
34
 
34
 
echo '<form action="cmd.php" method="post" name="copy_form">';
 
35
echo '<form action="cmd.php" method="post" id="copy_form">';
 
36
echo '<div>';
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 '</div>';
39
42
echo "\n";
40
43
 
41
 
echo '<table style="border-spacing: 10px">';
 
44
echo '<table border="0" style="border-spacing: 10px; margin-left: auto; margin-right: auto;">';
42
45
 
43
46
echo '<tr>';
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'));
46
49
echo '<td>';
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']));
49
52
echo '</td>';
50
53
echo '</tr>';
51
54
echo "\n";
59
62
if (count($request['children']) > 0) {
60
63
        echo '<tr>';
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.'));
64
67
        echo '</tr>';
65
68
        echo "\n";
83
86
}
84
87
echo "\n";
85
88
 
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 '));
87
90
echo "\n";
88
91
 
89
92
echo '</table>';
90
93
echo '</form>';
91
94
 
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'));
95
98
 
96
 
echo '</center>';
97
99
 
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);
101
103
?>