Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
Juan Montilla
/
TBW2223_equipo12
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
68b0e6fe
authored
May 06, 2023
by
Manuel Ruiz Toribio
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
Muestra de datos de las recetas a medias
parent
f9c86ed4
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
13 additions
and
10 deletions
app/Config/Routes.php
app/Controllers/Insert.php
app/Views/pages/insertRecipe.php
app/Config/Routes.php
View file @
68b0e6fe
...
...
@@ -37,6 +37,9 @@ $routes->match(['get', 'post'], '/loginAjax', [User::class, 'loginAjax']);
$routes
->
match
([
'get'
,
'post'
],
'/registerAjax'
,
[
User
::
class
,
'registerAjax'
]);
$routes
->
match
([
'get'
],
'/home'
,
[
User
::
class
,
'user_ok'
]);
$routes
->
get
(
'recipes/image/(:num)'
,
'RecipesController::getImage/$1'
);
// Rutas para formulario de ingresar tareas
$routes
->
get
(
'/insert_recipe'
,
'InsertRecipeController::index'
);
$routes
->
match
([
'get'
,
'post'
],
'/search_ingredient'
,
'InsertRecipeController::search_ingredient'
);
...
...
app/Controllers/Insert.php
View file @
68b0e6fe
...
...
@@ -9,7 +9,7 @@ public function insertAjax()
$validation
=
\Config\Services
::
validation
();
$rules
=
[
"recipe_name"
=>
[
"label"
=>
"
N
ame"
,
"label"
=>
"
n
ame"
,
"rules"
=>
"required"
],
"recipe_description"
=>
[
...
...
@@ -33,7 +33,7 @@ public function insertAjax()
],
"recipe_video"
=>
[
"label"
=>
"link"
]
,
]
];
$data
=
[];
...
...
app/Views/pages/insertRecipe.php
View file @
68b0e6fe
...
...
@@ -9,14 +9,14 @@
<!-- Seleccionar nombre receta-->
<div
class=
"form-group"
>
<label
for=
"
recipe_
name"
>
Nombre de la receta:
</label>
<input
type=
"text"
id=
"
recipe_name"
name=
"recipe_
name"
required
class=
"form-control"
>
<label
for=
"name"
>
Nombre de la receta:
</label>
<input
type=
"text"
id=
"
name"
name=
"
name"
required
class=
"form-control"
>
</div>
<!-- Seleccionar descripción -->
<div
class=
"form-group"
>
<label
for=
"
recipe_
description"
>
Descripción de la receta:
</label>
<textarea
id=
"
recipe_description"
name=
"recipe_
description"
rows=
"4"
cols=
"50"
required
class=
"form-control"
></textarea>
<label
for=
"description"
>
Descripción de la receta:
</label>
<textarea
id=
"
description"
name=
"
description"
rows=
"4"
cols=
"50"
required
class=
"form-control"
></textarea>
</div>
<!-- Selccionar opción vegana -->
...
...
@@ -101,13 +101,13 @@
<!--Seleccionar foto -->
<div
class=
"form-group"
>
<label
for=
"
recipe_
photo"
>
Subir una foto:
</label>
<input
type=
"file"
id=
"
recipe_photo"
name=
"recipe_
photo"
accept=
"image/*"
class=
"form-control-file"
>
<label
for=
"photo"
>
Subir una foto:
</label>
<input
type=
"file"
id=
"
photo"
name=
"
photo"
accept=
"image/*"
class=
"form-control-file"
>
</div>
<div
class=
"form-group"
>
<label
for=
"
recipe_video
"
>
Ingrese el enlace del video:
</label>
<input
type=
"text"
id=
"
recipe_video"
name=
"recipe_video
"
class=
"form-control"
placeholder=
"ej: https://www.youtube.com/watch?v=cks8liHVdZg"
>
<label
for=
"
link
"
>
Ingrese el enlace del video:
</label>
<input
type=
"text"
id=
"
link"
name=
"link
"
class=
"form-control"
placeholder=
"ej: https://www.youtube.com/watch?v=cks8liHVdZg"
>
</div>
<input
type=
"submit"
value=
"Subir receta"
class=
"btn btn-primary"
>
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment