you can add multiple domains

This commit is contained in:
SJ 2013-10-16 15:26:16 +02:00
parent dae73a577a
commit 19de35f6e2
3 changed files with 4 additions and 2 deletions

View File

@ -99,6 +99,8 @@ class ModelDomainDomain extends Model {
public function addDomain($domain = '', $mapped = '', $ldap_id = 0) {
if($domain == "" || $mapped == "") { return 0; }
$query = $this->db->query("INSERT INTO " . TABLE_DOMAIN . " (domain, mapped, ldap_id) VALUES (?,?,?)", array($mapped, $mapped, $ldap_id));
$domains = explode("\n", $domain);
foreach ($domains as $domain) {

View File

@ -31,7 +31,7 @@
<div class="control-group<?php if(isset($errors['domain'])){ print " error"; } ?>">
<label class="control-label" for="domain"><?php print $text_domain; ?>:</label>
<div class="controls">
<input type="text" class="text" name="domain" placeholder="Domain"<?php if(isset($post['domain'])){ echo " value='".$post['domain']."'"; } ?> />
<textarea name="domain" placeholder="Domain"<?php if(isset($post['domain'])){ echo " value='".$post['domain']."'"; } ?> ></textarea>
<?php if ( isset($errors['domain']) ) { ?><span class="help-inline"><?php print $errors['domain']; ?></span><?php } ?>
</div>
</div>

View File

@ -26,7 +26,7 @@
<div id="ss1">
<div class="row">
<div class="domaincell"><?php print $text_domain; ?>:</div>
<div class="domaincell"><input type="text" class="text" name="domain" /></div>
<div class="domaincell"><textarea name="domain"></textarea></div>
</div>
<div class="row">
<div class="domaincell"><?php print $text_mapped_domain; ?>:</div>