Skip to content

Commit

Permalink
[4.0] Remove sample data step from install
Browse files Browse the repository at this point in the history
PR for #25813
  • Loading branch information
brianteeman committed Aug 13, 2019
1 parent 686a34a commit c9ef42c
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 56 deletions.
36 changes: 2 additions & 34 deletions installation/template/js/remove.js
Expand Up @@ -18,25 +18,8 @@ if (document.getElementById('installAddFeatures')) {
if (document.getElementById('skipLanguages')) {
document.getElementById('skipLanguages').addEventListener('click', function(e) {
e.preventDefault();
document.getElementById('installSampleData').classList.add('active');
document.getElementById('installLanguages').classList.remove('active');
})
}

if (document.getElementById('installSampleData')) {
document.getElementById('installSampleData').addEventListener('click', function(e) {
e.preventDefault();
document.getElementById('installSampleData').classList.add('active');
document.getElementById('installLanguages').classList.remove('active');
})
}

if (document.getElementById('skipSampleData')) {
document.getElementById('skipSampleData').addEventListener('click', function(e) {
e.preventDefault();
document.getElementById('installSampleData').classList.toggle('active');
document.getElementById('installSampleData').style.display = 'none';
document.getElementById('installFinal').classList.add('active');
document.getElementById('installLanguages').classList.remove('active');
})
}

Expand All @@ -49,23 +32,8 @@ if (document.getElementById('installLanguagesButton')) {
// Install the extra languages
if (Joomla.install(['languages'], form)) {
document.getElementById('installLanguages').classList.remove('active');
document.getElementById('installSampleData').classList.add('active');
document.getElementById('installFinal').classList.add('active');
}
}
})
}

if (document.getElementById('installSampleDataButton')) {
document.getElementById('installSampleDataButton').addEventListener('click', function(e) {
e.preventDefault();
var form = document.getElementById('sampleDataForm');
if (form) {
// Install the extra languages
Joomla.install(['sample'], form);

document.getElementById('installSampleData').classList.toggle('active');
document.getElementById('installSampleData').style.display = 'none';
document.getElementById('installFinal').classList.add('active');
}
})
}
22 changes: 0 additions & 22 deletions installation/tmpl/remove/default.php
Expand Up @@ -187,28 +187,6 @@ class="btn btn-primary"
</div>
</fieldset>

<fieldset id="installSampleData" class="j-install-step">
<legend class="j-install-step-header">
<span class="fa fa-cog" aria-hidden="true"></span> <?php echo Text::_('INSTL_SITE_INSTALL_SAMPLE'); ?>
</legend>
<div class="j-install-step-form">
<h2><?php echo Text::_('INSTL_SITE_INSTALL_SAMPLE_LABEL'); ?></h2>
<p><?php echo Text::_('INSTL_SITE_INSTALL_SAMPLE_DESC'); ?></p>


<form action="index.php" method="post" id="sampleDataForm" class="form-validate">
<div class="form-group">
<input type="hidden" name="sample_file" value="sample_testing.sql">
<?php echo HTMLHelper::_('form.token'); ?>
<button id="installSampleDataButton" class="btn btn-primary btn-block"><?php echo Text::_('INSTL_SITE_INSTALL_SAMPLE'); ?> <span class="fa fa-chevron-right" aria-hidden="true"></span></button>
<button id="skipSampleData" class="btn btn-block btn-secondary">
<?php echo Text::_('JSKIP'); ?>
</button>
</div>
</form>
</div>
</fieldset>

<fieldset id="installFinal" class="j-install-step">
<legend class="j-install-step-header">
<span class="fab fa-joomla" aria-hidden="true"></span> <?php echo Text::_('INSTL_COMPLETE_FINAL'); ?>
Expand Down

0 comments on commit c9ef42c

Please sign in to comment.