In the join page, i want to change css of ACCOUNT TYPE drop-down to radio button select, can you pls guide
Problem is people are selecting wrong account type while joining.
Cheers!
Ash
In the join page, i want to change css of ACCOUNT TYPE drop-down to radio button select, can you pls guide
Problem is people are selecting wrong account type while joining.
Cheers!
Ash
hi,
you can use this:
#joinForm select[name="accountType"] {
color: red;
}
and for the options :
#joinForm select[name="accountType"] option {
color: green
}
Hi This will make the colors changed in drop down, i am sorry if i uses the wrong words.. i want to SHOW all the Account Type & make it SINGLE-SELECT via RADIO-BUTTON not as drop-down select.. i tried looking in join_index.php & html both but i could not, so need help..hi,
you can use this:
#joinForm select[name="accountType"] {
color: red;
}
and for the options :
#joinForm select[name="accountType"] option {
color: green
}
/ow_system_plugins/base/controllers/join.php
On or around line 499.
You will find this code:
protected function init( array $accounts )
{
if ( $this->displayAccountType )
{
$joinAccountType = new Selectbox('accountType');
$joinAccountType->setLabel(OW::getLanguage()->text('base', 'questions_question_account_type_label'));
$joinAccountType->setRequired();
$joinAccountType->setOptions($accounts);
$joinAccountType->setValue($this->accountType);
$joinAccountType->setHasInvitation(false);
$this->addElement($joinAccountType);
}
}
This is the code you need to change.
The question type needs to be changed to RadioField, and the invitation needs to be removed or else you'll get an error message. Change it to this:
protected function init( array $accounts )
{
if ( $this->displayAccountType )
{
// $joinAccountType = new Selectbox('accountType');
$joinAccountType = new RadioField('accountType');
$joinAccountType->setLabel(OW::getLanguage()->text('base', 'questions_question_account_type_label'));
$joinAccountType->setRequired();
$joinAccountType->setOptions($accounts);
$joinAccountType->setValue($this->accountType);
// $joinAccountType->setHasInvitation(false);
$this->addElement($joinAccountType);
}
}
I do not see how this would cause any problems, BUT - I have not thoroughly tested or checked this code change, so use at your own risk.
Marcus, I dont believe that the users profile questions allows one to change the account type field type. If i recall that is not part of the scope.
Dev Forward appreciate the help. :)
Norias thanks for sharing that, im bad with level 2 css. :)
Ash i hope you are writing down all these changes to the core, if oxwall ever does release a new version you are going to either lose all your changes or youll have to do the update manually file by file in order to update.
Go to:
/ow_system_plugins/base/controllers/join.php
On or around line 499.
You will find this code:
protected function init( array $accounts )
{
if ( $this->displayAccountType )
{
$joinAccountType = new Selectbox('accountType');
$joinAccountType->setLabel(OW::getLanguage()->text('base', 'questions_question_account_type_label'));
$joinAccountType->setRequired();
$joinAccountType->setOptions($accounts);
$joinAccountType->setValue($this->accountType);
$joinAccountType->setHasInvitation(false);
$this->addElement($joinAccountType);
}
}
This is the code you need to change.
The question type needs to be changed to RadioField, and the invitation needs to be removed or else you'll get an error message. Change it to this:
protected function init( array $accounts )
{
if ( $this->displayAccountType )
{
// $joinAccountType = new Selectbox('accountType');
$joinAccountType = new RadioField('accountType');
$joinAccountType->setLabel(OW::getLanguage()->text('base', 'questions_question_account_type_label'));
$joinAccountType->setRequired();
$joinAccountType->setOptions($accounts);
$joinAccountType->setValue($this->accountType);
// $joinAccountType->setHasInvitation(false);
$this->addElement($joinAccountType);
}
}
I do not see how this would cause any problems, BUT - I have not thoroughly tested or checked this code change, so use at your own risk.
Go to:wow it worked! Kudos!!!
/ow_system_plugins/base/controllers/join.php
On or around line 499.
You will find this code:
protected function init( array $accounts )
{
if ( $this->displayAccountType )
{
$joinAccountType = new Selectbox('accountType');
$joinAccountType->setLabel(OW::getLanguage()->text('base', 'questions_question_account_type_label'));
$joinAccountType->setRequired();
$joinAccountType->setOptions($accounts);
$joinAccountType->setValue($this->accountType);
$joinAccountType->setHasInvitation(false);
$this->addElement($joinAccountType);
}
}
This is the code you need to change.
The question type needs to be changed to RadioField, and the invitation needs to be removed or else you'll get an error message. Change it to this:
protected function init( array $accounts )
{
if ( $this->displayAccountType )
{
// $joinAccountType = new Selectbox('accountType');
$joinAccountType = new RadioField('accountType');
$joinAccountType->setLabel(OW::getLanguage()->text('base', 'questions_question_account_type_label'));
$joinAccountType->setRequired();
$joinAccountType->setOptions($accounts);
$joinAccountType->setValue($this->accountType);
// $joinAccountType->setHasInvitation(false);
$this->addElement($joinAccountType);
}
}
I do not see how this would cause any problems, BUT - I have not thoroughly tested or checked this code change, so use at your own risk.
A small prob, there are 2 more place this need needs to be changed as well
1)If you signup via google connect then you skip the writing and the select account type drop-down comes (here also will need to show radio-button single select
2)In search user the same function show in selecting account type drop down, even here radio-button should show..
Were will i find the codes, will i need to do the same change activity?
Help will be really appreciated!
Thanks in advance
Cheers!
Google connect, i am unable to find the codes..
oxwall/ow_system_plugins/base/controllers/complete_profile.php:76
oxwall/ow_system_plugins/base/controllers/edit.php:134
oxwall/ow_system_plugins/base/controllers/join.php:489
oxwall/ow_system_plugins/base/controllers/user_search.php:185
I haven't test anything, just made a grep search, but maybe it can help...
The Selectbox('accountType') code can be found in this files :Thanks Mate! I will try a hand..
oxwall/ow_system_plugins/base/controllers/complete_profile.php:76
oxwall/ow_system_plugins/base/controllers/edit.php:134
oxwall/ow_system_plugins/base/controllers/join.php:489
oxwall/ow_system_plugins/base/controllers/user_search.php:185
I haven't test anything, just made a grep search, but maybe it can help...
oxwall/ow_system_plugins/base/controllers/complete_profile.php
On or around line 76.
$joinAccountType = new Selectbox('accountType');
$joinAccountType->setLabel(OW::getLanguage()->text('base', 'questions_question_account_type_label'));
$joinAccountType->setRequired();
$joinAccountType->setOptions($accounts);
$joinAccountType->setHasInvitation(false);
It just needs the same changes as above, I suspect.
I haven't tested it at all, but it looks like what you want is in the first file Norias listed:Yes solved! THANKS A TON!
oxwall/ow_system_plugins/base/controllers/complete_profile.php
On or around line 76.
$joinAccountType = new Selectbox('accountType');
$joinAccountType->setLabel(OW::getLanguage()->text('base', 'questions_question_account_type_label'));
$joinAccountType->setRequired();
$joinAccountType->setOptions($accounts);
$joinAccountType->setHasInvitation(false);
It just needs the same changes as above, I suspect.
opppps folks my bad i misread the whole thing.You mean to say JS in footer? How? Can u pls show an example please, it would be really helpful~
im pretty sure you can change that with just a bit of js.
pls email me ur url or share it hereHi Marcus, send you details via pvt message, pls do check!
Thanks in advance! Cheers!
Here is my solution BUT to make it work properly you gotta bind it to correct page and that requires plugin. But I don't think it will conflict with other forms.
Add this whole thing to ./admin/settings/page Custom tail code
<script>
$( "select" ).addClass( "myClass" );
$( ".myClass" ).wrap( "<div class='myClassWrapp'></div>" );
var count = $('.myClass option').length;
$('.myClass').attr('size', count)
</script>
<style type="text/css">
.myClass option::before {
content: "\2610";
width: 1.3em;
text-align: center;
display: inline-block;
}
.myClass option:checked::before {
content: "\2611";
}
.myClass {
border: none;
margin: -5px -17px -5px -5px;
padding: 16px;
font-size:16px;
}
.myClassWrapp {
margin: 20px;
overflow: hidden;
vertical-align: top;
display: inline-block;
}
</style>
Thanks Marcus! Taking out time and helping out really matters!!! And this looks awesome.. i will be connecting your soon in pvt, for getting this plugin built.Here is my solution BUT to make it work properly you gotta bind it to correct page and that requires plugin. But I don't think it will conflict with other forms.
Add this whole thing to ./admin/settings/page Custom tail code
<script>
$( "select" ).addClass( "myClass" );
$( ".myClass" ).wrap( "<div class='myClassWrapp'></div>" );
var count = $('.myClass option').length;
$('.myClass').attr('size', count)
</script>
<style type="text/css">
.myClass option::before {
content: "\2610";
width: 1.3em;
text-align: center;
display: inline-block;
}
.myClass option:checked::before {
content: "\2611";
}
.myClass {
border: none;
margin: -5px -17px -5px -5px;
padding: 16px;
font-size:16px;
}
.myClassWrapp {
margin: 20px;
overflow: hidden;
vertical-align: top;
display: inline-block;
}
</style>
Cheers!
Ash