Add missing webmail activation/deactivation config
This commit is contained in:
parent
862719006a
commit
5f2a2d4878
|
@ -117,6 +117,7 @@ if (!empty($_POST['isactive']) && $server->isSuperAdmin()) {
|
|||
<th width="100px">Actif</th>
|
||||
<th width="100px">Admin</th>
|
||||
<th width="100px">POP / IMAP</th>
|
||||
<th width="100px">Webmail</th>
|
||||
<th width="100px">Auth SMTP</th>
|
||||
<th>Quota</th>
|
||||
<th width="50px">Suppr</th>
|
||||
|
@ -143,6 +144,11 @@ if (!empty($_POST['isactive']) && $server->isSuperAdmin()) {
|
|||
} else {
|
||||
print '<td><span class="glyphicon glyphicon-remove"></span></td>';
|
||||
}
|
||||
if ($account->isWebmail()) {
|
||||
print '<td><span class="glyphicon glyphicon-ok"></span></td>';
|
||||
} else {
|
||||
print '<td><span class="glyphicon glyphicon-remove"></span></td>';
|
||||
}
|
||||
if ($account->isAuthSmtp()) {
|
||||
print '<td><span class="glyphicon glyphicon-ok"></span></td>';
|
||||
} else {
|
||||
|
|
|
@ -24,16 +24,17 @@ if (!empty($_POST['cn'])) {
|
|||
$actif = (!empty($_POST['isactive'])) ? true : false;
|
||||
$admin = (!empty($_POST['isadmin'])) ? true : false;
|
||||
$courier = (!empty($_POST['courieractive'])) ? true : false;
|
||||
$webmail = (!empty($_POST['webmailactive'])) ? true : false;
|
||||
$authsmtp = (!empty($_POST['authsmtpactive'])) ? true : false;
|
||||
|
||||
try {
|
||||
if (!empty($_GET['account'])) {
|
||||
print "<div class=\"alert alert-info\" role=\"alert\">Modification en cours...</div>";
|
||||
$account->update($cn,$password,$actif,$admin,$actif,$courier,$authsmtp);
|
||||
$account->update($cn,$password,$actif,$admin,$actif,$courier,$webmail,$authsmtp);
|
||||
header('Location: compte.php?domain='.$domain->getName().'&account='.$account->getUid());
|
||||
} else {
|
||||
print "<div class=\"alert alert-info\" role=\"alert\">Ajout en cours...</div>";
|
||||
$domain->addAccount($uid,$cn,$password,$actif,$admin,$actif,$courier,$authsmtp);
|
||||
$domain->addAccount($uid,$cn,$password,$actif,$admin,$actif,$courier,$webmail,$authsmtp);
|
||||
print "<div class=\"alert alert-succes\" role=\"alert\">Ajout effectué.</div>";
|
||||
print '<a href="compte.php?domain='.$domain->getName().'&account='.$uid.'@'.$domain->getName().'"><button class="btn btn-primary">Voir le compte créé</button></a>';
|
||||
}
|
||||
|
@ -129,6 +130,13 @@ if (isset($_GET['account'])) {
|
|||
print "<div class='col-sm-2 control-label'></div>";
|
||||
print "</div>";
|
||||
|
||||
$webmailactive = ($account->isWebmail()) ? 'checked="checked"' : '';
|
||||
print "<div class='form-group'>";
|
||||
print "<label for='webmailactive' class='col-sm-3 control-label'>Webmail : </label>";
|
||||
print "<div class='col-sm-7'><input type='checkbox' name='webmailactive' $webmailactive class='form-control move-left' /></div>";
|
||||
print "<div class='col-sm-2 control-label'></div>";
|
||||
print "</div>";
|
||||
|
||||
$authsmtpactive = ($account->isAuthSmtp()) ? 'checked="checked"' : '';
|
||||
print "<div class='form-group'>";
|
||||
print "<label for='authsmtpactive' class='col-sm-3 control-label'>Authentification SMTP : </label>";
|
||||
|
@ -221,9 +229,15 @@ if (isset($_GET['account'])) {
|
|||
<div class="col-sm-2 control-label"></div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label for="webmailactive" class="col-sm-3 control-label">Webmail :</label>
|
||||
<div class="col-sm-7"><input type='checkbox' name='webmailactive' checked class="form-control move-left" /></div>
|
||||
<div class="col-sm-3 control-label"></div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label for="authsmtpactive" class="col-sm-3 control-label">Authentification SMTP :</label>
|
||||
<div class="col-sm-7"><input type='checkbox' name='authsmtpactive' class="form-control move-left" /></div>
|
||||
<div class="col-sm-7"><input type='checkbox' name='authsmtpactive' checked class="form-control move-left" /></div>
|
||||
<div class="col-sm-3 control-label"></div>
|
||||
</div>
|
||||
|
||||
|
|
|
@ -19,6 +19,7 @@ class LdapAccount extends LdapDomain {
|
|||
$this->active = ($object['isactive'][0] == 'TRUE') ? true : false;
|
||||
$this->admin = ($object['isadmin'][0] == 'TRUE') ? true : false;
|
||||
$this->courier = ($object['courieractive'][0] == 'TRUE') ? true : false;
|
||||
$this->webmail = ($object['webmailactive'][0] == 'TRUE') ? true : false;
|
||||
$this->authsmtp = ($object['authsmtpactive'][0] == 'TRUE') ? true : false;
|
||||
//$this->quota = getquota($this->domain->getName(),'user');
|
||||
$this->aliases = array_filter($object['mailacceptinggeneralid'], "is_string");
|
||||
|
@ -74,6 +75,10 @@ class LdapAccount extends LdapDomain {
|
|||
return $this->courier;
|
||||
}
|
||||
|
||||
public function isWebmail() {
|
||||
return $this->webmail;
|
||||
}
|
||||
|
||||
public function isAuthSmtp() {
|
||||
return $this->authsmtp;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue