mirror of
https://github.com/FOSSBilling/FOSSBilling.git
synced 2026-11-21 20:34:57 +09:00
client_groups functionality added to promo update function
This commit is contained in:
1 parent
2e044c27d4
commit
bfeb22c543
2 files changed
+20
No files matched your search
@@ -672,6 +672,14 @@ class Service implements InjectionAwareInterface
|
||||
}
|
||||
}
|
||||
|
||||
if(isset($data['client_groups'])) {
|
||||
if(empty($data['client_groups'])) {
|
||||
$model->client_groups = NULL;
|
||||
} else {
|
||||
$model->client_groups = json_encode($data['client_groups']);
|
||||
}
|
||||
}
|
||||
|
||||
if(isset($data['periods']) && is_array($data['periods'])) {
|
||||
$model->periods = json_encode($data['periods']);
|
||||
}
|
||||
|
||||
@@ -131,6 +131,18 @@
|
||||
</div>
|
||||
<div class="fix"></div>
|
||||
</div>
|
||||
<div class="rowElem">
|
||||
<label>{% trans 'Periods (Select none to apply to all client groups)' %}</label>
|
||||
<div class="formRight">
|
||||
{% set client_groups = admin.client_group_get_pairs %}
|
||||
<select name="client_groups[]" multiple="multiple" class="multiple" size="{{groups|length}}">
|
||||
{% for id, client_group in client_groups %}
|
||||
<option value="{{id}}" {% if id in promo.client_groups %}selected="selected"{% endif %}>{{ client_group }}</option>
|
||||
{% endfor %}
|
||||
</select>
|
||||
</div>
|
||||
<div class="fix"></div>
|
||||
</div>
|
||||
<input type="submit" value="{% trans 'Update' %}" class="greyishBtn submitForm" />
|
||||
<input type="hidden" name="id" value="{{ promo.id }}" />
|
||||
</fieldset>
|
||||
|
||||
Reference in new issue
Block a user