<div id="organisationPhones" class="subsection">
    <h4><i class="icon-building icon-fixed-width"></i>&nbsp;<?php echo __('ADDRESSESS_FORM_HEADER_BUSINESS'); ?></h4>


    <div class="row interactive">
        <?php
        echo $form->label($model, 'tel_work', array('label' => '<i class="icon-phone icon-fixed-width  callableMakeCall addressBookCallable"></i>'));
        echo $form->textField($model, 'tel_work', array(
            'size' => 40,
            'maxlength' => 40,
            'disabled' => 'disabled',
            'data-placeholder' => $model->getAttributeLabel('tel_work'),
            'data-translation-id' => 'ADDRESSESS_MODEL_TEL_WORK',
            'class' => $protected ? 'protected' : null,
        ));
        echo $form->error($model, 'tel_work');
        ?>
    </div>
    <div class="row interactive">
        <?php
        echo $form->label($model, 'tel_cell', array('label' => '<i class="icon-signal icon-fixed-width callableMakeCall addressBookCallable"></i>'));
        echo $form->textField($model, 'tel_cell', array(
            'size' => 40,
            'maxlength' => 40,
            'disabled' => 'disabled',
            'data-placeholder' => $model->getAttributeLabel('tel_cell'),
            'data-translation-id' => 'ADDRESSESS_MODEL_TEL_CELL',
        ));
        echo $form->error($model, 'tel_cell');
        ?>
    </div>
    <div class="row interactive">
        <?php
        echo $form->label($model, 'tel_fax', array('label' => '<i class="icon-print sendFax icon-fixed-width"></i>'));
        echo $form->textField($model, 'tel_fax', array(
            'size' => 40,
            'maxlength' => 40,
            'disabled' => 'disabled',
            'data-placeholder' => $model->getAttributeLabel('tel_fax'),
            'data-translation-id' => 'ADDRESSESS_MODEL_TEL_FAX',
            'data-ICNumber' => $model->getCanonizedNumber($model->tel_fax_ic)
        ));
        echo $form->error($model, 'tel_fax');
        ?>
    </div>
    <div class="row email">
        <?php
        echo $form->label($model, 'contact_email', array(
            'label' => '<i class="icon-envelope-alt icon-fixed-width"></i>',
        ));
        echo $form->textField($model, 'contact_email', array(
            'size' => 60,
            'type' => 'email',
            'maxlength' => 128,
            'disabled' => 'disabled',
            'data-placeholder' => $model->getAttributeLabel('contact_email'),
            'data-translation-id' => 'ADDRESSESS_MODEL_CONTACT_EMAIL',
            'class' => $protected ? 'protected' : null,
        ));
        echo $form->error($model, 'contact_email');
        ?>
    </div>



    <div class="row input-append">
        <?php

        echo $form->label($model, 'contact_type', array(
            'label' => '<i class="icon-group icon-fixed-width"></i>',
        ));
        
        $lData = CHtml::listData(ContactType::getDefinedContactTypes(), 'id', 'name');
        $lData = array_merge($lData, array('' => __('ADDRESSES_MODEL_ADD_NEW_CONTACT_TYPE')));
        echo $form->dropDownList(
                $model, 'contact_type', $lData, array(
            'id' => 'Addresses_contact_type_drop',
            'data-translation-target' => 'ADDRESSESS_MODEL_CONTACT_TYPES'
                )
        );
        echo $form->textField($model, 'contact_type', array(
            'size' => 40,
            'maxlength' => 40,
            'disabled' => 'disabled',
            'data-placeholder' => $model->getAttributeLabel('contact_type'),
            'data-translation-target' => 'ADDRESSESS_MODEL_CONTACT_TYPES'
        ));
        echo "<div id='contactTypeValueToggle'><span class='add-on'><i class='icon-remove'></i></span></div>";
        echo $form->error($model, 'contact_type');
        ?>

    </div>
</div>


<div id="privatePhones" class="subsection">
    <h4><i class="icon-home icon-fixed-width"></i>&nbsp;<?php echo __('ADDRESSESS_FORM_HEADER_PRIVATE'); ?></h4>
    <div class="row interactive">
        <?php
        echo $form->label($model, 'tel_home', array('label' => '<i class="icon-phone icon-fixed-width callableMakeCall addressBookCallable"></i>'));
        echo $form->textField($model, 'tel_home', array(
            'size' => 40,
            'maxlength' => 40,
            'disabled' => 'disabled',
            'data-placeholder' => $model->getAttributeLabel('tel_home'),
            'data-translation-id' => 'ADDRESSESS_MODEL_TEL_HOME',
        ));
        echo $form->error($model, 'tel_home');
        ?>
    </div>
    <div class="row interactive">
        <?php
        echo $form->label($model, 'tel_cell_private', array('label' => '<i class="icon-signal icon-fixed-width callableMakeCall addressBookCallable"></i>'));
        echo $form->textField($model, 'tel_cell_private', array(
            'size' => 40,
            'maxlength' => 40,
            'disabled' => 'disabled',
            'data-placeholder' => $model->getAttributeLabel('tel_cell_private'),
            'data-translation-id' => 'ADDRESSESS_MODEL_TEL_CELL_PRIVATE',
        ));
        echo $form->error($model, 'tel_cell_private');
        ?>
    </div>
    <div class="row interactive">
        <?php
        echo $form->label($model, 'tel_fax_home', array('label' => '<i class="icon-print sendFax icon-fixed-width"></i>'));
        echo $form->textField($model, 'tel_fax_home', array(
            'size' => 40,
            'maxlength' => 40,
            'disabled' => 'disabled',
            'data-placeholder' => $model->getAttributeLabel('tel_fax_home'),
            'data-translation-id' => 'ADDRESSESS_MODEL_TEL_FAX_HOME',
            'data-ICNumber' => $model->getCanonizedNumber($model->tel_fax_home_ic)
        ));
        echo $form->error($model, 'tel_fax_home');
        ?>
    </div>
    <div class="row email">
        <?php
        echo $form->label($model, 'contact_email_home', array('label' => '<i class="icon-envelope-alt icon-fixed-width"></i>'));
        echo $form->textField($model, 'contact_email_home', array(
            'type' => 'email',
            'size' => 60,
            'maxlength' => 120,
            'disabled' => 'disabled',
            'data-placeholder' => $model->getAttributeLabel('contact_email_home'),
            'data-translation-id' => 'ADDRESSESS_MODEL_CONTACT_EMAIL_HOME',
        ));
        echo $form->error($model, 'contact_email_home');
        ?>
    </div>
    <div class="row url">
        <?php
        echo $form->label($model, 'contact_url_home', array('label' => '<i class="icon-globe icon-fixed-width"></i>'));
        echo $form->textField($model, 'contact_url_home', array(
            'size' => 60,
            'maxlength' => 256,
            'disabled' => 'disabled',
            'data-placeholder' => $model->getAttributeLabel('contact_url_home'),
            'data-translation-id' => 'ADDRESSESS_MODEL_CONTACT_URL_HOME',
        ));
        echo $form->error($model, 'contact_url_home');
        ?>
    </div>

    <?php
        echo $this->renderBDayPicker($model, $form);
    ?>
</div>

<div id="addressSource" class="subsection">
    <h4><i class="icon-info icon-fixed-width"></i>&nbsp;<?php echo __('ADDRESSESS_FORM_HEADER_SOURCE'); ?></h4>
    <div class="row">
        <?php
        echo $form->label($model, 'source', array('label' => '<i id="sourceLabelIcon"  data-translation-target="ADDRESSESS_MODEL_SOURCE_TYPES", class="' . AddressSourceType::getIcon($model->source) . ' icon-fixed-width "></i>'));

        echo CHtml::textField('Addresses[source]', AddressSourceType::getSourceName($model->source), array(
            'size' => 40,
            'maxlength' => 40,
            'disabled' => 'disabled',
//                 'data-placeholder'=>AddressSourceType::getSourceName($model->source),
            'class' => 'protected',
        ));
        echo $form->error($model, 'source');
        ?>
    </div>
</div>

<?php
if ($this->checkIfAddressBookIsPrivate()) {
    ?>
    <div id="addressRingtone" class="subsection">
        <h4><i class="icon-bell icon-fixed-width"></i>&nbsp;<?php echo __('ADDRESSESS_FORM_HEADER_RINGTONE'); ?></h4>
        <div class="row" style="display: none;">
            <?php
            echo $form->label($model, 'ringtone', array(
                'label' => '<i class="icon-volume-up icon-fixed-width"></i>',
            ));

            $ringtoneData = $this->getRingtoneData($model->contact_owner);
            echo $form->dropDownList(
                    $model, 'ringtone', $ringtoneData, array('id' => 'Addresses_ringtone_drop')
            );

            echo $form->textField($model, 'ringtone', array(
                'size' => 40,
                'maxlength' => 40,
                'disabled' => 'disabled',
                'data-placeholder' => $model->getAttributeLabel('ringtone')
            ));

            echo $form->error($model, 'ringtone');
            ?>

        </div>
    </div>
<?php
}