Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Integration of bootswatch themes for bootstrap #921

Merged
merged 3 commits into from
Mar 23, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 14 additions & 13 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,26 +22,27 @@
}
],
"require": {
"paragonie/random_compat": "^2.0.18",
"christian-riesen/base32": "^1.3.2",
"ezyang/htmlpurifier": "^4.13",
"henrique-borba/php-sieve-manager": "^1.0.0",
"bacon/bacon-qr-code": "^1.0.3 || ^2.0.0",
"php": ">=7.4",
"ext-mbstring": "*",
"ext-json": "*",
"christian-riesen/base32": "^1.3.2",
"composer": "^2.0.0",
"ext-curl": "*",
"ext-openssl": "*",
"ext-session": "*",
"ext-fileinfo": "*",
"ext-iconv": "*",
"webklex/composer-info": "^0.0.1",
"composer" : "^2.0.0",
"zbateson/mail-mime-parser": "^2.4",
"ext-json": "*",
"ext-mbstring": "*",
"ext-openssl": "*",
"ext-session": "*",
"ezyang/htmlpurifier": "^4.13",
"henrique-borba/php-sieve-manager": "^1.0.0",
"league/commonmark": "^2.4",
"paragonie/random_compat": "^2.0.18",
"php": ">=7.4",
"symfony/dotenv": "^4.3 || 5.4",
"thomaspark/bootswatch": "^5.3",
"twbs/bootstrap": "^5.3",
"twbs/bootstrap-icons": "^1.11"
"twbs/bootstrap-icons": "^1.11",
"webklex/composer-info": "^0.0.1",
"zbateson/mail-mime-parser": "^2.4"
},
"require-dev": {
"phpunit/phpunit": "^9.3.0"
Expand Down
47 changes: 46 additions & 1 deletion composer.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions modules/2fa/modules.php
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,7 @@ protected function output() {
if (array_key_exists('2fa_enable', $settings)) {
$enabled = $settings['2fa_enable'];
}
$res = '<tr><td colspan="2" data-target=".tfa_setting" class="settings_subtitle cursor-pointer border-bottom p-2 text-secondary">'.
$res = '<tr><td colspan="2" data-target=".tfa_setting" class="settings_subtitle cursor-pointer border-bottom p-2">'.
'<i class="bi bi-unlock-fill fs-5 me-2"></i>'.$this->trans('2 Factor Authentication').'</td></tr>';

$res .= '<tr class="tfa_setting"><td><label class="form-check-label">'.$this->trans('Enable 2 factor authentication').'</label>'.
Expand Down Expand Up @@ -255,7 +255,7 @@ protected function output() {
<label for="2fa_code">'.$this->trans('Login code').'</label>
</div>
<div class="d-grid">
<input type="submit" class="btn btn-success btn-lg" value="'.$this->trans('Submit').'">
<input type="submit" class="btn btn-primary btn-lg" value="'.$this->trans('Submit').'">
</div>
<input type="hidden" name="hm_page_key" value="'.$this->get('2fa_key').'">
</form>
Expand Down
4 changes: 2 additions & 2 deletions modules/2fa/site.css
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@
--tfa-form-invalid-border-color: #dc3545;
--tfa-border-radius: 0.375rem;
--tfa-border-color: #dee2e6;
--tfa-base-color: #666;
--tfa-secondary-color: rgba(33, 37, 41, 0.75);
--tfa-base-color: var(--bs-body-color);
--tfa-secondary-color: var(--bs-secondary);
}

.tfa_error,
Expand Down
2 changes: 1 addition & 1 deletion modules/account/modules.php
Original file line number Diff line number Diff line change
Expand Up @@ -246,7 +246,7 @@ protected function output() {
<label for="new_pass2">'.$this->trans('New password again').'</label>
</div>

<input type="submit" name="change_password" class="btn btn-success" value="'.$this->trans('Update').'">
<input type="submit" name="change_password" class="btn btn-primary" value="'.$this->trans('Update').'">
</form>
</div>
</div>
Expand Down
2 changes: 1 addition & 1 deletion modules/advanced_search/modules.php
Original file line number Diff line number Diff line change
Expand Up @@ -221,7 +221,7 @@ protected function output() {
$this->targets().
$this->times().
$this->other().
'<div class="submit_section px-5"><input type="button" class="btn btn-success" id="adv_search" value="'.$this->trans('Search').'" />'.
'<div class="submit_section px-5"><input type="button" class="btn btn-primary" id="adv_search" value="'.$this->trans('Search').'" />'.
' <input class="btn btn-light border" type="button" class="adv_reset" value="'.$this->trans('Reset').'" />';
}

Expand Down
2 changes: 1 addition & 1 deletion modules/calendar/hm-calendar.php
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ private function output_event($day) {
});
$res = '';
foreach ($this->events[$day] as $event) {
$res .= '<div class="cal_event text-secondary">'.
$res .= '<div class="cal_event">'.
$this->output_event_details($event).
$this->output_mod->html_safe(date('H:i', $event['ts'])).
' <a class="cal_title cursor-pointer">'.$this->output_mod->html_safe($event['title']).
Expand Down
2 changes: 1 addition & 1 deletion modules/calendar/modules.php
Original file line number Diff line number Diff line change
Expand Up @@ -203,7 +203,7 @@ protected function output() {
<div class="mb-3 row">
<div class="col-md-2"></div>
<div class="col-md-10">
<button type="submit" class="btn btn-success">'.$this->trans('Create').'</button>
<button type="submit" class="btn btn-primary">'.$this->trans('Create').'</button>
</div>
</div>
</form>
Expand Down
8 changes: 4 additions & 4 deletions modules/carddav_contacts/modules.php
Original file line number Diff line number Diff line change
Expand Up @@ -255,7 +255,7 @@ protected function output() {
if (count($settings) == 0) {
return;
}
$res = '<tr><td data-target=".carddav_settings" colspan="2" class="settings_subtitle cursor-pointer border-bottom p-2 text-secondary">'.
$res = '<tr><td data-target=".carddav_settings" colspan="2" class="settings_subtitle cursor-pointer border-bottom p-2">'.
'<i class="bi bi-people-fill fs-5 me-2"></i>'.
$this->trans('CardDav Addressbooks').'</td></tr>';
foreach ($settings as $name => $vals) {
Expand All @@ -273,7 +273,7 @@ protected function output() {
if ($pass) {
$res .= 'disabled="disabled" placeholder="'.$this->trans('Password saved').'" ';
$res .= 'name="carddav_passwords['.$this->html_safe($name).']" /> <input type="button" ';
$res .= 'value="'.$this->trans('Unlock').'" class="carddav_password_change btn btn-success" /></td></tr>';
$res .= 'value="'.$this->trans('Unlock').'" class="carddav_password_change btn btn-primary" /></td></tr>';
}
else {
$res .= 'autocomplete="new-password" placeholder="'.$this->trans('Password').'" ';
Expand All @@ -298,7 +298,7 @@ protected function output() {
return '';
}
$form_class = 'contact_form';
$button = '<input class="add_contact_submit btn btn-success" type="submit" name="add_contact" value="'.$this->trans('Add').'" />';
$button = '<input class="add_contact_submit btn btn-primary" type="submit" name="add_contact" value="'.$this->trans('Add').'" />';
$title = $this->trans('Add Carddav');
$current = $this->get('current_carddav_contact', array());
$current_source = false;
Expand All @@ -316,7 +316,7 @@ protected function output() {
$form_class = 'contact_update_form mt-3';
$title = sprintf($this->trans('Update Carddav - %s'), $this->html_safe($current['source']));
$button = '<input type="hidden" name="contact_id" value="'.$this->html_safe($current['id']).'" />'.
'<input class="edit_contact_submit btn btn-success" type="submit" name="edit_contact" value="'.$this->trans('Update').'" />';
'<input class="edit_contact_submit btn btn-primary" type="submit" name="edit_contact" value="'.$this->trans('Update').'" />';
}
if ($current_source) {
$target = '<input type="hidden" name="carddav_email_id" value="'.$this->html_safe($current['carddav_email_id']).'" />'.
Expand Down
4 changes: 2 additions & 2 deletions modules/contacts/modules.php
Original file line number Diff line number Diff line change
Expand Up @@ -190,7 +190,7 @@ protected function output() {

return '<tr class="general_setting"><td><label for="contact_auto_collect">' .
$this->trans('Automatically add outgoing email addresses') . '</label></td>' .
'<td><input type="checkbox" ' . $checked . ' id="contact_auto_collect" name="contact_auto_collect" value="1" />' . $reset . '</td></tr>';
'<td><input class="form-check-input" type="checkbox" ' . $checked . ' id="contact_auto_collect" name="contact_auto_collect" value="1" />' . $reset . '</td></tr>';
}
}

Expand Down Expand Up @@ -258,7 +258,7 @@ protected function output() {
foreach ($backends as $val) {
$res .= '<option value="'.$this->html_safe($val).'">'.$this->html_safe($val).'</option>';
}
$res .= '</select></div> <div class="col"><input onclick="return add_contact_from_message_view()" class="add_contact_button w-100 btn btn-success btn-sm" '.
$res .= '</select></div> <div class="col"><input onclick="return add_contact_from_message_view()" class="add_contact_button w-100 btn btn-primary btn-sm" '.
'type="button" value="'.$this->trans('Add Contact').'"></div></div></div></div>';
$headers = $headers.$res;
}
Expand Down
4 changes: 2 additions & 2 deletions modules/core/handler_modules.php
Original file line number Diff line number Diff line change
Expand Up @@ -150,8 +150,8 @@ public function process() {
$headers['X-XSS-Protection'] = '1; mode=block';
$headers['X-Content-Type-Options'] = 'nosniff';
$headers['Expires'] = gmdate('D, d M Y H:i:s \G\M\T', strtotime('-1 year'));
$headers['Content-Security-Policy'] = "default-src 'none'; script-src 'self' 'unsafe-inline'; ".
"connect-src 'self'; font-src 'self'; img-src ".$img_src." data:; style-src 'self' 'unsafe-inline';";
$headers['Content-Security-Policy'] = "default-src 'none'; script-src 'self' 'unsafe-inline'; " .
"connect-src 'self'; font-src 'self' https://fonts.gstatic.com; img-src " . $img_src . " data:; style-src 'self' 'unsafe-inline' https://fonts.googleapis.com;";
if ($this->request->type == 'AJAX') {
$headers['Content-Type'] = 'application/json';
}
Expand Down
Loading