mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 14:05:37 +02:00
e5326c18ca
ENHANCEMENT Moved all Javascript containedin install.php and config-form.html to install.js, and using jQuery to simplify logic ENHANCEMENT Allow installer to attach custom form fields based on the install driver (as defined in _register_database.php) git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/branches/2.4@101054 467b73ca-7a2a-4603-9d3b-597d59a354a9
38 lines
1.0 KiB
JavaScript
38 lines
1.0 KiB
JavaScript
$(document).ready(function() {
|
|
|
|
/**
|
|
* Toggle field readonly modes, if check configuration comes from
|
|
* _ss_environment (values populated on reload).
|
|
*/
|
|
$('#use_environment').click(function(e) {
|
|
if(!$(this).is(':checked')) {
|
|
$('.configured-by-env').removeAttr('disabled');
|
|
} else {
|
|
$('.configured-by-env').attr('disabled', 'disabled');
|
|
}
|
|
});
|
|
|
|
/**
|
|
* Hide all existing database warnings, and show only current one
|
|
*/
|
|
$('#database_selection li').click(function(e) {
|
|
$('.dbfields').hide();
|
|
// only show fields if there's no db error
|
|
if(!$('.databaseError', this).length) $('.dbfields', this).show();
|
|
$('.databaseError').hide();
|
|
$('.databaseError', this).show();
|
|
});
|
|
// Select first
|
|
$('#database_selection li input:checked').parents('li:first').click();
|
|
|
|
/**
|
|
* Install button
|
|
*/
|
|
$('#ReIn').click(function() {
|
|
$('#install_button').attr('disabled', !$(this).is(':checked'));
|
|
})
|
|
$('#install_button').click(function() {
|
|
$('#saving_top').hide();
|
|
$(this).val('Installing SilverStripe...');
|
|
})
|
|
}); |