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

save CP theme to member profile #2198

Draft
wants to merge 4 commits into
base: 7.dev
Choose a base branch
from
Draft

Conversation

intoeetive
Copy link
Contributor

@intoeetive intoeetive commented Aug 4, 2022

toggle themes in cycle

based on conversation: https://packettide.slack.com/archives/C030JTF1ZFB/p1659621964566149

toggle themes in cycle
@intoeetive intoeetive added this to the 7.0.1 milestone Aug 4, 2022
@@ -212,6 +217,20 @@ public function dismissBanner()

ee()->output->send_ajax_response(['success']);
}

/**
* Dismiss post-update banner from CP homepage, until next update
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Comment should be updated.

public function switchTheme()
{
$member = ee()->session->getMember();
$member->cp_theme = ee('Request')->isPost() ? ee('Request')->post('theme') : ee('Request')->get('theme');
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we validate theme is in an array of allowed themes?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The validation is done in javascript file

@intoeetive intoeetive modified the milestones: 7.0.1, 7.1.0 Aug 4, 2022
@intoeetive intoeetive marked this pull request as draft August 4, 2022 14:15
revert icon change
return true;
}

private function addCpThemeToMember()
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We're going to need to move this to a new update file.

@matthewjohns0n
Copy link
Member

I just saw after posting this review that this branch is still a draft, so I'm sure you knew that already.

@intoeetive intoeetive modified the milestones: 7.1.0, 7.1.x Aug 16, 2022
@intoeetive intoeetive modified the milestones: 7.1.x, 7.2.0 Sep 5, 2022
@intoeetive intoeetive modified the milestones: 7.2.0, 7.3.0 Sep 22, 2022
@intoeetive intoeetive modified the milestones: 7.3.0, 7.3.1, 7.2.1, 7.2.x Nov 14, 2022
@intoeetive intoeetive modified the milestones: 7.2.5, 7.2.x Dec 19, 2022
@intoeetive intoeetive modified the milestones: 7.2.6, 7.3.0 Jan 5, 2023
@intoeetive intoeetive removed this from the 7.3.0 milestone Feb 28, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants