mirror of
https://github.com/YunoHost/yunohost-admin.git
synced 2024-09-03 20:06:15 +02:00
Remove line about defining a quota because that's not that necessary and made the form ugly + simply controller code
This commit is contained in:
parent
4e1c5ce424
commit
f0b1a0bbce
2 changed files with 12 additions and 27 deletions
|
@ -197,25 +197,20 @@
|
|||
|
||||
// Create user (POST)
|
||||
app.post('#/users/create', function (c) {
|
||||
if (c.params['password'] == c.params['confirmation']) {
|
||||
if (c.params['password'] != c.params['confirmation']) {
|
||||
c.flash('fail', y18n.t('passwords_dont_match'));
|
||||
return;
|
||||
}
|
||||
if (c.params['password'].length < PASSWORD_MIN_LENGTH) {
|
||||
c.flash('fail', y18n.t('passwords_too_short'));
|
||||
return;
|
||||
}
|
||||
else {
|
||||
// Force unit or disable quota
|
||||
if (c.params['mailbox_quota']) {
|
||||
c.params['mailbox_quota'] += "M";
|
||||
}
|
||||
else {c.params['mailbox_quota'] = 0;}
|
||||
|
||||
c.params['domain'] = c.params['domain'].slice(1);
|
||||
|
||||
c.api('POST', '/users', c.params.toHash(), function(data) {
|
||||
c.redirect_to('#/users');
|
||||
});
|
||||
}
|
||||
} else {
|
||||
c.flash('fail', y18n.t('passwords_dont_match'));
|
||||
}
|
||||
});
|
||||
|
||||
// Show user information
|
||||
|
|
|
@ -57,16 +57,6 @@
|
|||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="mailbox-quota" class="col-sm-3 control-label">{{t 'user_mailbox_quota'}}</label>
|
||||
<div class="col-sm-4">
|
||||
<div class="input-group">
|
||||
<input type="number" min="0" id="mailbox-quota" name="mailbox_quota" class="form-control" placeholder="{{t 'mailbox_quota_placeholder'}}">
|
||||
<div class="input-group-addon">M</div>
|
||||
</div>
|
||||
<div class="help-block quota-help-block">{{t 'mailbox_quota_description'}}</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
|
Loading…
Add table
Reference in a new issue