-
Notifications
You must be signed in to change notification settings - Fork 0
/
setting.htm
74 lines (71 loc) · 3.69 KB
/
setting.htm
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
<?php include _include(ADMIN_PATH.'view/htm/header.inc.htm');?>
<div class="row">
<div class="col-lg-10 offset-lg-1">
<div class="card">
<div class="card-block">
<form method="post" id="form">
<h4 class="card-title">七牛云存储插件配置</h4>
<p class="small text-grey">参考:<a href='http://www.lixiaopeng.top/article/52.html' target='_blank'>http://www.lixiaopeng.top/article/52.html</a></p>
<div class="card card-block">
<div class="row">
<div class="col-md-9">
<fieldset class="form-group">
<label for="accessKey">AK:</label>
<input class="form-control" type="text" id="accessKey" name="accessKey" placeholder="accessKey" value="<?php echo $config['accessKey'] ?>">
</fieldset>
</div>
<div class="col-md-9">
<fieldset class="form-group">
<label for="secretKey">SK:</label>
<input class="form-control" type="text" id="secretKey" name="secretKey" value="<?php echo $config['secretKey'] ?>">
</fieldset>
</div>
</div>
<div class="row">
<div class="col-md-9">
<fieldset class="form-group">
<label for="bucket">bucket名称:</label>
<input class="form-control" type="text" id="bucket" name="bucket" value="<?php echo $config['bucket'] ?>">
</fieldset>
</div>
<div class="col-md-9">
<fieldset class="form-group">
域名 <label for="cdnurl"><p class="small text-grey">(例如:http://oqfvp37jq.bkt.clouddn.com,末尾请不要加'/')</p></label>
<input class="form-control" type="text" id="cdnurl" name="cdnurl" value="<?php echo $config['cdnurl'] ?>">
</fieldset>
</div>
</div>
<div class="row">
<div class="col-md-6">
<button type="submit" class="btn btn-primary btn-block" id="submit" data-loading-text="<?php echo lang('submiting');?>..."><?php echo lang('confirm');?></button>
<!--<button type="button" id="save" class="btn btn-primary">保存</button>-->
</div>
</div>
</div>
</form>
</div>
</div>
</div>
</div>
<?php include _include(ADMIN_PATH.'view/htm/footer.inc.htm');?>
<script>
var jform = $("#form");
var jsubmit = $("#submit");
var referer = '<?php echo http_referer();?>';
jform.on('submit', function(){
jform.reset();
jsubmit.button('loading');
var postdata = jform.serialize();
$.xpost("<?php echo url('plugin-setting-adam_qiniu');?>", postdata, function(code, message) {
if(code == 0) {
$.alert(message);
jsubmit.text(message).delay(2000).button('reset').location(referer);
return;
} else {
$.alert(message);
jsubmit.button('reset');
}
});
return false;
});
</script>