function rolesForm($roles = null, $access = array(), $navs = array()) { $CI =& get_instance(); $CI->make->sForm("admin/roles_db", array('id' => 'roles_form')); $CI->make->hidden('role_id', iSetObj($roles, 'id')); $CI->make->sBox('solid'); $CI->make->sBoxBody(); $CI->make->sDivRow(); $CI->make->sDivCol(4); $CI->make->input('Name', 'role', iSetObj($roles, 'role'), 'Role Name', array('class' => 'rOkay')); $CI->make->eDivCol(); $CI->make->sDivCol(5); $CI->make->input('Description', 'description', iSetObj($roles, 'description'), 'Role Description', array()); $CI->make->eDivCol(); $CI->make->sDivCol(3); $CI->make->button(fa('fa-save') . ' Save Details', array('id' => 'save-btn', 'style' => 'margin-top:23px;margin-right:10px;'), 'success'); $CI->make->A(fa('fa-reply') . " Back", base_url() . "admin/roles", array('id' => 'back-btn', 'class' => 'btn btn-primary', 'style' => 'margin-top:23px;margin-right:10px;')); $CI->make->eDivCol(); $CI->make->eDivRow(); $CI->make->eBoxBody(); $CI->make->eBox(); $CI->make->sDivRow(); foreach ($navs as $id => $nav) { $CI->make->sDivCol(4); if ($nav['exclude'] == 0) { $CI->make->sBox('info', array('class' => 'box-solid')); $CI->make->sBoxHead(array('style' => 'padding:0px;padding-left:10px;')); $check = false; if (in_array($id, $access)) { $check = true; } $checkbox = $CI->make->checkbox($nav['title'], 'roles[]', $id, array('return' => true, 'id' => $id, 'class' => 'check'), $check); $CI->make->boxTitle($checkbox, array('style' => 'margin:0px;padding:0px;font-size:16px;')); $CI->make->eBoxHead(); if (is_array($nav['path'])) { $CI->make->sBoxBody(array('class' => 'roles-form-div')); $CI->make->append(underRoles($nav['path'], $access, $id)); $CI->make->eBoxBody(); } $CI->make->eBox(); } $CI->make->eDivCol(); } $CI->make->eDivRow(); $CI->make->eForm(); return $CI->make->code(); }
function makeUserAccessForm($role = array()) { $CI =& get_instance(); $CI->make->sForm("user/user_access_db", array('id' => 'user_permissions_form')); $CI->make->sDivRow(array('style' => 'margin:10px;')); $CI->make->sDivCol(3); $CI->make->hidden('id', iSetObj($role, 'id')); $CI->make->input('Role Name', 'role', iSetObj($role, 'role'), 'Role', array('class' => 'rOkay')); $CI->make->eDivCol(); $CI->make->sDivCol(9); $CI->make->input('Description', 'description', iSetObj($role, 'description'), 'Description', array()); $CI->make->eDivCol(); $CI->make->eDivRow(); $CI->make->sDivRow(array('style' => 'margin:10px;')); // $CI->make->sDivCol(12); $CI->make->sBox('success'); $CI->make->sBoxHead(); $CI->make->boxTitle('Attendance'); $CI->make->eBoxHead(); $CI->make->sBoxBody(); // $list = array(); // // $icon = $CI->make->icon('fa-plus'); // $list[fa('fa-plus').' Add New'] = array('id'=>'add-new','class'=>'grp-list'); // foreach($lists as $val){ // $name = ""; // if(!is_array($desc)) // $name = $val->$desc; // else{ // foreach ($desc as $dsc) { // $name .= $val->$dsc." "; // } // } // $list[$name] = array('class'=>'grp-btn grp-list','id'=>'grp-list-'.$val->$ref,'ref'=>$val->$ref); // } // $CI->make->listGroup($list,array('id'=>'add-grp-list-div')); $CI->make->eBoxBody(); $CI->make->eBox(); // $CI->make->eDivCol(); $CI->make->eDivRow(); return $CI->make->code(); }
function makePromoDetailsLoad($promo = '', $promo_id = null, $items = null) { $CI =& get_instance(); $CI->make->sDivRow(); $CI->make->sDivCol(4, 'left'); $CI->make->sBox('primary'); $CI->make->sBoxBody(); $CI->make->sForm("settings/promo_details_db", array('id' => 'promo-form', 'enctype' => 'multipart/form-data')); $CI->make->hidden('promo_id', iSetObj($promo, 'promo_id')); // $CI->make->hidden('res_id',$promo_id); $CI->make->sDivRow(); $CI->make->sDivCol(); $CI->make->H(4, fa('fa-info-circle fa-fw') . ' General Details', array('class' => 'page-header')); $CI->make->eDivCol(); $CI->make->eDivRow(); $CI->make->sDivRow(); $CI->make->sDivCol(); $CI->make->input('Promo Code', 'promo_code', iSetObj($promo, 'promo_code'), 'Type Promo Code', array('class' => 'rOkay')); $CI->make->eDivCol(); $CI->make->eDivRow(); $CI->make->sDivRow(); $CI->make->sDivCol(); $CI->make->input('Promo Name', 'promo_name', iSetObj($promo, 'promo_name'), 'Type Promo Name', array('class' => 'rOkay')); $CI->make->eDivCol(); $CI->make->eDivRow(); $CI->make->sDivRow(); $CI->make->sDivCol(); $CI->make->input('Value', 'value', iSetObj($promo, 'value'), 'Type Promo Value', array('class' => 'rOkay')); $CI->make->eDivCol(); $CI->make->eDivRow(); $CI->make->sDivRow(); $CI->make->sDivCol(); $CI->make->inactiveDrop('Is Absolute', 'absolute', iSetObj($promo, 'absolute'), '', array('style' => 'width: 85px;')); $CI->make->eDivCol(); $CI->make->eDivRow(); $CI->make->sDivRow(); $CI->make->sDivCol(); $CI->make->inactiveDrop('Is Inactive', 'inactive', iSetObj($promo, 'inactive'), '', array('style' => 'width: 85px;')); $CI->make->eDivCol(); $CI->make->eDivRow(); $CI->make->sDivRow(); $CI->make->sDivCol(); $CI->make->button(fa('fa-save') . ' Save Promo Details', array('id' => 'save-btn', 'class' => 'btn-block'), 'primary'); $CI->make->eDivCol(); $CI->make->eDivRow(); $CI->make->eForm(); $CI->make->eBoxBody(); $CI->make->eBox(); $CI->make->eDivCol(); $CI->make->sDivCol(8, 'left', 0, array('id' => 'item-details-box')); $CI->make->sBox('primary'); $CI->make->sBoxBody(); $CI->make->sDivRow(); $CI->make->sDivCol(); $CI->make->H(4, fa('fa-archive') . ' Promo Duration', array('class' => 'page-header')); $CI->make->eDivCol(); $CI->make->eDivRow(); $CI->make->sForm("settings/promo_discount_sched_db", array('id' => 'promo-details-form')); $CI->make->hidden('promo_id', iSetObj($promo, 'promo_id')); $CI->make->sDivRow(); $CI->make->sDivCol(3); $CI->make->time('Time On', 'time-on', null, 'Time On'); $CI->make->eDivCol(); $CI->make->sDivCol(3); $CI->make->time('Time Off', 'time-off', null, 'Time Off'); $CI->make->eDivCol(); $CI->make->sDivCol(3); $CI->make->dayDrop('Day', 'day', null, '', array('style' => 'width: inherit;')); $CI->make->eDivCol(); $CI->make->sDivCol(3); $CI->make->button(fa('fa-plus') . ' Add Schedule', array('id' => 'add-schedule', 'style' => 'margin-top:23px;'), 'primary'); $CI->make->eDivCol(); $CI->make->eDivRow(); $CI->make->eForm(); $CI->make->sDivRow(); $CI->make->sDivCol(); $CI->make->sDiv(array('class' => 'table-responsive')); $CI->make->sTable(array('class' => 'table table-striped', 'id' => 'details-tbl')); $CI->make->sRow(); // $CI->make->th('DAY'); $CI->make->th('DAY', array('style' => 'width:60px;')); $CI->make->th('TIME ON', array('style' => 'width:60px;')); $CI->make->th('TIME OFF', array('style' => 'width:60px;')); $CI->make->th(' ', array('style' => 'width:40px;')); $CI->make->eRow(); $total = 0; if (count($items) > 0) { foreach ($items as $res) { $CI->make->sRow(array('id' => 'row-' . $res->id)); $CI->make->td(date('l', strtotime($res->day))); $CI->make->td($res->time_on); $CI->make->td($res->time_off); $a = $CI->make->A(fa('fa-trash-o fa-fw fa-lg'), '#', array('id' => 'del-' . $res->id, 'class' => 'dels', 'ref' => $res->id, 'return' => true)); $CI->make->td($a); $CI->make->eRow(); // $total += $price * $res->qty; } } $CI->make->eTable(); $CI->make->eDiv(); $CI->make->eDivCol(); $CI->make->eDivRow(); $CI->make->eBoxBody(); $CI->make->eBox(); $CI->make->eDivCol(); $CI->make->eDivRow(); return $CI->make->code(); }