gocron/templates/install/create.html

195 lines
7.2 KiB
Go
Raw Normal View History

2017-04-01 09:04:40 +00:00
{{{ template "common/header" . }}}
2017-04-07 01:13:36 +00:00
<div class="ui grid">
{{{ template "install/menu" . }}}
2017-05-04 08:50:41 +00:00
<div class="ten wide column">
2017-04-07 09:26:46 +00:00
<form class="ui form">
2017-04-24 05:57:39 +00:00
<div class="ui blue center aligned segment">
<p></p>
</div>
<br>
2017-04-07 09:26:46 +00:00
<div class="three fields">
<div class="field">
<label>(MySQL)</label>
<div class="ui dropdown selection">
<input type="hidden" name="db_type" value="mysql">
<div class="default text">MySQL</div>
<i class="dropdown icon"></i>
<div class="menu">
<div class="item active" data-value="mysql">MySQL</div>
</div>
</div>
</div>
2017-04-07 01:13:36 +00:00
</div>
2017-04-07 09:26:46 +00:00
<div class="three fields">
<div class="field">
<label></label>
<input type="text" name="db_host" value="127.0.0.1">
</div>
<div class="field">
<label></label>
<input type="text" name="db_port" value="3306">
</div>
2017-04-07 01:13:36 +00:00
</div>
<div class="three fields">
2017-04-07 09:26:46 +00:00
<div class="field">
<label></label>
<input type="text" name="db_username">
</div>
<div class="field">
<label></label>
2017-04-28 03:54:46 +00:00
<input type="password" name="db_password">
2017-04-07 09:26:46 +00:00
</div>
</div>
<div class="three fields">
2017-04-07 09:26:46 +00:00
<div class="field">
<label></label>
<input type="text" name="db_name">
</div>
<div class="field">
<label></label>
<input type="text" name="db_table_prefix" value="cron_">
</div>
</div>
2017-04-24 05:57:39 +00:00
<div class="ui divider"></div>
<div class="ui blue center aligned segment">
<p></p>
</div>
<br>
<div class="three fields">
2017-04-07 09:26:46 +00:00
<div class="field">
<label></label>
<input type="text" name="admin_username">
</div>
</div>
<div class="three fields">
2017-04-07 09:26:46 +00:00
<div class="field">
<label></label>
2017-04-28 03:54:46 +00:00
<input type="password" name="admin_password">
</div>
</div>
<div class="three fields">
<div class="field">
<label></label>
<input type="password" name="confirm_admin_password">
2017-04-07 09:26:46 +00:00
</div>
</div>
<div class="three fields">
2017-04-07 09:26:46 +00:00
<div class="field">
<label></label>
<input type="text" name="admin_email">
</div>
</div>
<div class="ui blue submit button"></div>
</form>
2017-04-07 01:13:36 +00:00
</div>
</div>
2017-04-01 09:04:40 +00:00
<script type="text/javascript">
// 表单验证规则
2017-04-07 09:26:46 +00:00
$('.ui.form').form(
{
2017-04-01 09:04:40 +00:00
onSuccess: function(event, fields) {
swal({
title: '',
text: "系统安装中.......",
type: 'info',
showConfirmButton: false
});
2017-04-07 01:13:36 +00:00
util.post('/install/store', fields, function(code, message) {
2017-04-07 09:26:46 +00:00
swal('');
setTimeout(function() {
location.href = "/";
}, 2000)
2017-04-01 09:04:40 +00:00
});
return false;
},
fields: {
dbHost: {
identifier : 'db_host',
rules: [
{
type : 'empty',
prompt : ''
}
]
},
dbPort: {
identifier : 'db_port',
rules: [
{
type : 'integer',
prompt : ''
}
]
},
dbUsername: {
identifier : 'db_username',
rules: [
{
type : 'empty',
prompt : ''
}
]
},
dbPassword: {
identifier : 'db_password',
rules: [
{
type : 'empty',
prompt : ''
}
]
},
dbName: {
identifier : 'db_name',
rules: [
{
type : 'empty',
prompt : ''
}
]
},
adminUsername: {
identifier : 'admin_username',
rules: [
{
type : 'minLength[3]',
prompt : '3'
}
]
},
adminPassword: {
identifier : 'admin_password',
rules: [
{
type : 'minLength[6]',
prompt : '6'
}
]
},
2017-04-28 03:54:46 +00:00
confirmAdminPassword: {
identifier : 'confirm_admin_password',
rules: [
{
type : 'match[admin_password]',
prompt : ''
}
]
},
2017-04-01 09:04:40 +00:00
adminEmail: {
identifier : 'admin_email',
rules: [
{
type : 'email',
prompt : ''
}
]
}
},
inline : true
});
</script>
{{{ template "common/footer" . }}}