mirror of https://github.com/jumpserver/jumpserver
parent
695e4da85e
commit
2ec0ab871a
@ -1,72 +0,0 @@
|
||||
{% extends '_modal.html' %}
|
||||
{% load i18n %}
|
||||
{% load bootstrap3 %}
|
||||
{% block modal_id %}user_bulk_update_modal{% endblock %}
|
||||
{% block modal_class %}modal-lg{% endblock %}
|
||||
{% block modal_title%}{% trans "Update selected user" %}{% endblock %}
|
||||
{% block modal_body %}
|
||||
{% block form %}
|
||||
<div class="ydxbd" id="formlists" style="display: block;">
|
||||
<p id="tags_p" class="mgl-5 c02">选择需要修改属性</p>
|
||||
<div class="tagBtnList">
|
||||
<a class="label label-primary" id="change_all" value="1">全选</a>
|
||||
{% for field in form %}
|
||||
{# {% if field.name != 'assets' %}#}
|
||||
<a data-id="{{ field.id_for_label }}" class="label label-default label-primary field-tag" value="1">{{ field.label }}</a>
|
||||
{# {% endif %}#}
|
||||
{% endfor %}
|
||||
</div>
|
||||
</div>
|
||||
<form method="post" class="form-horizontal" id="add_form">
|
||||
{% csrf_token %}
|
||||
{% bootstrap_form form layout="horizontal" %}
|
||||
<div class="form-group abc">
|
||||
<div class="col-sm-4 col-sm-offset-2">
|
||||
<button class="btn btn-white" type="reset">{% trans 'Reset' %}</button>
|
||||
<button class="btn btn-primary" type="submit">{% trans 'Submit' %}</button>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
{% endblock %}
|
||||
{% endblock %}
|
||||
{#{% block custom_foot_js %}#}
|
||||
{#<script>#}
|
||||
{# $(document).ready(function () {#}
|
||||
{# $('.select2').select2();#}
|
||||
{# }).on('click', '.field-tag', function() {#}
|
||||
{# changeField(this);#}
|
||||
{# }).on('click', '#change_all', function () {#}
|
||||
{# var tag_fields = $('.field-tag');#}
|
||||
{# var $this = $(this);#}
|
||||
{# var active = '1';#}
|
||||
{# if ($this.attr('value') == '0'){#}
|
||||
{# active = '0';#}
|
||||
{# $this.attr('value', '1').addClass('label-primary')#}
|
||||
{# } else {#}
|
||||
{# active = '1';#}
|
||||
{# $this.attr('value', '0').removeClass('label-primary')#}
|
||||
{# }#}
|
||||
{# $.each(tag_fields, function (k, v) {#}
|
||||
{# changeField(v, active)#}
|
||||
{# })#}
|
||||
{# });#}
|
||||
{##}
|
||||
{# function changeField(obj, active) {#}
|
||||
{# var $this = $(obj);#}
|
||||
{# var field_id = $this.data('id');#}
|
||||
{# if (!active) {#}
|
||||
{# active = $this.attr('value');#}
|
||||
{# }#}
|
||||
{# if (active == '0') {#}
|
||||
{# $this.attr('value', '1').addClass('label-primary');#}
|
||||
{# var form_groups = $('#add_form .form-group:not(.abc)');#}
|
||||
{# form_groups.filter(':has(#' + field_id + ')').show().find('select,input').prop('disabled', false)#}
|
||||
{# } else {#}
|
||||
{# $this.attr('value', '0').removeClass('label-primary');#}
|
||||
{# var form_groups = $('#add_form .form-group:not(.abc)');#}
|
||||
{# form_groups.filter(':has(#' + field_id + ')').hide().find('select,input').prop('disabled', true)#}
|
||||
{# }#}
|
||||
{# }#}
|
||||
{#</script>#}
|
||||
{#{% endblock %}#}
|
||||
|
Loading…
Reference in new issue