Fix styles for legacy forms and error texts

pull/4451/head
Angel Fernando Quiroz Campos 3 years ago
parent 5c449f1b1b
commit cfc8b5faa9
  1. 6
      public/main/exercise/exercise.class.php
  2. 6
      public/main/exercise/overview.php
  3. 5
      public/main/inc/lib/display.lib.php
  4. 2
      public/main/inc/lib/formvalidator/FormValidator.class.php
  5. 10
      public/main/install/install.lib.php
  6. 2
      public/plugin/whispeakauth/WhispeakMyStudentsLpTrackingHook.php
  7. 2
      public/plugin/whispeakauth/WhispeakMyStudentsQuizTrackingHook.php

@ -5659,19 +5659,19 @@ class Exercise
<tr class="row_even">
<td><b>'.get_lang('Overlapping areaping area').'</b></td>
<td>'.get_lang('Minimum').' '.$threadhold1.'</td>
<td class="text-right '.($overlap_color ? 'text-success' : 'text-danger').'">'
<td class="text-right '.($overlap_color ? 'text-success' : 'text-error').'">'
.$overlap.'</td>
</tr>
<tr>
<td><b>'.get_lang('Excessive areaive area').'</b></td>
<td>'.get_lang('max. 20 characters, e.g. <i>INNOV21</i>').' '.$threadhold2.'</td>
<td class="text-right '.($excess_color ? 'text-success' : 'text-danger').'">'
<td class="text-right '.($excess_color ? 'text-success' : 'text-error').'">'
.$excess.'</td>
</tr>
<tr class="row_even">
<td><b>'.get_lang('Missing area area').'</b></td>
<td>'.get_lang('max. 20 characters, e.g. <i>INNOV21</i>').' '.$threadhold3.'</td>
<td class="text-right '.($missing_color ? 'text-success' : 'text-danger').'">'
<td class="text-right '.($missing_color ? 'text-success' : 'text-error').'">'
.$missing.'</td>
</tr>
</table>';

@ -512,7 +512,7 @@ if ($quizCheckButtonEnabled) {
btnTest.prop('disabled', true).removeClass('btn--success btn--danger').addClass('btn--plain');
iconBtnTest.removeClass('hidden');
var txtResult = $('#quiz-check-request-text').removeClass('text-success text-danger').hide();
var txtResult = $('#quiz-check-request-text').removeClass('text-success text-error').hide();
$
.when(
@ -537,11 +537,11 @@ if ($quizCheckButtonEnabled) {
txtResult.text(\"".get_lang('QuizBrowserCheckOK')."\").addClass('text-success').show();
} else {
btnTest.removeClass('btn--plain btn--success').addClass('btn--danger');
txtResult.text(\"".get_lang('QuizBrowserCheckKO')."\").addClass('text-danger').show();
txtResult.text(\"".get_lang('QuizBrowserCheckKO')."\").addClass('text-error').show();
}
},
function () {
txtResult.text(\"".get_lang('QuizBrowserCheckKO')."\").addClass('text-danger').show();
txtResult.text(\"".get_lang('QuizBrowserCheckKO')."\").addClass('text-error').show();
btnTest.removeClass('btn--plain btn--success').addClass('btn--danger');
}
)

@ -916,7 +916,10 @@ class Display
$html = '';
$extra = '';
$default_id = 'id="'.$name.'" ';
$extra_attributes = array_merge(['class' => 'form-control'], $extra_attributes);
$extra_attributes = array_merge(
['class' => 'p-dropdown p-component p-inputwrapper p-inputwrapper-filled'],
$extra_attributes
);
foreach ($extra_attributes as $key => $parameter) {
if ('id' == $key) {
$default_id = '';

@ -119,7 +119,7 @@ EOT;
{
if (self::LAYOUT_BOX_SEARCH == $this->layout) {
return '<form {attributes}>
<div class="form__group--inline p-inputgroup">
<div class="form__group form__group--inline p-inputgroup">
{content}
{hidden}
</div>

@ -823,7 +823,7 @@ function display_requirements(
if (count($notWritable) > 0) {
error_log('Installer: At least one needed directory or file is not writeable');
$error = true; ?>
<div class="text-danger">
<div class="text-error">
<h3 class="text-center"><?php echo get_lang('Warning !'); ?></h3>
<p>
<?php printf(get_lang('Some files or folders don\'t have writing permission. To be able to install Chamilo you should first change their permissions (using CHMOD). Please read the %s installation guide %s'), '<a href="../../documentation/installation_guide.html" target="blank">', '</a>'); ?>
@ -832,7 +832,7 @@ function display_requirements(
<?php
echo '<ul>';
foreach ($notWritable as $value) {
echo '<li class="text-danger">'.$value.'</li>';
echo '<li class="text-error">'.$value.'</li>';
}
echo '</ul>';
} elseif (file_exists(api_get_path(CONFIGURATION_PATH).'configuration.php')) {
@ -858,11 +858,13 @@ function display_requirements(
if (count($deprecatedToRemove) > 0) {
?>
<p class="text-danger"><?php echo get_lang('Warning !ForDeprecatedDirectoriesForUpgrade'); ?></p>
<p class="text-error">
<?php echo get_lang("Because the <code>newscorm</code> and <code>exercice</code> directories were renamed to <code>lp</code> and <code>exercise</code> respectively, is necessary to delete or rename to <code>newscorm_old</code> and <code>exercice_old</code>."); ?>
</p>
<ul>
<?php foreach ($deprecatedToRemove as $deprecatedDirectory) {
?>
<li class="text-danger"><?php echo $deprecatedDirectory; ?></li>
<li class="text-error"><?php echo $deprecatedDirectory; ?></li>
<?php
} ?>
</ul>

@ -49,7 +49,7 @@ class WhispeakMyStudentsLpTrackingHook extends HookObserver implements HookMyStu
$successCount = WhispeakAuthPlugin::countSuccessAttemptsInLearningPath($data['lp_id'], $data['student_id']);
$attrs = ['class' => 'text-center '];
$attrs['class'] .= $successCount <= $totalCount / 2 ? 'text-danger' : 'text-success';
$attrs['class'] .= $successCount <= $totalCount / 2 ? 'text-error' : 'text-success';
return [
'value' => Display::tag('strong', "$successCount / $totalCount"),

@ -67,7 +67,7 @@ class WhispeakMyStudentsQuizTrackingHook extends HookObserver implements HookMyS
$successCount = WhispeakAuthPlugin::countSuccessAttemptsInQuiz($data['quiz_id'], $data['student_id']);
$attrs = ['class' => 'text-center '];
$attrs['class'] .= $successCount <= $totalCount / 2 ? 'text-danger' : 'text-success';
$attrs['class'] .= $successCount <= $totalCount / 2 ? 'text-error' : 'text-success';
return [
'value' => Display::tag('strong', "$successCount / $totalCount"),

Loading…
Cancel
Save