Skip to content

Commit

Permalink
Fix failed unit tests
Browse files Browse the repository at this point in the history
  • Loading branch information
alvinBM committed Feb 6, 2024
1 parent c660cd7 commit eedadad
Show file tree
Hide file tree
Showing 6 changed files with 83 additions and 101 deletions.
2 changes: 1 addition & 1 deletion language/fa.php
Original file line number Diff line number Diff line change
Expand Up @@ -249,7 +249,7 @@
"Github Connect"=>"Github Connect",
"Hide From Combined Pages"=>"پنهان کردن از صفحات ترکیبی",
"Save Settings"=>"تنظیمات را ذخیره کن",
"Settings are not saved permanently on the server unless you explicitly allow it. If you don't save your settings, any changes made since you last logged in will be deleted when your session expires or you logout. You must re-enter your password for security purposes to save your settings permanently."=>"تنظیمات برای همیشه در سرور ذخیره نمی شوند ، مگر اینکه صریحاً اجازه آن را بدهید. اگر تنظیمات خود را ذخیره نکنید ، با اتمام جلسه یا خارج شدن از سیستم ، هر تغییری که از آخرین ورود به سیستم انجام داده اید ، حذف خواهد شد. برای ذخیره تنظیمات خود باید دوباره رمز ورود خود را برای اهداف امنیتی وارد کنید.",
"Settings are not saved permanently on the server unless you explicitly allow it. If you don\'t save your settings, any changes made since you last logged in will be deleted when your session expires or you logout. You must re-enter your password for security purposes to save your settings permanently."=>"تنظیمات برای همیشه در سرور ذخیره نمی شوند ، مگر اینکه صریحاً اجازه آن را بدهید. اگر تنظیمات خود را ذخیره نکنید ، با اتمام جلسه یا خارج شدن از سیستم ، هر تغییری که از آخرین ورود به سیستم انجام داده اید ، حذف خواهد شد. برای ذخیره تنظیمات خود باید دوباره رمز ورود خود را برای اهداف امنیتی وارد کنید.",
"Add a Repository"=>"مخزن اضافه کنید",
"Disconnect"=>"قطع شدن",
"Already connected"=>"قبلاً متصل شده اید",
Expand Down
18 changes: 2 additions & 16 deletions modules/2fa/modules.php
Original file line number Diff line number Diff line change
Expand Up @@ -147,19 +147,6 @@ protected function output() {
if (array_key_exists('2fa_enable', $settings)) {
$enabled = $settings['2fa_enable'];
}
<<<<<<< HEAD
$res = '<tr>
<td colspan="2" data-target=".tfa_setting" class="settings_subtitle">'.
'<img alt="" src="'.Hm_Image_Sources::$unlocked.'" width="16" height="16" />'.$this->trans('2 Factor Authentication').'
</td>
</tr>';

$res .= '<tr class="tfa_setting">
<td>
'.$this->trans('Enable 2 factor authentication').'
<input value="1" type="checkbox" name="2fa_enable" '.($enabled ? 'checked="checked"' : '').' />';

=======
$res = '<tr><td colspan="2" data-target=".tfa_setting" class="settings_subtitle cursor-pointer border-bottom p-2 text-secondary">'.
'<i class="bi bi-unlock-fill fs-5 me-2"></i>'.$this->trans('2 Factor Authentication').'</td></tr>';

Expand All @@ -169,7 +156,6 @@ protected function output() {
$res .= ' checked="checked"';
}
$res .= '></td></tr>';
>>>>>>> ba2058f0 (2fa Module)
$svg = $this->get('2fa_svg');

if ($svg) {
Expand All @@ -196,7 +182,7 @@ protected function output() {
$res .= ' '.$val.'<input type="hidden" name="2fa_backup_codes[]" value="'.$val.'" /></br >';
}
$res .= '<div class="tfa_mt_1">
<fieldset class="tfa_confirmation_fieldset">
<fieldset class="tfa_confirmation_fieldset p-3">
<legend>Enter the confirmation code</legend>
<div class="tfa_confirmation_wrapper">
<div class="tfa_confirmation_form">
Expand All @@ -208,7 +194,7 @@ protected function output() {
<input class="tfa_confirmation_input_digit" type="number" aria-label="Digit 4" aria-required="true">
<input class="tfa_confirmation_input_digit" type="number" aria-label="Digit 5" aria-required="true">
</div>
<button id="tfaConfirmationBtn" type="submit" class="tfa_confirmation_input_button">'.$this->trans('Verify code').'</button>
<button id="tfaConfirmationBtn" type="submit" class="tfa_confirmation_input_button btn btn-light border-1">'.$this->trans('Verify code').'</button>
</div>
<div class="tfa_confirmation_hint"> '.$this->trans('Enter the 6 digit code from your Authenticator application').'</div>
</div>
Expand Down
4 changes: 0 additions & 4 deletions modules/2fa/site.css
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
<<<<<<< HEAD
:root {
--tfa-form-valid-color: #198754;
--tfa-form-valid-border-color: #198754;
Expand Down Expand Up @@ -218,6 +217,3 @@
/**
** Shake Annimation Ends Here.
**/
=======
.tfa_setting { display: none; }
>>>>>>> ba2058f0 (2fa Module)
4 changes: 2 additions & 2 deletions modules/smtp/modules.php
Original file line number Diff line number Diff line change
Expand Up @@ -1131,11 +1131,11 @@ protected function output() {
'<input value="'.$this->html_safe($subject).'" required name="compose_subject" class="compose_subject form-control" type="text" placeholder="'.$this->trans('Subject').'" id="compose_subject" />'.
'<label for="compose_subject">'.$this->trans('Subject').'</label>'.
'</div>'.
'<div class="form-floating">'.
'<div class="form-floating mb-3">'.
'<textarea id="compose_body" name="compose_body" class="compose_body form-control" placeholder="'.$this->trans('Message').'">'.$this->html_safe($body).'</textarea>'.
'<label for="compose_body">'.$this->trans('Message').'</label>'.
'</div>'.
'<div><input value="1" name="compose_delivery_receipt" id="compose_delivery_receipt" type="checkbox" /><label for="compose_delivery_receipt">'.$this->trans('Request a delivery receipt').'</label></div>';
'<div class="form-check mb-3"><input value="1" name="compose_delivery_receipt" id="compose_delivery_receipt" type="checkbox" class="form-check-input" /><label for="compose_delivery_receipt" class="form-check-label">'.$this->trans('Request a delivery receipt').'</label></div>';
if ($html == 2) {
$res .= '<link href="'.WEB_ROOT.'modules/smtp/assets/markdown/editor.css" rel="stylesheet" />'.
'<script type="text/javascript" src="'.WEB_ROOT.'modules/smtp/assets/markdown/editor.js"></script>'.
Expand Down
Loading

0 comments on commit eedadad

Please sign in to comment.