Mobilnummern mit Leerzeichen bereinigung/Zeiterfassung Erweiterungen
This commit is contained in:
@@ -76,7 +76,16 @@
|
||||
<div class="col-lg-3">
|
||||
<div class="form-check">
|
||||
<input class="form-check-input" <?php if ($timerecordingcategoriess->require_comment) echo 'checked="checked"'; ?>
|
||||
type="checkbox" name="require_comment" value="1" id="olt">
|
||||
type="checkbox" name="require_comment" value="1">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group row">
|
||||
<label class="col-lg-2 col-form-label" for="only_admin">Nur für Buchhaltung zu buchen</label>
|
||||
<div class="col-lg-3">
|
||||
<div class="form-check">
|
||||
<input class="form-check-input" <?php if ($timerecordingcategoriess->only_admin) echo 'checked="checked"'; ?>
|
||||
type="checkbox" name="only_admin" value="1">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -41,6 +41,7 @@
|
||||
<th class="text-center">Buchungszeitraum</th>
|
||||
<th class="text-center">Genehmigungspflichtig</th>
|
||||
<th class="text-center">Anmerkung Pflichtfeld</th>
|
||||
<th class="text-center">Nur Buchhaltung</th>
|
||||
<th class="edit-width"></th>
|
||||
</tr>
|
||||
<tr id="filterrow">
|
||||
@@ -50,6 +51,7 @@
|
||||
<th></th>
|
||||
<th></th>
|
||||
<th></th>
|
||||
<th></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@@ -60,6 +62,7 @@
|
||||
<td><?= $timerecordingcategorieshourday[$timerecordingcategories->hourday] ?></td>
|
||||
<td><?= $timerecordingcategoriesapproval[$timerecordingcategories->approval] ?></td>
|
||||
<td><?= $timerecordingcategoriesrequire_comment[$timerecordingcategories->require_comment] ?></td>
|
||||
<td><?= $timerecordingcategoriesrequire_comment[$timerecordingcategories->only_admin] ?></td>
|
||||
<td style="text-align: left; letter-spacing: 4px; font-size: 1.1em;">
|
||||
<a href="<?= self::getUrl("TimerecordingCategory", "edit", ["id" => $timerecordingcategories->id]) ?>"><i
|
||||
class="far fa-edit" title="Bearbeiten"></i></a>
|
||||
@@ -80,7 +83,7 @@
|
||||
|
||||
|
||||
<script type="text/javascript">
|
||||
var hidesearch = [5];
|
||||
var hidesearch = [6];
|
||||
|
||||
$(document).ready(function () {
|
||||
|
||||
|
||||
@@ -81,6 +81,7 @@ class TimerecordingCategoryController extends mfBaseController
|
||||
$data['hourday'] = trim($r->hourday);
|
||||
$data['approval'] = trim($r->approval);
|
||||
$data['require_comment'] = trim($r->require_comment);
|
||||
$data['only_admin'] = trim($r->only_admin);
|
||||
|
||||
|
||||
if (!$data['name']) {
|
||||
@@ -95,6 +96,9 @@ class TimerecordingCategoryController extends mfBaseController
|
||||
if (!$data['require_comment']) {
|
||||
$data['require_comment'] = 0;
|
||||
}
|
||||
if (!$data['only_admin']) {
|
||||
$data['only_admin'] = 0;
|
||||
}
|
||||
|
||||
// var_dump($_FILES);
|
||||
// var_dump($upload);
|
||||
|
||||
@@ -7,6 +7,7 @@ class TimerecordingCategoryModel
|
||||
private $hourday;
|
||||
private $approval;
|
||||
private $require_comment;
|
||||
private $only_admin;
|
||||
public static $hourday_definition = array(1 => "Uhrzeit (von/bis)", 2 => "Tage (von/bis)", 3 => "Startdatum", 4 => "Enddatum");
|
||||
public static $approval_definition = array(0 => "Nein", 1 => "Ja");
|
||||
public static $require_comment_definition = array(0 => "Nein", 1 => "Ja");
|
||||
|
||||
@@ -68,6 +68,7 @@ class UserProfileController extends mfBaseController
|
||||
$id = $this->me->id;
|
||||
$emailaddress = $this->me->email;
|
||||
$mobile = str_replace('+', '', $this->me->mobile);
|
||||
$mobile = str_replace(' ', '', $mobile);
|
||||
$verification = $r->twofactor;
|
||||
|
||||
$User = new User($id);
|
||||
@@ -207,6 +208,7 @@ class UserProfileController extends mfBaseController
|
||||
$id = $this->me->id;
|
||||
$emailaddress = $this->me->email;
|
||||
$mobile = str_replace('+', '', $this->me->mobile);
|
||||
$mobile = str_replace(' ', '', $mobile);
|
||||
$verification = $r->twofactor;
|
||||
|
||||
$User = new User($id);
|
||||
|
||||
@@ -61,6 +61,7 @@ class UserTwofactor
|
||||
$User = new User($id);
|
||||
$emailaddress = $User->email;
|
||||
$mobile = str_replace('+', '', $User->mobile);
|
||||
$mobile = str_replace(' ', '', $mobile);
|
||||
|
||||
$data = [];
|
||||
$data['twofactorcode'] = $code;
|
||||
|
||||
@@ -0,0 +1,32 @@
|
||||
<?php
|
||||
declare(strict_types=1);
|
||||
|
||||
use Phinx\Migration\AbstractMigration;
|
||||
|
||||
final class TimerecordingCategoryAddOnlyadmin extends AbstractMigration
|
||||
{
|
||||
public function up(): void
|
||||
{
|
||||
if ($this->getEnvironment() == "thetool") {
|
||||
$timerecordingCategory = $this->table("TimerecordingCategory");
|
||||
$timerecordingCategory->addColumn("only_admin", "integer", ["null" => false, "default" => "0", "after" => "require_comment"]);
|
||||
$timerecordingCategory->update();
|
||||
}
|
||||
|
||||
if ($this->getEnvironment() == "addressdb") {
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
public function down(): void
|
||||
{
|
||||
if ($this->getEnvironment() == "thetool") {
|
||||
$timerecordingCategory = $this->table("TimerecordingCategory");
|
||||
$timerecordingCategory->removeColumn("only_admin");
|
||||
$timerecordingCategory->save();
|
||||
}
|
||||
if ($this->getEnvironment() == "addressdb") {
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user