Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
W
Wishlist-application
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
ZAHDI Mohcine
Wishlist-application
Commits
aed25f23
Commit
aed25f23
authored
2 months ago
by
mounouar21
Browse files
Options
Downloads
Patches
Plain Diff
created a wishlist creation form
parent
ff9601fd
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
templates/wishlist/new.html.twig
+93
-5
93 additions, 5 deletions
templates/wishlist/new.html.twig
with
93 additions
and
5 deletions
templates/wishlist/new.html.twig
+
93
−
5
View file @
aed25f23
{# templates/wishlist/new.html.twig #}
{%
extends
'base.html.twig'
%}
{%
extends
'base.html.twig'
%}
{%
block
title
%}
New Wishlist
{%
endblock
%}
{%
block
title
%}
Create New Wishlist
{%
endblock
%}
{%
block
stylesheets
%}
{{
parent
()
}}
<style>
.wishlist-form
{
max-width
:
600px
;
margin
:
0
auto
;
padding
:
20px
;
background-color
:
#f8f9fa
;
border-radius
:
8px
;
box-shadow
:
0
0
10px
rgba
(
0
,
0
,
0
,
0.1
);
}
.form-group
{
margin-bottom
:
1.5rem
;
}
.form-label
{
display
:
block
;
margin-bottom
:
0.5rem
;
font-weight
:
bold
;
}
.form-control
{
width
:
100%
;
padding
:
0.5rem
;
border
:
1px
solid
#ced4da
;
border-radius
:
4px
;
font-size
:
1rem
;
}
.form-check
{
display
:
flex
;
align-items
:
center
;
margin-top
:
1rem
;
}
.form-check-input
{
margin-right
:
0.5rem
;
}
.btn
{
padding
:
0.5rem
1rem
;
border-radius
:
4px
;
cursor
:
pointer
;
font-size
:
1rem
;
}
.btn-primary
{
background-color
:
#007bff
;
color
:
white
;
border
:
none
;
}
.btn-primary
:hover
{
background-color
:
#0069d9
;
}
.form-help
{
font-size
:
0.8rem
;
color
:
#6c757d
;
margin-top
:
0.25rem
;
}
.error-message
{
color
:
#dc3545
;
font-size
:
0.875rem
;
margin-top
:
0.25rem
;
}
</style>
{%
endblock
%}
{%
block
body
%}
{%
block
body
%}
<h1>
Create new Wishlist
</h1>
<div
class=
"container"
>
<h1
class=
"my-4"
>
Create New Wishlist
</h1>
{{
form_start
(
form
,
{
'attr'
:
{
'class'
:
'wishlist-form'
}}
) }}
<div
class=
"form-group"
>
{{
form_label
(
form.name
)
}}
{{
form_widget
(
form.name
,
{
'attr'
:
{
'class'
:
'form-control'
}}
) }}
{{
form_errors
(
form.name
)
}}
<small
class=
"form-help"
>
Give your wishlist a descriptive name
</small>
</div>
{{
include
(
'wishlist/_form.html.twig'
)
}}
<div
class=
"form-group"
>
{{
form_label
(
form.deadline
)
}}
{{
form_widget
(
form.deadline
,
{
'attr'
:
{
'class'
:
'form-control'
}}
) }}
{{
form_errors
(
form.deadline
)
}}
<small
class=
"form-help"
>
Optional - set a deadline for this wishlist
</small>
</div>
<a
href=
"
{{
path
(
'app_wishlist_index'
)
}}
"
>
back to list
</a>
<div
class=
"form-check"
>
{%
endblock
%}
{{
form_widget
(
form.isDisabled
,
{
'attr'
:
{
'class'
:
'form-check-input'
}}
) }}
{{
form_label
(
form.isDisabled
)
}}
{{
form_errors
(
form.isDisabled
)
}}
</div>
<small
class=
"form-help"
>
Disabled wishlists won't be visible to others
</small>
<div
class=
"form-group mt-4"
>
<button
type=
"submit"
class=
"btn btn-primary"
>
Create Wishlist
</button>
<a
href=
"
{{
path
(
'wishlist_index'
)
}}
"
class=
"btn btn-secondary ml-2"
>
Cancel
</a>
</div>
{{
form_end
(
form
)
}}
</div>
{%
endblock
%}
\ No newline at end of file
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment