예제 #1
0
<?php

$working_days = erp_company_get_working_days();
$options = array('8' => __('Full Day', 'wp-erp'), '4' => __('Half Day', 'wp-erp'), '0' => __('Non-working Day', 'wp-erp'));
$days = array('mon' => __('Monday', 'wp-erp'), 'tue' => __('Tuesday', 'wp-erp'), 'wed' => __('Wednesday', 'wp-erp'), 'thu' => __('Thursday', 'wp-erp'), 'fri' => __('Friday', 'wp-erp'), 'sat' => __('Saturday', 'wp-erp'), 'sun' => __('Sunday', 'wp-erp'));
?>

<form action="" method="post">

    <ul class="erp-list separated">
    <?php 
foreach ($days as $key => $day) {
    erp_html_form_input(array('label' => $day, 'name' => 'day[' . $key . ']', 'value' => $working_days[$key], 'type' => 'select', 'tag' => 'li', 'options' => $options));
}
?>
    </ul>

    <input type="hidden" name="erp-action" value="settings-save-work-days">

    <?php 
wp_nonce_field('erp-settings');
?>
    <?php 
submit_button(__('Save Changes', 'wp-erp'), 'primary');
?>
</form>
예제 #2
0
    public function setup_step_workdays()
    {
        $working_days = erp_company_get_working_days();
        $options = array('8' => __('Full Day', 'wp-erp'), '4' => __('Half Day', 'wp-erp'), '0' => __('Non-working Day', 'wp-erp'));
        $days = array('mon' => __('Monday', 'wp-erp'), 'tue' => __('Tuesday', 'wp-erp'), 'wed' => __('Wednesday', 'wp-erp'), 'thu' => __('Thursday', 'wp-erp'), 'fri' => __('Friday', 'wp-erp'), 'sat' => __('Saturday', 'wp-erp'), 'sun' => __('Sunday', 'wp-erp'));
        ?>
        <h1><?php 
        _e('Workdays Setup', 'woocommerce');
        ?>
</h1>
        <form method="post">

            <table class="form-table">

                <?php 
        foreach ($days as $key => $day) {
            ?>
                    <tr>
                        <th scope="row"><label for="gen_financial_month"><?php 
            echo $day;
            ?>
</label></th>
                        <td>
                            <?php 
            erp_html_form_input(array('name' => 'day[' . $key . ']', 'value' => $working_days[$key], 'type' => 'select', 'options' => $options));
            ?>
                        </td>
                    </tr>
                <?php 
        }
        ?>

            </table>

            <?php 
        $this->next_step_buttons();
        ?>
        </form>
        <?php 
    }