Ejemplo n.º 1
0
<?php

$this->layout->set_partial('header', HC_Html::page_header(HC_Html_Factory::element('h2')->add_child(HCM::__('Log In'))));
$app_conf = HC_App::app_conf();
if ($app_conf->get('login_with') == 'username') {
    $identity_label = HCM::__('Username');
} else {
    $identity_label = HCM::__('Email');
}
$display_form = HC_Html_Factory::widget('form')->add_attr('action', HC_Lib::link('auth/login')->url())->add_attr('class', 'form-horizontal')->add_attr('class', 'form-condensed');
$display_form->add_item(HC_Html_Factory::widget('label_row')->set_label($identity_label)->set_content($form->input('identity')->add_attr('placeholder', $identity_label))->set_error($form->input('identity')->error()));
$display_form->add_item(HC_Html_Factory::widget('label_row')->set_label(HCM::__('Password'))->set_content($form->input('password')->add_attr('placeholder', HCM::__('Password')))->set_error($form->input('password')->error()));
$display_form->add_item(HC_Html_Factory::widget('label_row')->set_content(HC_Html_Factory::element('input')->add_attr('type', 'submit')->add_attr('class', array('btn', 'btn-default'))->add_attr('title', HCM::__('Log In'))->add_attr('value', HCM::__('Log In'))));
$out = HC_Html_Factory::widget('list')->add_attr('class', 'list-unstyled')->add_attr('class', 'list-separated');
$out->add_item($display_form);
$out->add_item(HC_Html_Factory::widget('titled', 'a')->add_attr('href', HC_Lib::link('auth/forgot_password'))->add_child(HCM::__('Lost your password?')));
echo $out->render();
Ejemplo n.º 2
0
<?php

$this->layout->set_partial('header', HC_Html::page_header(HC_Html_Factory::element('h2')->add_child($page_title)));
$out = HC_Html_Factory::widget('list')->add_attr('class', 'list-unstyled')->add_attr('class', 'list-separated');
if ($offer_upgrade) {
    $link = HC_Lib::link('setup/upgrade');
    $out->add_item(HC_Html_Factory::element('a')->add_attr('href', $link->url())->add_child('You seem to have an older version already installed. Please click here to upgrade.'));
    $out->add_item('Or continue below to install from scratch.');
}
$link = HC_Lib::link('setup/run');
$display_form = HC_Html_Factory::widget('form')->add_attr('action', $link->url())->add_attr('class', 'form-horizontal')->add_attr('class', 'form-condensed');
$display_form->add_item(HC_Html_Factory::widget('label_row')->set_content(HC_Html_Factory::element('h4')->add_child(HCM::__('Admin')))->set_content_static());
$display_form->add_item(HC_Html_Factory::widget('label_row')->set_label(HCM::__('First Name'))->set_content($form->input('first_name')->add_attr('size', 24))->set_error($form->input('first_name')->error()));
$display_form->add_item(HC_Html_Factory::widget('label_row')->set_label(HCM::__('Last Name'))->set_content($form->input('last_name')->add_attr('size', 24))->set_error($form->input('last_name')->error()));
$display_form->add_item(HC_Html_Factory::widget('label_row')->set_label(HCM::__('Email'))->set_content($form->input('email')->add_attr('size', 48))->set_error($form->input('email')->error()));
$display_form->add_item(HC_Html_Factory::widget('label_row')->set_label(HCM::__('Password'))->set_content($form->input('password')->add_attr('size', 24))->set_error($form->input('password')->error()));
$display_form->add_item(HC_Html_Factory::widget('label_row')->set_label(HCM::__('Confirm Password'))->set_content($form->input('confirm_password')->add_attr('size', 24))->set_error($form->input('confirm_password')->error()));
$buttons = HC_Html_Factory::widget('list')->add_attr('class', array('list-inline', 'list-separated'));
$buttons->add_item(HC_Html_Factory::element('input')->add_attr('type', 'submit')->add_attr('class', array('btn', 'btn-default'))->add_attr('title', 'Proceed To Setup')->add_attr('value', 'Proceed To Setup'));
$display_form->add_item(HC_Html_Factory::widget('label_row')->set_content($buttons));
$out->add_item($display_form);
echo $out->render();
Ejemplo n.º 3
0
<?php

$header = HC_Html_Factory::widget('list')->add_attr('class', 'list-unstyled')->add_item('title', HC_Html_Factory::element('h2')->add_child($object->present_title()));
/* 
$header->add_item(
	'staff',
	$object->present_user()
	);
*/
echo HC_Html::page_header($header);
Ejemplo n.º 4
0
<?php

echo HC_Html::page_header(HC_Html_Factory::element('h2')->add_child(HCM::__('Users')));
Ejemplo n.º 5
0
<?php

$this->layout->set_partial('header', HC_Html::page_header(HC_Html_Factory::element('h2')->add_child($app_title . ': Installation')->add_child('<br>')->add_child(HC_Html_Factory::element('small')->add_child('Import User Accounts'))));
$out = HC_Html_Factory::widget('list')->add_attr('class', 'list-unstyled')->add_attr('class', 'list-separated');
if (isset($offer_upgrade) && $offer_upgrade) {
    $link = HC_Lib::link('setup/upgrade');
    $out->add_item(HC_Html_Factory::element('a')->add_attr('href', $link->url())->add_child('You seem to have an older version already installed. Click here to upgrade.'));
    $out->add_item('continue', 'Or continue below to install from scratch.');
    $out->add_item_attr('continue', 'style', 'margin-bottom: 1em;');
}
$out->add_item('Import user accounts from WordPress into ' . $app_title . '.');
$link = HC_Lib::link($post_to);
$display_form = HC_Html_Factory::widget('form')->add_attr('action', $link->url())->add_attr('class', 'form-horizontal')->add_attr('class', 'form-condensed');
$table = HC_Html_Factory::widget('table')->add_attr('class', array('table', 'table-striped', 'table-condensed'));
$table->set_header(array('WordPress', $app_title));
foreach ($wordpress_roles as $role_value => $role_name) {
    $this_role_count = isset($wordpress_count_users['avail_roles'][$role_value]) ? $wordpress_count_users['avail_roles'][$role_value] : 0;
    $row = array();
    $row[] = $role_name . ' [' . $this_role_count . ']';
    if ($role_value) {
        if ($role_value == 'administrator') {
            $default = USER_HC_MODEL::LEVEL_ADMIN;
        } else {
            if ($this_role_count) {
                $default = USER_HC_MODEL::LEVEL_STAFF;
            } else {
                $default = 0;
            }
        }
    } else {
        $default = 0;
Ejemplo n.º 6
0
<?php

echo HC_Html::page_header(HC_Html_Factory::widget('list')->add_attr('class', 'list-unstyled')->add_item(HC_Html_Factory::element('h2')->add_child($object->present_title()))->add_item($object->present_title_misc()));
Ejemplo n.º 7
0
<?php

$this->layout->set_partial('header', HC_Html::page_header(HC_Html_Factory::element('h2')->add_child(HCM::__('Add New Shift Template'))));
$link = HC_Lib::link('admin/shift_templates/insert');
$display_form = HC_Html_Factory::widget('form')->add_attr('action', $link->url())->add_attr('class', 'form-horizontal')->add_attr('class', 'form-condensed');
$display_form->add_item(HC_Html_Factory::widget('label_row')->set_label(HCM::__('Name'))->set_content($form->input('name')->add_attr('size', 32))->set_error($form->input('name')->error()));
$display_form->add_item(HC_Html_Factory::widget('label_row')->set_label(HCM::__('Time'))->set_content($form->input('time'))->set_error($form->input('time')->error()));
$buttons = HC_Html_Factory::widget('list')->add_attr('class', array('list-inline', 'list-separated'));
$buttons->add_item(HC_Html_Factory::element('input')->add_attr('type', 'submit')->add_attr('class', array('btn', 'btn-default'))->add_attr('title', HCM::__('Add New Shift Template'))->add_attr('value', HCM::__('Add New Shift Template')));
$display_form->add_item(HC_Html_Factory::widget('label_row')->set_content($buttons));
$out = HC_Html_Factory::widget('container');
$out->add_item($display_form);
echo $out->render();
Ejemplo n.º 8
0
<?php

$header_text = HCM::__('Add');
$type = $params->get('type');
if ($type !== NULL) {
    $shift = HC_App::model('shift');
    switch ($type) {
        case $shift->_const('TYPE_TIMEOFF'):
            $header_text = sprintf(HCM::_n('Request New Timeoff', 'Request %d New Timeoffs', 1), 1);
            break;
        case $shift->_const('TYPE_SHIFT'):
            $header_text = sprintf(HCM::_n('Add New Shift', 'Add %d New Shifts', 1), 1);
            break;
    }
}
$header = HC_Html_Factory::widget('list')->add_attr('class', 'list-unstyled');
$header->add_item($header_text);
echo HC_Html::page_header(HC_Html_Factory::element('h2')->add_child($header));