tokenly / tokenly-cms

GNU General Public License v2.0
42 stars 12 forks source link

Make successful Magic Words submission show confirmation text in GREEN rather than RED #101

Closed AdamBLevine closed 8 years ago

AdamBLevine commented 8 years ago

Red is the universal color of "shit broke" while green is the universal color of "you're good to go!"

Right now whether successful or not, the confirmation text shows up in red - Please make the successful text show up in green.

dbolser commented 8 years ago

Is there a dummy magic word you can give me to look at the CSS?

dbolser commented 8 years ago

np, found it:

<p class="error">Correct! Word submitted successfully</p>
dbolser commented 8 years ago

Need to change the class of the

$output['message'] = 'Correct! Word submitted successfully';

line in ./slick/App/Blog/MagicWords/Controller.php

dbolser commented 8 years ago

Sorry, can't work out where $output goes! I'm guessing the 'message' field is handled implicitly somewhere, and gets the error class by default. Not sure a) where it's handled, and b) how you'd flag it so as to not get the error class.

cryptonaut420 commented 8 years ago

@dbolser the issue was that there was no class being set at all, just always assumed to use the "error" class. i.e me being lazy apparantly :) fixed here c4ffe7ad6584bf409ff36084ccc6d4578eec1799

dbolser commented 8 years ago

https://github.com/tokenly/tokenly-cms/commit/c4ffe7ad6584bf409ff36084ccc6d4578eec1799#diff-bea0588534ff4c90fe333551dd7f1b02R14

Dang, that's clever. I'd never have got there, but it makes perfect sense!

This has been on my 'I could fix that' list for ages, so when I saw the ticket raised, I thought I'd give it a go :-)

Cheers, Dan.