Bug #20762 ยป 11544.diff
t3lib/class.t3lib_install.php (working copy) | ||
---|---|---|
function generateUpdateDatabaseForm_checkboxes($arr,$label,$checked=1,$iconDis=0,$currentValue=array(),$cVfullMsg=0) {
|
||
$out = array();
|
||
if (is_array($arr)) {
|
||
$tableId = uniqid('table');
|
||
if (count($arr) > 1) {
|
||
$out[] = '
|
||
<tr class="update-db-fields-batch">
|
||
<td valign="top">
|
||
<input type="checkbox" id="' . $tableId . '-checkbox"' . ($checked ? ' checked="checked"' : '') . '
|
||
onclick="$(\'' . $tableId . '\').select(\'input[type=checkbox]\').invoke(\'setValue\', $(this).checked);" />
|
||
</td>
|
||
<td nowrap="nowrap"><label for="' . $tableId . '-checkbox"><strong>select/deselect all</strong></label></td>
|
||
</tr>';
|
||
}
|
||
foreach($arr as $key => $string) {
|
||
$ico = '';
|
||
$warnings = array();
|
||
... | ... | |
$content = '
|
||
<!-- Update database fields / tables -->
|
||
<h3>'.$label.'</h3>
|
||
<table border="0" cellpadding="2" cellspacing="2" class="update-db-fields">'.implode('',$out).'
|
||
<table border="0" cellpadding="2" cellspacing="2" id="' . $tableId . '" class="update-db-fields">'.implode('',$out).'
|
||
</table>';
|
||
}
|
||
typo3/sysext/install/mod/class.tx_install.php (working copy) | ||
---|---|---|
$content = '';
|
||
switch($type) {
|
||
case 'get_form':
|
||
$content .= '<div style="float:right;">
|
||
<a href="#bottom" onclick="$(\'updateform\').select(\'input[type=checkbox]\').invoke(\'setValue\', true);">select all</a> /
|
||
<a href="#bottom" onclick="$(\'updateform\').select(\'input[type=checkbox]\').invoke(\'setValue\', false);">deselect all</a>
|
||
</div> ';
|
||
$content.= $this->generateUpdateDatabaseForm_checkboxes($arr_update['clear_table'],'Clear tables (use with care!)',false,true);
|
||
$content.= $this->generateUpdateDatabaseForm_checkboxes($arr_update['add'],'Add fields');
|
||
... | ... | |
* @return [type] ...
|
||
*/
|
||
function getUpdateDbFormWrap($action_type, $content, $label='Write to database') {
|
||
$form = '<form action="'.$this->action.'#bottom" method="post" id="updateform"><input type="hidden" name="TYPO3_INSTALL[database_type]" value="'.htmlspecialchars($action_type).'">'.$content.'<br /><input type="submit" value="'.$label.'">';
|
||
$form = '<form action="'.$this->action.'#bottom" method="post"><input type="hidden" name="TYPO3_INSTALL[database_type]" value="'.htmlspecialchars($action_type).'">'.$content.'<br /><input type="submit" value="'.$label.'">';
|
||
return $form;
|
||
}
|
||