compiling css + assigning user to new company in options (admin)

This commit is contained in:
2016-04-16 22:30:47 +02:00
parent 9b0d1d0cb9
commit 7fecaa602f
7 changed files with 28 additions and 4202 deletions
+7
View File
@@ -862,6 +862,13 @@ class Databap extends PhpObject
return $bExt?$this->getJsonPostResult($bSuccess, $sDesc):$iCompanyId;
}
public function assignUser($iUserId, $iCompany, $bExt=true)
{
$iUserId = $this->oMySql->updateRow(self::USER_TABLE, $iUserId, array(MySqlManager::getId(self::COMP_TABLE)=>$iCompany));
return $bExt?$this->getJsonPostResult(true, ''):$iUserId;
}
public function buildCompleteIndex()
{
Regular → Executable
+3
View File
@@ -208,6 +208,9 @@ if($bUserOk && $sAction!=Databap::EXT_ACCESS)
case 'reset_pass':
$sResult = $oDatabap->resetPass($oUser);
break;
case 'assign_user':
$sResult = $oDatabap->assignUser($oUser, $sCompany);
break;
case 'build_index':
$oDatabap->buildCompleteIndex();
$sResult = 'Index ok';
+12
View File
@@ -33,6 +33,13 @@
<p><input type="text" class="tiny_round" id="company" name="company" /></p>
</form>
</div>
<div id="assign_user" class="magic_box tiny_round">
<h3><i class="fa fa-inline fa-c-profile"></i>Changer de boite</h3>
<form id="form_assign_user" name="form_assign_user">
<p id="assign_users"></p>
<p id="assign_companies"></p>
</form>
</div>
<div id="reset_pass" class="magic_box tiny_round">
<h3><i class="fa fa-inline fa-c-unlock"></i>Réinitialiser mdp</h3>
<form id="form_reset_pass" name="form_reset_pass">
@@ -109,6 +116,11 @@ function initAdminPanel(asAdmin)
addSelect($('#users'), asAdmin.users, 0, 'user');
$('#form_reset_pass').addButton('refresh', 'Reset', function(){submitAdmin('reset_pass');}, 'submit_reset_pass', 'heavy inverse');
//Assign user to company
addSelect($('#assign_companies'), asAdmin.companies, 0, 'company');
addSelect($('#assign_users'), asAdmin.users, 0, 'user');
$('#form_assign_user').addButton('ok', 'Assigner', function(){submitAdmin('assign_user');}, 'assign_user', 'heavy inverse');
//Show panel
$('#admin').show();
}
+2 -2922
View File
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
+2 -1278
View File
File diff suppressed because one or more lines are too long
+1 -1
View File
File diff suppressed because one or more lines are too long