Browse Source

Rename first user action

Vova Tkach 6 years ago
parent
commit
482afee891
3 changed files with 4 additions and 4 deletions
  1. 1 1
      assets/tmpl.cp.first.user.go
  2. 1 1
      assets/tmpl.cp.first.user.html
  3. 2 2
      modules/module_index.go

+ 1 - 1
assets/tmpl.cp.first.user.go

@@ -1,3 +1,3 @@
 package assets
 
-var TmplCpFirstUser = []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>Creating first user</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-first-user text-center"><form class="form-signin card" action="/cp/" method="post"><input type="hidden" name="action" value="first-user"><h1 class="h3 mb-3 font-weight-normal">Creating first user</h1><label for="first_name" class="sr-only">User first name</label><input type="text" id="first_name" name="first_name" class="form-control mb-3" placeholder="User first name"><label for="last_name" class="sr-only">User last name</label><input type="text" id="last_name" name="last_name" class="form-control mb-3" placeholder="User last name"><label for="email" class="sr-only">User email</label><input type="email" id="email" name="email" class="form-control mb-3" placeholder="User email" required><label for="password" class="sr-only">User password</label><input type="password" id="password" name="password" class="form-control mb-3" placeholder="User password" required><div class="sys-messages"></div><button class="btn btn-lg btn-primary btn-block" type="submit">Create</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 TmplCpFirstUser = []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>Creating first user</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-first-user text-center"><form class="form-signin card" action="/cp/" method="post"><input type="hidden" name="action" value="index-first-user"><h1 class="h3 mb-3 font-weight-normal">Creating first user</h1><label for="first_name" class="sr-only">User first name</label><input type="text" id="first_name" name="first_name" class="form-control mb-3" placeholder="User first name"><label for="last_name" class="sr-only">User last name</label><input type="text" id="last_name" name="last_name" class="form-control mb-3" placeholder="User last name"><label for="email" class="sr-only">User email</label><input type="email" id="email" name="email" class="form-control mb-3" placeholder="User email" required><label for="password" class="sr-only">User password</label><input type="password" id="password" name="password" class="form-control mb-3" placeholder="User password" required><div class="sys-messages"></div><button class="btn btn-lg btn-primary btn-block" type="submit">Create</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.first.user.html

@@ -12,7 +12,7 @@
 	</head>
 	<body class="cp-first-user text-center">
 		<form class="form-signin card" action="/cp/" method="post">
-			<input type="hidden" name="action" value="first-user">
+			<input type="hidden" name="action" value="index-first-user">
 			<h1 class="h3 mb-3 font-weight-normal">Creating first user</h1>
 			<label for="first_name" class="sr-only">User first name</label>
 			<input type="text" id="first_name" name="first_name" class="form-control mb-3" placeholder="User first name">

+ 2 - 2
modules/module_index.go

@@ -185,10 +185,10 @@ func (this *Modules) RegisterAction_IndexMysqlSetup() *Action {
 	})
 }
 
-func (this *Modules) RegisterAction_CpFirstUser() *Action {
+func (this *Modules) RegisterAction_IndexFirstUser() *Action {
 	return this.newAction(AInfo{
 		WantDB: true,
-		Mount:  "first-user",
+		Mount:  "index-first-user",
 	}, func(wrap *wrapper.Wrapper) {
 		pf_first_name := wrap.R.FormValue("first_name")
 		pf_last_name := wrap.R.FormValue("last_name")