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

#155 Allow overwriting of brand colors in flavours #346

Merged
merged 6 commits into from
Dec 29, 2024
Merged
Changes from 1 commit
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
Next Next commit
Move existing QuickForm colorpicker class to a better place for bette…
…r re-usability
abias committed Dec 28, 2024
commit 5ade4c198751a3b137196bd3ee913df866e67f91
6 changes: 3 additions & 3 deletions classes/form/smartmenu_item_edit_form.php
Original file line number Diff line number Diff line change
@@ -47,11 +47,11 @@ public function definition() {
global $DB, $PAGE, $CFG;

// Require and register the QuickForm colorpicker element.
require_once($CFG->dirroot.'/theme/boost_union/form/element-colorpicker.php');
require_once($CFG->dirroot.'/theme/boost_union/classes/formelement/colorpicker.php');
\MoodleQuickForm::registerElementType(
'theme_boost_union_colorpicker',
$CFG->dirroot.'/theme/boost_union/form/element-colorpicker.php',
'moodlequickform_themeboostunion_colorpicker'
$CFG->dirroot.'/theme/boost_union/classes/formelement/colorpicker.php',
'\theme_boost_union\formelement\colorpicker'
);

// Get an easier handler for the form.
Original file line number Diff line number Diff line change
@@ -15,13 +15,18 @@
// along with Moodle. If not, see <http://www.gnu.org/licenses/>.

/**
* Theme Boost Union Login - Form element for color picker
* Theme Boost Union - Form element for color picker
*
* @package theme_boost_union
* @copyright 2023 bdecent GmbH <https://bdecent.de>
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/

namespace theme_boost_union\formelement;

use MoodleQuickForm_text;
use renderer_base;

defined('MOODLE_INTERNAL') || die();

require_once('HTML/QuickForm/input.php');
@@ -35,9 +40,9 @@
* @copyright 2023 bdecent GmbH <https://bdecent.de>
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
class moodlequickform_themeboostunion_colorpicker extends MoodleQuickForm_text implements \core\output\templatable {
class colorpicker extends MoodleQuickForm_text implements \core\output\templatable {

use templatable_form_element {
use \templatable_form_element {
export_for_template as export_for_template_base;
}