diff options
author | Renato Botelho <renato@netgate.com> | 2017-01-24 11:54:47 -0200 |
---|---|---|
committer | Renato Botelho <renato@netgate.com> | 2017-01-24 11:54:47 -0200 |
commit | 61d1d1899ea280df5516b42b16c0e2ff5e4c1cf6 (patch) | |
tree | 5ea27b4246b6799f9cd64a555eba83fad305e01b | |
parent | c0f396d506246620827f62f18cbbe22283c2183b (diff) | |
parent | f9a6f8a053bc87ec2cc4d8c33abe285f1b80167b (diff) | |
download | pfsense-61d1d1899ea280df5516b42b16c0e2ff5e4c1cf6.zip pfsense-61d1d1899ea280df5516b42b16c0e2ff5e4c1cf6.tar.gz |
Merge pull request #3436 from NOYB/System_Update_Settings_-_GitSync_Options_master
-rw-r--r-- | src/usr/local/www/system_update_settings.php | 70 |
1 files changed, 70 insertions, 0 deletions
diff --git a/src/usr/local/www/system_update_settings.php b/src/usr/local/www/system_update_settings.php index 81e55e4..66aadc2 100644 --- a/src/usr/local/www/system_update_settings.php +++ b/src/usr/local/www/system_update_settings.php @@ -66,6 +66,36 @@ if ($_POST) { } } + if ($_POST['minimal'] == "yes") { + $config['system']['gitsync']['minimal'] = true; + } else { + unset($config['system']['gitsync']['minimal']); + } + + if ($_POST['diff'] == "yes") { + $config['system']['gitsync']['diff'] = true; + } else { + unset($config['system']['gitsync']['diff']); + } + + if ($_POST['show_files'] == "yes") { + $config['system']['gitsync']['show_files'] = true; + } else { + unset($config['system']['gitsync']['show_files']); + } + + if ($_POST['show_command'] == "yes") { + $config['system']['gitsync']['show_command'] = true; + } else { + unset($config['system']['gitsync']['show_command']); + } + + if ($_POST['dryrun'] == "yes") { + $config['system']['gitsync']['dryrun'] = true; + } else { + unset($config['system']['gitsync']['dryrun']); + } + write_config(); $savemsg = gettext("Changes have been saved successfully"); @@ -190,6 +220,46 @@ if (file_exists("/usr/local/bin/git")) { ))->setHelp('The most recently used branch was "%s". (Usually the branch name is master)' . '<br />Note: Sync will not be performed if a branch is not specified.', [$lastbranch]); + $group = new Form_Group('Sync options'); + + $group->add(new Form_Checkbox( + 'minimal', + null, + 'Minimal', + isset($gitcfg['minimal']) + ))->setHelp('Copy of only the updated files.'); + + $group->add(new Form_Checkbox( + 'diff', + null, + 'Diff', + isset($gitcfg['diff']) + ))->setHelp('Copy of only the different or missing files.'); + + $group->add(new Form_Checkbox( + 'show_files', + null, + 'Show Files', + isset($gitcfg['show_files']) + ))->setHelp('Show different and missing files.<br />With \'Diff/Minimal\' option..'); + + $group->add(new Form_Checkbox( + 'show_command', + null, + 'Show Command', + isset($gitcfg['show_command']) + ))->setHelp('Show constructed command.<br />With \'Diff/Minimal\' option.'); + + $group->add(new Form_Checkbox( + 'dryrun', + null, + 'Dry Run', + isset($gitcfg['dryrun']) + ))->setHelp('Dry-run only.<br />No files copied.'); + + $group->setHelp('See "playback gitsync --help" in console "PHP Shell + pfSense tools" for additional information.'); + $section->add($group); + $form->add($section); } // e-o-if (file_exists()) |