List Your Property

Questions and answers about change of functions, design, hosting etc.

Moderators: Koduc, Xpycm

Forum rules
Pay attention! Forum is not a means for guaranteed support of clients and users. An answer as well as a quick answer is not supposed on the forum. We post messages as soon as possible.

The message limit on the forum is 3 messages per day.
If you want to say "thank you" then use the function "Give good reputation point", which is a green icon "plus" under the nickname of the person, who answered the message.

List Your Property

Postby Ashwini » 11 Aug 2015, 14:57

if , type=rent
{
how to hide, 'independent floor ' property type in dropdownbox.
}
Ashwini
Passer
 
Posts: 44
Joined: 03 Aug 2015, 12:41
Reputation point: 0

Re: List Your Property

Postby Koduc » 12 Aug 2015, 17:20

First of all, you should find ID of "independent floor". Go to "Control Panel" - Reference "Property types"
Open for edit ''independent floor' and you can find id in URL (for example, id=12).

Edit file /protected/modules/apartments/views/backend/__form_general.php and replace this code
Code: Select all
<div class="rowold">
    <?php echo $form->labelEx($model, 'obj_type_id'); ?>
    <?php echo $form->dropDownList($model, 'obj_type_id', Apartment::getObjTypesArray(), array('class' => 'width240', 'id' => 'obj_type')); ?>
    <?php echo $form->error($model, 'obj_type_id'); ?>
</div>

to
Code: Select all
<?php
    $objTypesArr 
=  Apartment::getObjTypesArray();
    if($model->type == 1 && isset($objTypesArr[12])){
        unset($objTypesArr[12]);
    }
?>

<div class="rowold">
    <?php echo $form->labelEx($model, 'obj_type_id'); ?>
    <?php echo $form->dropDownList($model, 'obj_type_id', $objTypesArr, array('class' => 'width240', 'id' => 'obj_type')); ?>
    <?php echo $form->error($model, 'obj_type_id'); ?>
</div>

(replace "12" to your ID number)
-- Меньше знаешь - крепче спишь --
User avatar
Koduc
Team lead
Team lead
 
Posts: 64
Joined: 28 Dec 2011, 09:11
Reputation point: 0

Postby Ashwini » 13 Aug 2015, 09:31

Thank you very much.. it's working properly..thanks a lot.
Ashwini
Passer
 
Posts: 44
Joined: 03 Aug 2015, 12:41
Reputation point: 0


Return to Questions and help for changes

Who is online

Users browsing this forum: No registered users and 53 guests