Browse Source

Rename sign in action

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

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

@@ -1,3 +1,3 @@
 package assets
 package assets
 
 
-var TmplCpLogin = []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>Please login</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-login text-center"><form class="form-signin card" action="/cp/" method="post"><input type="hidden" name="action" value="signin"><h1 class="h3 mb-3 font-weight-normal">Please login</h1><label for="email" class="sr-only">User email</label><input type="email" id="email" name="email" class="form-control" placeholder="User email" required autofocus><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">Login</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 TmplCpLogin = []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>Please login</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-login text-center"><form class="form-signin card" action="/cp/" method="post"><input type="hidden" name="action" value="index-user-sign-in"><h1 class="h3 mb-3 font-weight-normal">Please login</h1><label for="email" class="sr-only">User email</label><input type="email" id="email" name="email" class="form-control" placeholder="User email" required autofocus><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">Login</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.login.html

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

+ 2 - 2
modules/module_index.go

@@ -234,10 +234,10 @@ func (this *Modules) RegisterAction_IndexFirstUser() *Action {
 	})
 	})
 }
 }
 
 
-func (this *Modules) RegisterAction_CpUserLogin() *Action {
+func (this *Modules) RegisterAction_IndexUserSignIn() *Action {
 	return this.newAction(AInfo{
 	return this.newAction(AInfo{
 		WantDB: true,
 		WantDB: true,
-		Mount:  "signin",
+		Mount:  "index-user-sign-in",
 	}, func(wrap *wrapper.Wrapper) {
 	}, func(wrap *wrapper.Wrapper) {
 		pf_email := wrap.R.FormValue("email")
 		pf_email := wrap.R.FormValue("email")
 		pf_password := wrap.R.FormValue("password")
 		pf_password := wrap.R.FormValue("password")