  |
49 | 49 | | |
| |
50 | 50 | | function prepareDB() { |
| |
51 | 51 | | if (document.getElementById("DB_INSERT_SAMPLE_DATA").checked) { |
  |
52 | | - | if (formSubmited == true) { |
| |
53 | | - | return false; |
| |
54 | | - | } |
|
55 | 52 | | |
  |
56 | | - | formSubmited = true; |
| |
57 | | - | |
|
58 | 53 | | document.getElementById('mBoxContents').innerHTML = '<p><img src="images/progress.gif" align="right" hspace="5" vspace="5" border="0" /><?php echo $osC_Language->get('rpc_database_sample_data_importing'); ?></p>'; |
| |
59 | 54 | | |
| |
60 | 55 | | loadXMLDoc("rpc.php?action=dbImportSample&server=" + urlEncode(dbServer) + "&username=" + urlEncode(dbUsername) + "&password=" + urlEncode(dbPassword) + "&name=" + urlEncode(dbName) + "&class=" + urlEncode(dbClass) + "&prefix=" + urlEncode(dbPrefix), handleHttpResponse); |
| |
|
|
 |
… |
|
65 | 60 | | |
| |
66 | 61 | | function onSubmitCheck(form_name) { |
| |
67 | 62 | | form = form_name; |
  |
| 63 | + | error = false; |
| |
| 64 | + | error_message = ''; |
|
68 | 65 | | |
  |
| 66 | + | if (formSubmited == true) { |
| |
| 67 | + | return false; |
| |
| 68 | + | } |
| |
| 69 | + | |
| |
| 70 | + | formSubmited = true; |
| |
| 71 | + | |
|
69 | 72 | | showDiv(document.getElementById('mBox')); |
  |
70 | | - | |
| |
| 73 | + | |
|
71 | 74 | | check_input_emtpy("CFG_ADMINISTRATOR_USERNAME", "<?php echo $osC_Language->get('error_admin_name_empty'); ?>"); |
| |
72 | 75 | | check_input_emtpy("CFG_ADMINISTRATOR_PASSWORD", "<?php echo $osC_Language->get('error_admin_password_empty'); ?>"); |
| |
73 | 76 | | |
| |
|
|
 |
… |
|
79 | 82 | | } |
| |
80 | 83 | | } else { |
| |
81 | 84 | | document.getElementById('mBoxContents').innerHTML = '<p><img src="images/failed.gif" align="right" hspace="5" vspace="5" border="0" />' + error_message + '</p>'; |
  |
| 85 | + | formSubmited = false; |
|
82 | 86 | | return false; |
| |
83 | 87 | | } |
| |
84 | 88 | | } |
| |
|
|
 |
… |
|
116 | 120 | | <div class="contentPane"> |
| |
117 | 121 | | <h2><?php echo $osC_Language->get('page_heading_step_3'); ?></h2> |
| |
118 | 122 | | |
  |
119 | | - | <form name="install" id="installForm" action="install.php?step=4" method="post" onsubmit="return onSubmitCheck(install);"> |
| |
| 123 | + | <form name="install" id="installForm" action="install.php?step=4" method="post" onsubmit="return onSubmitCheck(install); return false;"> |
  |
120 | 124 | | |
| |
121 | 125 | | <table border="0" width="99%" cellspacing="0" cellpadding="5" class="inputForm"> |
| |
122 | 126 | | <tr> |