MDL-66999 theme_boost: @extend replace .alert
authorBas Brands <bas@moodle.com>
Wed, 30 Oct 2019 14:00:35 +0000 (15:00 +0100)
committerBas Brands <bas@moodle.com>
Mon, 9 Dec 2019 09:49:39 +0000 (10:49 +0100)
use bs4 .alert .alert-type classes instead of extending .alert

admin/mnet/peer_forms.php
admin/renderer.php
admin/templates/setting.mustache
admin/tool/filetypes/renderer.php
admin/tool/filetypes/styles.css
lib/adminlib.php
theme/boost/scss/moodle/admin.scss
theme/boost/style/moodle.css
theme/classic/style/moodle.css

index 5769e6d..cd24ec1 100644 (file)
@@ -156,7 +156,7 @@ class mnet_review_host_form extends moodleform {
         if ($mnet_peer && !empty($mnet_peer->deleted)) {
             $radioarray = array();
             $radioarray[] = $mform->createElement('static', 'deletedinfo', '',
-                $OUTPUT->container(get_string('deletedhostinfo', 'mnet'), 'deletedhostinfo'));
+                $OUTPUT->container(get_string('deletedhostinfo', 'mnet'), 'alert alert-warning'));
             $radioarray[] = $mform->createElement('radio', 'deleted', '', get_string('yes'), 1);
             $radioarray[] = $mform->createElement('radio', 'deleted', '', get_string('no'), 0);
             $mform->addGroup($radioarray, 'radioar', get_string('deleted'), array(' ', ' '), false);
index 940c33f..fb4ce52 100644 (file)
@@ -253,7 +253,7 @@ class core_admin_renderer extends plugin_renderer_base {
             $out .= $this->output->container(get_string('cancelinstallinfodir', 'core_plugin', $pluginfo->rootdir));
             if ($repotype = $pluginman->plugin_external_source($pluginfo->component)) {
                 $out .= $this->output->container(get_string('uninstalldeleteconfirmexternal', 'core_plugin', $repotype),
-                    'uninstalldeleteconfirmexternal');
+                    'alert alert-warning mt-2');
             }
         }
 
@@ -432,7 +432,7 @@ class core_admin_renderer extends plugin_renderer_base {
 
         if ($repotype = $pluginman->plugin_external_source($pluginfo->component)) {
             $confirm .= $this->output->container(get_string('uninstalldeleteconfirmexternal', 'core_plugin', $repotype),
-                'uninstalldeleteconfirmexternal');
+                'alert alert-warning mt-2');
         }
 
         // After any uninstall we must execute full upgrade to finish the cleanup!
index af78e7e..a3a3a22 100644 (file)
         <label {{#labelfor}}for="{{labelfor}}"{{/labelfor}}>
             {{{title}}}
             {{#override}}
-                <div class="form-overridden">{{override}}</div>
+                <div class="alert alert-info">{{override}}</div>
             {{/override}}
             {{#warning}}
-                <div class="form-warning">{{warning}}</div>
+                <div class="alert alert-warning">{{warning}}</div>
             {{/warning}}
         </label>
         <span class="form-shortname d-block small text-muted">{{{name}}}</span>
index 238f686..f283af1 100644 (file)
@@ -52,7 +52,7 @@ class tool_filetypes_renderer extends plugin_renderer_base {
         $out = $this->heading(get_string('pluginname', 'tool_filetypes'));
         if ($restricted) {
             $out .= html_writer::div(
-                    html_writer::div(get_string('configoverride', 'admin'), 'form-overridden'),
+                    html_writer::div(get_string('configoverride', 'admin'), 'alert alert-info'),
                     '', array('id' => 'adminsettings'));
         }
         if (count($combined) > 1) {
index ed2353a..c8375ee 100644 (file)
 .path-admin-tool-filetypes .generaltable .nonstandard {
     font-weight: bold;
 }
-
-/* Spacing around the 'Defined in config.php' stripe */
-.path-admin-tool-filetypes .form-overridden {
-    display: inline-block;
-    margin-bottom: 1em;
-    padding: 4px 6px;
-}
index cb3515e..a029fd0 100644 (file)
@@ -2757,7 +2757,7 @@ class admin_setting_configfile extends admin_setting_configtext {
         ];
 
         if ($context->readonly) {
-            $this->visiblename .= '<div class="form-overridden">'.get_string('execpathnotallowed', 'admin').'</div>';
+            $this->visiblename .= '<div class="alert alert-info">'.get_string('execpathnotallowed', 'admin').'</div>';
         }
 
         $element = $OUTPUT->render_from_template('core_admin/setting_configfile', $context);
@@ -2818,7 +2818,7 @@ class admin_setting_configexecutable extends admin_setting_configfile {
         ];
 
         if (!empty($CFG->preventexecpath)) {
-            $this->visiblename .= '<div class="form-overridden">'.get_string('execpathnotallowed', 'admin').'</div>';
+            $this->visiblename .= '<div class="alert alert-info">'.get_string('execpathnotallowed', 'admin').'</div>';
         }
 
         $element = $OUTPUT->render_from_template('core_admin/setting_configexecutable', $context);
@@ -2858,7 +2858,7 @@ class admin_setting_configdirectory extends admin_setting_configfile {
         ];
 
         if (!empty($CFG->preventexecpath)) {
-            $this->visiblename .= '<div class="form-overridden">'.get_string('execpathnotallowed', 'admin').'</div>';
+            $this->visiblename .= '<div class="alert alert-info">'.get_string('execpathnotallowed', 'admin').'</div>';
         }
 
         $element = $OUTPUT->render_from_template('core_admin/setting_configdirectory', $context);
index fb25f1a..2b505b3 100644 (file)
     }
 }
 
-.uninstalldeleteconfirmexternal {
-    @extend .alert-warning;
-    padding: 0.5em 1em;
-    margin: 5px 0 10px 0;
-}
-
 #page-admin-index .upgradepluginsinfo {
     text-align: center;
 }
     font-size: $font-size-sm;
 }
 
-#page-admin-mnet-peers .mform .deletedhostinfo {
-    @extend .form-control-danger;
-    padding: 4px;
-    margin-bottom: 5px;
-}
-
 #core-cache-plugin-summaries table,
 #core-cache-store-summaries table {
     width: 100%;
     z-index: $zindex-dropdown;
 }
 
-#adminsettings .form-overridden {
-    @extend .alert-info;
-}
-
 .modal.modal-in-page {
     z-index: 0;
 }
index 8d693d0..57ed89e 100644 (file)
@@ -6045,24 +6045,24 @@ p.arrow_button input[type="button"],
   .alert-success .alert-link, .que .comment .alert-link {
     color: #1f3e1f; }
 
-.alert-info, #adminsettings .form-overridden, .que .formulation, .assignfeedback_editpdf_widget .label {
+.alert-info, .que .formulation, .assignfeedback_editpdf_widget .label {
   color: #2f6473;
   background-color: #def2f8;
   border-color: #d1edf6; }
-  .alert-info hr, #adminsettings .form-overridden hr, .que .formulation hr, .assignfeedback_editpdf_widget .label hr {
+  .alert-info hr, .que .formulation hr, .assignfeedback_editpdf_widget .label hr {
     border-top-color: #bce5f2; }
-  .alert-info .alert-link, #adminsettings .form-overridden .alert-link, .que .formulation .alert-link, .assignfeedback_editpdf_widget .label .alert-link {
+  .alert-info .alert-link, .que .formulation .alert-link, .assignfeedback_editpdf_widget .label .alert-link {
     color: #20454f; }
 
-.alert-warning, .uninstalldeleteconfirmexternal,
+.alert-warning,
 .que .outcome,
 .que .comment {
   color: #7d5a29;
   background-color: #fcefdc;
   border-color: #fbe8cd; }
-  .alert-warning hr, .uninstalldeleteconfirmexternal hr, .que .outcome hr, .que .comment hr {
+  .alert-warning hr, .que .outcome hr, .que .comment hr {
     border-top-color: #f9ddb5; }
-  .alert-warning .alert-link, .uninstalldeleteconfirmexternal .alert-link, .que .outcome .alert-link, .que .comment .alert-link {
+  .alert-warning .alert-link, .que .outcome .alert-link, .que .comment .alert-link {
     color: #573e1c; }
 
 .alert-danger {
@@ -9436,8 +9436,7 @@ a.text-dark:hover, #categoryquestions a.highlight:hover, a.text-dark:focus, #cat
 
 .form-control-success,
 .form-control-warning,
-.form-control-danger,
-#page-admin-mnet-peers .mform .deletedhostinfo {
+.form-control-danger {
   padding-right: 2.25rem;
   background-repeat: no-repeat;
   background-position: center right calc(1.5em + 0.75rem + 2px)/4;
@@ -12110,10 +12109,6 @@ body.h5p-embed .h5pmessages {
   .plugins-management-confirm-buttons .continue input {
     margin: 0; }
 
-.uninstalldeleteconfirmexternal {
-  padding: 0.5em 1em;
-  margin: 5px 0 10px 0; }
-
 #page-admin-index .upgradepluginsinfo {
   text-align: center; }
 
@@ -12125,10 +12120,6 @@ body.h5p-embed .h5pmessages {
   margin-bottom: 1em;
   font-size: 0.8203125rem; }
 
-#page-admin-mnet-peers .mform .deletedhostinfo {
-  padding: 4px;
-  margin-bottom: 5px; }
-
 #core-cache-plugin-summaries table,
 #core-cache-store-summaries table {
   width: 100%; }
@@ -16082,9 +16073,7 @@ textarea[data-auto-rows] {
 /** Atto fields do not have form-control because that would break the layout of the editor.
     So they need these extra styles to highlight the editor when there is a validation error. */
 .has-danger .editor_atto_content.form-control,
-.has-danger .editor_atto_content.form-control-danger,
-.has-danger #page-admin-mnet-peers .mform .editor_atto_content.deletedhostinfo,
-#page-admin-mnet-peers .mform .has-danger .editor_atto_content.deletedhostinfo {
+.has-danger .editor_atto_content.form-control-danger {
   background-image: url("data:image/svg+xml;charset=utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='%23d9534f' viewBox='-2 -2 7 7'%3E%3Cpath stroke='%23d9534f' d='M0 0l3 3m0-3L0 3'/%3E%3Ccircle r='.5'/%3E%3Ccircle cx='3' r='.5'/%3E%3Ccircle cy='3' r='.5'/%3E%3Ccircle cx='3' cy='3' r='.5'/%3E%3C/svg%3E");
   padding-right: 2.25rem;
   background-repeat: no-repeat;
@@ -16096,37 +16085,21 @@ textarea[data-auto-rows] {
   .has-danger .editor_atto_content.form-control .form-check-inline,
   .has-danger .editor_atto_content.form-control .custom-control,
   .has-danger .editor_atto_content.form-control-danger .form-control-feedback,
-  .has-danger #page-admin-mnet-peers .mform .editor_atto_content.deletedhostinfo .form-control-feedback,
-  #page-admin-mnet-peers .mform .has-danger .editor_atto_content.deletedhostinfo .form-control-feedback,
   .has-danger .editor_atto_content.form-control-danger .form-control-label,
-  .has-danger #page-admin-mnet-peers .mform .editor_atto_content.deletedhostinfo .form-control-label,
-  #page-admin-mnet-peers .mform .has-danger .editor_atto_content.deletedhostinfo .form-control-label,
   .has-danger .editor_atto_content.form-control-danger .form-check-label,
-  .has-danger #page-admin-mnet-peers .mform .editor_atto_content.deletedhostinfo .form-check-label,
-  #page-admin-mnet-peers .mform .has-danger .editor_atto_content.deletedhostinfo .form-check-label,
   .has-danger .editor_atto_content.form-control-danger .form-check-inline,
-  .has-danger #page-admin-mnet-peers .mform .editor_atto_content.deletedhostinfo .form-check-inline,
-  #page-admin-mnet-peers .mform .has-danger .editor_atto_content.deletedhostinfo .form-check-inline,
-  .has-danger .editor_atto_content.form-control-danger .custom-control,
-  .has-danger #page-admin-mnet-peers .mform .editor_atto_content.deletedhostinfo .custom-control,
-  #page-admin-mnet-peers .mform .has-danger .editor_atto_content.deletedhostinfo .custom-control {
+  .has-danger .editor_atto_content.form-control-danger .custom-control {
     color: #d9534f; }
   .has-danger .editor_atto_content.form-control .form-control,
-  .has-danger .editor_atto_content.form-control-danger .form-control,
-  .has-danger #page-admin-mnet-peers .mform .editor_atto_content.deletedhostinfo .form-control,
-  #page-admin-mnet-peers .mform .has-danger .editor_atto_content.deletedhostinfo .form-control {
+  .has-danger .editor_atto_content.form-control-danger .form-control {
     border-color: #d9534f; }
   .has-danger .editor_atto_content.form-control .input-group-addon,
-  .has-danger .editor_atto_content.form-control-danger .input-group-addon,
-  .has-danger #page-admin-mnet-peers .mform .editor_atto_content.deletedhostinfo .input-group-addon,
-  #page-admin-mnet-peers .mform .has-danger .editor_atto_content.deletedhostinfo .input-group-addon {
+  .has-danger .editor_atto_content.form-control-danger .input-group-addon {
     color: #d9534f;
     border-color: #d9534f;
     background-color: #fdf7f7; }
   .has-danger .editor_atto_content.form-control .form-control-feedback,
-  .has-danger .editor_atto_content.form-control-danger .form-control-feedback,
-  .has-danger #page-admin-mnet-peers .mform .editor_atto_content.deletedhostinfo .form-control-feedback,
-  #page-admin-mnet-peers .mform .has-danger .editor_atto_content.deletedhostinfo .form-control-feedback {
+  .has-danger .editor_atto_content.form-control-danger .form-control-feedback {
     color: #d9534f; }
 
 [data-filetypesbrowserbody] [aria-expanded="false"] > [role="group"],
index c37db34..15a0e98 100644 (file)
@@ -6241,24 +6241,24 @@ p.arrow_button input[type="button"],
   .alert-success .alert-link, .que .comment .alert-link {
     color: #1f3e1f; }
 
-.alert-info, #adminsettings .form-overridden, .que .formulation, .assignfeedback_editpdf_widget .label {
+.alert-info, .que .formulation, .assignfeedback_editpdf_widget .label {
   color: #2f6473;
   background-color: #def2f8;
   border-color: #d1edf6; }
-  .alert-info hr, #adminsettings .form-overridden hr, .que .formulation hr, .assignfeedback_editpdf_widget .label hr {
+  .alert-info hr, .que .formulation hr, .assignfeedback_editpdf_widget .label hr {
     border-top-color: #bce5f2; }
-  .alert-info .alert-link, #adminsettings .form-overridden .alert-link, .que .formulation .alert-link, .assignfeedback_editpdf_widget .label .alert-link {
+  .alert-info .alert-link, .que .formulation .alert-link, .assignfeedback_editpdf_widget .label .alert-link {
     color: #20454f; }
 
-.alert-warning, .uninstalldeleteconfirmexternal,
+.alert-warning,
 .que .outcome,
 .que .comment {
   color: #7d5a29;
   background-color: #fcefdc;
   border-color: #fbe8cd; }
-  .alert-warning hr, .uninstalldeleteconfirmexternal hr, .que .outcome hr, .que .comment hr {
+  .alert-warning hr, .que .outcome hr, .que .comment hr {
     border-top-color: #f9ddb5; }
-  .alert-warning .alert-link, .uninstalldeleteconfirmexternal .alert-link, .que .outcome .alert-link, .que .comment .alert-link {
+  .alert-warning .alert-link, .que .outcome .alert-link, .que .comment .alert-link {
     color: #573e1c; }
 
 .alert-danger {
@@ -9684,8 +9684,7 @@ a.text-dark:hover, #categoryquestions a.highlight:hover, a.text-dark:focus, #cat
 
 .form-control-success,
 .form-control-warning,
-.form-control-danger,
-#page-admin-mnet-peers .mform .deletedhostinfo {
+.form-control-danger {
   padding-right: 2.25rem;
   background-repeat: no-repeat;
   background-position: center right calc(1.5em + 0.75rem + 2px)/4;
@@ -12366,10 +12365,6 @@ body.h5p-embed .h5pmessages {
   .plugins-management-confirm-buttons .continue input {
     margin: 0; }
 
-.uninstalldeleteconfirmexternal {
-  padding: 0.5em 1em;
-  margin: 5px 0 10px 0; }
-
 #page-admin-index .upgradepluginsinfo {
   text-align: center; }
 
@@ -12381,10 +12376,6 @@ body.h5p-embed .h5pmessages {
   margin-bottom: 1em;
   font-size: 0.8203125rem; }
 
-#page-admin-mnet-peers .mform .deletedhostinfo {
-  padding: 4px;
-  margin-bottom: 5px; }
-
 #core-cache-plugin-summaries table,
 #core-cache-store-summaries table {
   width: 100%; }
@@ -16351,9 +16342,7 @@ textarea[data-auto-rows] {
 /** Atto fields do not have form-control because that would break the layout of the editor.
     So they need these extra styles to highlight the editor when there is a validation error. */
 .has-danger .editor_atto_content.form-control,
-.has-danger .editor_atto_content.form-control-danger,
-.has-danger #page-admin-mnet-peers .mform .editor_atto_content.deletedhostinfo,
-#page-admin-mnet-peers .mform .has-danger .editor_atto_content.deletedhostinfo {
+.has-danger .editor_atto_content.form-control-danger {
   background-image: url("data:image/svg+xml;charset=utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='%23d9534f' viewBox='-2 -2 7 7'%3E%3Cpath stroke='%23d9534f' d='M0 0l3 3m0-3L0 3'/%3E%3Ccircle r='.5'/%3E%3Ccircle cx='3' r='.5'/%3E%3Ccircle cy='3' r='.5'/%3E%3Ccircle cx='3' cy='3' r='.5'/%3E%3C/svg%3E");
   padding-right: 2.25rem;
   background-repeat: no-repeat;
@@ -16365,37 +16354,21 @@ textarea[data-auto-rows] {
   .has-danger .editor_atto_content.form-control .form-check-inline,
   .has-danger .editor_atto_content.form-control .custom-control,
   .has-danger .editor_atto_content.form-control-danger .form-control-feedback,
-  .has-danger #page-admin-mnet-peers .mform .editor_atto_content.deletedhostinfo .form-control-feedback,
-  #page-admin-mnet-peers .mform .has-danger .editor_atto_content.deletedhostinfo .form-control-feedback,
   .has-danger .editor_atto_content.form-control-danger .form-control-label,
-  .has-danger #page-admin-mnet-peers .mform .editor_atto_content.deletedhostinfo .form-control-label,
-  #page-admin-mnet-peers .mform .has-danger .editor_atto_content.deletedhostinfo .form-control-label,
   .has-danger .editor_atto_content.form-control-danger .form-check-label,
-  .has-danger #page-admin-mnet-peers .mform .editor_atto_content.deletedhostinfo .form-check-label,
-  #page-admin-mnet-peers .mform .has-danger .editor_atto_content.deletedhostinfo .form-check-label,
   .has-danger .editor_atto_content.form-control-danger .form-check-inline,
-  .has-danger #page-admin-mnet-peers .mform .editor_atto_content.deletedhostinfo .form-check-inline,
-  #page-admin-mnet-peers .mform .has-danger .editor_atto_content.deletedhostinfo .form-check-inline,
-  .has-danger .editor_atto_content.form-control-danger .custom-control,
-  .has-danger #page-admin-mnet-peers .mform .editor_atto_content.deletedhostinfo .custom-control,
-  #page-admin-mnet-peers .mform .has-danger .editor_atto_content.deletedhostinfo .custom-control {
+  .has-danger .editor_atto_content.form-control-danger .custom-control {
     color: #d9534f; }
   .has-danger .editor_atto_content.form-control .form-control,
-  .has-danger .editor_atto_content.form-control-danger .form-control,
-  .has-danger #page-admin-mnet-peers .mform .editor_atto_content.deletedhostinfo .form-control,
-  #page-admin-mnet-peers .mform .has-danger .editor_atto_content.deletedhostinfo .form-control {
+  .has-danger .editor_atto_content.form-control-danger .form-control {
     border-color: #d9534f; }
   .has-danger .editor_atto_content.form-control .input-group-addon,
-  .has-danger .editor_atto_content.form-control-danger .input-group-addon,
-  .has-danger #page-admin-mnet-peers .mform .editor_atto_content.deletedhostinfo .input-group-addon,
-  #page-admin-mnet-peers .mform .has-danger .editor_atto_content.deletedhostinfo .input-group-addon {
+  .has-danger .editor_atto_content.form-control-danger .input-group-addon {
     color: #d9534f;
     border-color: #d9534f;
     background-color: #fdf7f7; }
   .has-danger .editor_atto_content.form-control .form-control-feedback,
-  .has-danger .editor_atto_content.form-control-danger .form-control-feedback,
-  .has-danger #page-admin-mnet-peers .mform .editor_atto_content.deletedhostinfo .form-control-feedback,
-  #page-admin-mnet-peers .mform .has-danger .editor_atto_content.deletedhostinfo .form-control-feedback {
+  .has-danger .editor_atto_content.form-control-danger .form-control-feedback {
     color: #d9534f; }
 
 [data-filetypesbrowserbody] [aria-expanded="false"] > [role="group"],