<commit_before><div class="group-settings site">
    <p>
        Configure the way the app sends email.
    </p>
    <hr />
    <?php

        echo form_open();
        echo '<input type="hidden" name="activeTab" value="' . set_value('activeTab') . '" id="activeTab" />'

    ?>
    <ul class="tabs">
        <?php

        if (userHasPermission('admin:email:settings:update:sender')) {

            $active = $this->input->post('activeTab') == 'tab-sender' || !$this->input->post('activeTab') ? 'active' : '';

            ?>
            <li class="tab <?=$active?>">
                <a href="#" data-tab="tab-sender">Sender</a>
            </li>
            <?php
        }
        ?>
    </ul>
    <section class="tabs pages">
        <?php

        if (userHasPermission('admin:email:settings:update:sender')) {

            $display = $this->input->post('activeTab') == 'tab-sender' || !$this->input->post('activeTab') ? 'active' : '';

            ?>
            <div id="tab-sender" class="tab page <?=$display?>">
                <div class="fieldset">
                    <?php

                        $field                = array();
                        $field['key']         = 'from_name';
                        $field['label']       = 'From Name';
                        $field['default']     = app_setting($field['key'], 'email') ? app_setting($field['key'], 'email') : APP_NAME;
                        $field['placeholder'] = 'The name of the sender which recipients should see.';

                        echo form_field($field);

                        // --------------------------------------------------------------------------

                        $url     = parse_url(site_url());
                        $default = 'nobody@' . $url['host'];

                        $field                = array();
                        $field['key']         = 'from_email';
                        $field['label']       = 'From Email';
                        $field['default']     = app_setting($field['key'], 'email') ? app_setting($field['key'], 'email') : $default;
                        $field['placeholder'] = 'The email address of the sender which recipients should see.';
                        $field['info']        = '<strong>Note:</strong> If sending using SMTP to send email ensure this email is a valid account on the mail server. If it\'s not valid, some services will junk the email.';

                        echo form_field($field);

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

        ?>
    </section>
    <p>
        <?=form_submit('submit', lang('action_save_changes'), 'class="awesome"')?>
    </p>
    <?=form_close()?>
</div><commit_msg>Updated Tab handling<commit_after><div class="group-settings site">
    <p>
        Configure the way the app sends email.
    </p>
    <hr />
    <?php

        echo form_open();
        echo '<input type="hidden" name="activeTab" value="' . set_value('activeTab') . '" id="activeTab" />'

    ?>
    <ul class="tabs">
        <?php

        if (userHasPermission('admin:email:settings:update:sender')) {

            $active = $this->input->post('activeTab') == 'tab-sender' || !$this->input->post('activeTab') ? 'active' : '';

            ?>
            <li class="tab <?=$active?>">
                <a href="#" data-tab="tab-sender">Sender</a>
            </li>
            <?php
        }
        ?>
    </ul>
    <section class="tabs">
        <?php

        if (userHasPermission('admin:email:settings:update:sender')) {

            $display = $this->input->post('activeTab') == 'tab-sender' || !$this->input->post('activeTab') ? 'active' : '';

            ?>
            <div class="tab-page tab-sender <?=$display?>">
                <div class="fieldset">
                    <?php

                        $field                = array();
                        $field['key']         = 'from_name';
                        $field['label']       = 'From Name';
                        $field['default']     = app_setting($field['key'], 'email') ? app_setting($field['key'], 'email') : APP_NAME;
                        $field['placeholder'] = 'The name of the sender which recipients should see.';

                        echo form_field($field);

                        // --------------------------------------------------------------------------

                        $url     = parse_url(site_url());
                        $default = 'nobody@' . $url['host'];

                        $field                = array();
                        $field['key']         = 'from_email';
                        $field['label']       = 'From Email';
                        $field['default']     = app_setting($field['key'], 'email') ? app_setting($field['key'], 'email') : $default;
                        $field['placeholder'] = 'The email address of the sender which recipients should see.';
                        $field['info']        = '<strong>Note:</strong> If sending using SMTP to send email ensure this email is a valid account on the mail server. If it\'s not valid, some services will junk the email.';

                        echo form_field($field);

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

        ?>
    </section>
    <p>
        <?=form_submit('submit', lang('action_save_changes'), 'class="awesome"')?>
    </p>
    <?=form_close()?>
</div>
{'fraction_non_alphanumeric': 0.18825246260488873, 'fraction_numerical': 0.0, 'mean_word_length': 1.3943231441048034, 'pattern_counts': {'":': 0, '<': 67, '<?xml version=': 0, '>': 83, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4867027', 'n_tokens_mistral': 1453, 'n_tokens_neox': 1366, 'n_words': 315}