|
@@ -16,24 +16,26 @@
|
|
|
<input type="hidden" name="form_submit" value="ok"/>
|
|
|
<input type="hidden" name="mchid" value="<?php echo $output['merchant']['mchid'];?>"/>
|
|
|
<table class="table tb-type2">
|
|
|
- <tbody>
|
|
|
+ <tbody style="display:block;width:1000px;">
|
|
|
<tr class="noborder">
|
|
|
<td colspan="2" class="required"><label class="validation" for="name">机构名称:</label></td>
|
|
|
</tr>
|
|
|
<tr class="noborder">
|
|
|
<td class="vatop"><?php echo $output['merchant']['name'];?></td>
|
|
|
</tr>
|
|
|
- <tr>
|
|
|
+ <tr class="noborder">
|
|
|
<td colspan="2" class="required"><label class="validation" for="name">选择通道组:</label></td>
|
|
|
</tr>
|
|
|
<tr class="noborder" style="display:block;height:auto">
|
|
|
<?php if(!empty($output['group_list'])){?>
|
|
|
<?php foreach ($output['group_list'] as $group) {?>
|
|
|
- <td>
|
|
|
+ <td class="w60 mw60 inblock">
|
|
|
<span>
|
|
|
<label>
|
|
|
- <?php echo $group['group_name'];?>:
|
|
|
- <input type="checkbox" name="sel[]" data-name="unicom" id="unicom_cb_all" value="<?php echo $group['group_id'];?>">
|
|
|
+ <?php echo $group['group_name'];?>:
|
|
|
+ <input type="checkbox" name="sel[]" data-name="unicom" id="unicom_cb_all" value="<?php echo $group['group_id'];?>"
|
|
|
+ <?php if(in_array($group['group_id'], $output['group_ids'])){ echo 'checked';}?>
|
|
|
+ >
|
|
|
</label>
|
|
|
</span>
|
|
|
</td>
|
|
@@ -61,40 +63,34 @@
|
|
|
<script type="text/javascript" src="<?php echo RESOURCE_SITE_URL; ?>/js/jquery-ui/jquery.ui.js"></script>
|
|
|
<script type="text/javascript" src="<?php echo RESOURCE_SITE_URL; ?>/js/ajaxfileupload/ajaxfileupload.js"></script>
|
|
|
<script type="text/javascript" src="<?php echo RESOURCE_SITE_URL; ?>/js/jquery.Jcrop/jquery.Jcrop.js"></script>
|
|
|
+<script type="text/javascript" src="<?php echo RESOURCE_SITE_URL;?>/refill/layer.js"></script>
|
|
|
<link href="<?php echo RESOURCE_SITE_URL; ?>/js/jquery.Jcrop/jquery.Jcrop.min.css" rel="stylesheet" type="text/css"
|
|
|
id="cssfile2"/>
|
|
|
<script type="text/javascript">
|
|
|
$(function () {
|
|
|
//按钮先执行验证再提交表单
|
|
|
$("#submitBtn").click(function () {
|
|
|
- if ($("#user_form").valid()) {
|
|
|
+ var checkTrue = false;
|
|
|
+ var checkBoxTrue = $('input[type="checkbox"]');
|
|
|
+ for (var i = 0; i < checkBoxTrue.length; i++) {
|
|
|
+ //如果有1个被选中时
|
|
|
+ if (checkBoxTrue[i].checked) {
|
|
|
+ checkTrue = true
|
|
|
+ };
|
|
|
+ };
|
|
|
+ if (checkTrue) {
|
|
|
$("#user_form").submit();
|
|
|
+ } else{
|
|
|
+ layer.msg('至少选择一个通道')
|
|
|
}
|
|
|
});
|
|
|
- $('#user_form').validate({
|
|
|
- errorPlacement: function (error, element) {
|
|
|
- error.appendTo(element.parent().parent().prev().find('td:first'));
|
|
|
- },
|
|
|
- rules: {
|
|
|
- company_name: {
|
|
|
- required: true,
|
|
|
- },
|
|
|
- password: {
|
|
|
- required: true,
|
|
|
- maxlength: 20,
|
|
|
- minlength: 6
|
|
|
- },
|
|
|
- },
|
|
|
- messages: {
|
|
|
- company_name: {
|
|
|
- required: '机构公司名称不能为空',
|
|
|
- },
|
|
|
- password: {
|
|
|
- required: '密码不能为空',
|
|
|
- maxlength: '<?php echo $lang['merchant_edit_password_tip']?>',
|
|
|
- minlength: '<?php echo $lang['merchant_edit_password_tip']?>'
|
|
|
+ // 清空
|
|
|
+ $('#emptyBtn').click(function () {
|
|
|
+ $('input[type="checkbox"]').each(function () {
|
|
|
+ if ($(this).is(":checked")) {
|
|
|
+ $(this).attr("checked",false)
|
|
|
}
|
|
|
- }
|
|
|
- });
|
|
|
+ })
|
|
|
+ })
|
|
|
});
|
|
|
</script>
|