Settings for allowed domain are now processed and saved correct

This commit is contained in:
Johannes Starosta 2015-07-13 02:23:40 +02:00
parent b665d1c11a
commit 18b4911038
3 changed files with 6 additions and 9 deletions

View File

@ -21,6 +21,7 @@ use \OCP\IGroupManager;
use \OCP\IL10N;
use \OCP\IConfig;
use \OCP\IUser;
use \OCP\AppFramework\Http\JSONResponse;
class SettingsController extends Controller {

View File

@ -1,11 +1,8 @@
$(document).ready(function() {
function saveSettings() {
var post1 = $('#registered_user_group').serialize();
var post2 = $('#allowed_domains').serialize();
console.log(post1);
console.log(post2);
$.post(OC.generateUrl('/apps/registration/settings'), post1,post2);
var post = $('#registration').serialize();
console.log(post);
$.post(OC.generateUrl('/apps/registration/settings'), post);
}
$('#registered_user_group').change(saveSettings);

View File

@ -17,8 +17,7 @@ foreach ( $_['groups'] as $group ) {
</p>
<p>
<label for="allowed_domains"><?php p($l->t('Allowed domains for registration')); ?></label>
<input type="text" id="allowed_domains" name="allowed_domains" value=<?php p($allowed);?>>
<button class="save"><?php p($l->t('Save'));?></button>
<input type="text" id="allowed_domains" name="allowed_domains" value=<?php p($_['allowed']);?>>
</p>
</form>
</p>