Beispiel #1
0
<div class="panel panel-default" style="margin-top: 15px">
<div class="panel-heading">Manage tasks<div class="text-right" style="padding-top: 5px; padding-right:5px">
            <button class="btn btn-success" id="button-task-create">Create</button>
        </div></div>
<div class="panel-body">
    <div >
        <div class="form-group">
            <label for="input_task_name">Name</label>
            <input type="text" class="form-control" id="input_task_name"/>
        </div>

        <div class="form-group">
            <label for="input_task_type">Task Type</label>
            <select class="form-control" id="input_task_type">
            ';
$task = CAdmin::getTaskTypeArray();
foreach ($task as $t) {
    $id = $t['id'];
    $name = $t['name'];
    $content .= "<option value='{$id}'>{$name}</option>";
}
$content .= '
            </select>
        </div>
        <div class="form-group">
    <label for="select_group">Group</label>
    <select class="form-control" id="input_task_group">
    <option value="0">Common task</option>
    ';
$task = CAdmin::getGroupArray();
foreach ($task as $t) {
Beispiel #2
0
                $id = intval($v);
                if ($id > 0 && !is_array($v)) {
                    $ans = CAdmin::removeTaskType($id);
                    echo $ans ? "OK" : "Can't remove task type";
                    exit;
                } else {
                    exit;
                }
            } else {
                exit;
            }
            break;
        default:
            exit;
    }
}
$content = "<div class='container'><div class='page-header'> ";
$content = "<div class='panel'>\n<form class=\"form-inline toggle-disabled\" method='post'>\n  <div class=\"form-group\">\n    <label for=\"name\">Name</label>\n    <input type=\"text\" name='name' class=\"form-control valid\"  placeholder=\"MAKEGODMINE\"\n     data-validation-event='keyup'\n     data-validation=\"alphanumeric,required,length\"\n     data-validation-length=\"2-64\"\n     >\n  </div>\n  <button type='submit' class=\"btn btn-default\">Add Task Type</button>\n  <button class=\"btn btn-info media-right\" id='button-refresh-table'>Refresh Table</button>\n</form>\n<script>\n\$.validate({\n    modules :  'security, toggleDisabled',\n    disabledFormFilter : 'form.toggle-disabled',\n    onModulesLoaded : function() {\n        console.log('validators loaded');\n    }\n  });\n</script>\n</div>";
$content .= "<table class='table table-hover'>\n<thead>\n<tr>\n    <td>#</td>\n    <td>Task Type Name</td>\n    <td>Created</td>\n    <td></td>\n</tr>\n</thead>\n<tbody>";
$users = CAdmin::getTaskTypeArray();
$i = 0;
foreach ($users as $u) {
    $i++;
    $date = date("d-m-Y", strtotime($u["created"]));
    $id = $u['id'];
    $actions = "<a href='#' class=\"glyphicon glyphicon-remove button_tt_remove\" data-target='{$id}' aria-hidden=\"true\"  style=\"text-decoration: none\"/>";
    $content .= "<tr id='tt-row-{$id}'><td>{$i}</td><td>{$u["name"]}</td><td>{$date}</td><td>{$actions}</td></tr>";
}
$content .= "</tbody></table>";
$content .= "</div></div>";
include "_main.html";