Browse Source

Rename mysql setup action

Vova Tkach 6 years ago
parent
commit
9892f0cdb2
3 changed files with 4 additions and 4 deletions
  1. 1 1
      assets/tmpl.cp.mysql.go
  2. 1 1
      assets/tmpl.cp.mysql.html
  3. 2 2
      modules/module_index.go

+ 1 - 1
assets/tmpl.cp.mysql.go

@@ -1,3 +1,3 @@
 package assets
 
-var TmplCpMySql = []byte(`<!doctype html><html lang="en"><head><meta charset="utf-8"><meta name="theme-color" content="#205081" /><meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"><title>Configure MySQL</title><link rel="stylesheet" href="{{$.System.PathCssBootstrap}}"><link rel="stylesheet" href="{{$.System.PathCssCpStyles}}"><link rel="shortcut icon" href="{{$.System.PathIcoFav}}" type="image/x-icon" /><style type="text/css">html{height:100%;}</style></head><body class="cp-mysql text-center"><form class="form-signin card" action="/cp/" method="post"><input type="hidden" name="action" value="mysql"><h1 class="h3 mb-3 font-weight-normal">Configure MySQL</h1><label for="host" class="sr-only">Database host</label><input type="text" id="host" name="host" class="form-control mb-3" placeholder="Database host" value="localhost" required><label for="port" class="sr-only">Database host port</label><input type="text" id="port" name="port" class="form-control mb-3" placeholder="Database host port" value="3306" required><label for="name" class="sr-only">Database name</label><input type="text" id="name" name="name" class="form-control mb-3" placeholder="Database name" required autofocus><label for="user" class="sr-only">Database user name</label><input type="text" id="user" name="user" class="form-control mb-3" placeholder="Database user name" required><label for="password" class="sr-only">Database user password</label><input type="password" id="password" name="password" class="form-control mb-3" placeholder="Database user password"><div class="sys-messages"></div><button class="btn btn-lg btn-primary btn-block" type="submit">Configure</button></form><script src="{{$.System.PathJsJquery}}"></script><script src="{{$.System.PathJsPopper}}"></script><script src="{{$.System.PathJsBootstrap}}"></script><script src="{{$.System.PathJsCpScripts}}"></script></body></html>`)
+var TmplCpMySql = []byte(`<!doctype html><html lang="en"><head><meta charset="utf-8"><meta name="theme-color" content="#205081" /><meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"><title>Configure MySQL</title><link rel="stylesheet" href="{{$.System.PathCssBootstrap}}"><link rel="stylesheet" href="{{$.System.PathCssCpStyles}}"><link rel="shortcut icon" href="{{$.System.PathIcoFav}}" type="image/x-icon" /><style type="text/css">html{height:100%;}</style></head><body class="cp-mysql text-center"><form class="form-signin card" action="/cp/" method="post"><input type="hidden" name="action" value="index-mysql-setup"><h1 class="h3 mb-3 font-weight-normal">Configure MySQL</h1><label for="host" class="sr-only">Database host</label><input type="text" id="host" name="host" class="form-control mb-3" placeholder="Database host" value="localhost" required><label for="port" class="sr-only">Database host port</label><input type="text" id="port" name="port" class="form-control mb-3" placeholder="Database host port" value="3306" required><label for="name" class="sr-only">Database name</label><input type="text" id="name" name="name" class="form-control mb-3" placeholder="Database name" required autofocus><label for="user" class="sr-only">Database user name</label><input type="text" id="user" name="user" class="form-control mb-3" placeholder="Database user name" required><label for="password" class="sr-only">Database user password</label><input type="password" id="password" name="password" class="form-control mb-3" placeholder="Database user password"><div class="sys-messages"></div><button class="btn btn-lg btn-primary btn-block" type="submit">Configure</button></form><script src="{{$.System.PathJsJquery}}"></script><script src="{{$.System.PathJsPopper}}"></script><script src="{{$.System.PathJsBootstrap}}"></script><script src="{{$.System.PathJsCpScripts}}"></script></body></html>`)

+ 1 - 1
assets/tmpl.cp.mysql.html

@@ -12,7 +12,7 @@
 	</head>
 	<body class="cp-mysql text-center">
 		<form class="form-signin card" action="/cp/" method="post">
-			<input type="hidden" name="action" value="mysql">
+			<input type="hidden" name="action" value="index-mysql-setup">
 			<h1 class="h3 mb-3 font-weight-normal">Configure MySQL</h1>
 			<label for="host" class="sr-only">Database host</label>
 			<input type="text" id="host" name="host" class="form-control mb-3" placeholder="Database host" value="localhost" required>

+ 2 - 2
modules/module_index.go

@@ -87,10 +87,10 @@ func (this *Modules) RegisterModule_Index() *Module {
 	})
 }
 
-func (this *Modules) RegisterAction_MysqlSetup() *Action {
+func (this *Modules) RegisterAction_IndexMysqlSetup() *Action {
 	return this.newAction(AInfo{
 		WantDB: false,
-		Mount:  "mysql",
+		Mount:  "index-mysql-setup",
 	}, func(wrap *wrapper.Wrapper) {
 		pf_host := wrap.R.FormValue("host")
 		pf_port := wrap.R.FormValue("port")