fix the lack of url validation in the portfolio section
This commit is contained in:
@ -6,10 +6,8 @@ block content
|
||||
.container.text-center
|
||||
form.form-horizontal(action='/account/profile', method='POST', novalidate='novalidate', name='profileForm' ng-show="asyncComplete")
|
||||
input(type='hidden', name='_csrf', value=_csrf)
|
||||
|
||||
.col-sm-4.col-sm-offset-5
|
||||
h2 Bio
|
||||
|
||||
.form-group
|
||||
label.col-sm-3.col-sm-offset-2.control-label(for='name') Name *
|
||||
.col-sm-4
|
||||
@ -26,7 +24,6 @@ block content
|
||||
alert(type='danger')
|
||||
span.ion-close-circled
|
||||
| Your name must be fewer than 50 characters.
|
||||
|
||||
.form-group
|
||||
label.col-sm-3.col-sm-offset-2.control-label(for='username') Username (path to public profile) *
|
||||
.col-sm-4
|
||||
@ -51,7 +48,6 @@ block content
|
||||
alert(type='danger')
|
||||
span.ion-close-circled
|
||||
| That username is already taken.
|
||||
|
||||
.form-group
|
||||
label.col-sm-3.col-sm-offset-2.control-label(for='email') Email *
|
||||
.col-sm-4
|
||||
@ -68,12 +64,10 @@ block content
|
||||
alert(type='danger')
|
||||
span.ion-close-circled
|
||||
| That email is already taken.
|
||||
|
||||
.form-group
|
||||
label.col-sm-3.col-sm-offset-2.control-label(for='location') Location
|
||||
.col-sm-4
|
||||
input.form-control(type='text', name='location', autocomplete="off", id='location', ng-model='user.profile.location')
|
||||
|
||||
.form-group
|
||||
label.col-sm-3.col-sm-offset-2.control-label(for='email') Link to Profile Photo (1:1 ratio)
|
||||
.col-sm-4
|
||||
@ -82,7 +76,6 @@ block content
|
||||
alert(type='danger')
|
||||
span.ion-close-circled
|
||||
| Please enter a valid URL format (http://www.example.com).
|
||||
|
||||
.form-group
|
||||
label.col-sm-3.col-sm-offset-2.control-label(for='bio') Bio (140 characters)
|
||||
.col-sm-4
|
||||
@ -91,16 +84,13 @@ block content
|
||||
alert(type='danger')
|
||||
span.ion-close-circled
|
||||
| Your bio must be fewer than 140 characters.
|
||||
|
||||
.form-group
|
||||
.col-sm-offset-5.col-sm-4
|
||||
button.btn.btn-primary.btn-block(type='submit', ng-disabled='profileForm.$invalid')
|
||||
span.ion-edit
|
||||
| Update my Bio
|
||||
|
||||
.col-sm-4.col-sm-offset-5
|
||||
h2 Social Profiles
|
||||
|
||||
.form-group
|
||||
label.col-sm-3.col-sm-offset-2.control-label(for='email') Twitter
|
||||
.col-sm-4
|
||||
@ -123,7 +113,6 @@ block content
|
||||
alert(type='danger')
|
||||
span.ion-close-circled
|
||||
| Please enter a valid URL format (http://www.example.com).
|
||||
|
||||
.form-group
|
||||
label.col-sm-3.col-sm-offset-2.control-label(for='email') CodePen
|
||||
.col-sm-4
|
||||
@ -132,7 +121,6 @@ block content
|
||||
alert(type='danger')
|
||||
span.ion-close-circled
|
||||
| Please enter a valid URL format (http://www.example.com).
|
||||
|
||||
.form-group
|
||||
label.col-sm-3.col-sm-offset-2.control-label(for='email') CoderByte
|
||||
.col-sm-4
|
||||
@ -141,7 +129,6 @@ block content
|
||||
alert(type='danger')
|
||||
span.ion-close-circled
|
||||
| Please enter a valid URL format (http://www.example.com).
|
||||
|
||||
.form-group
|
||||
label.col-sm-3.col-sm-offset-2.control-label(for='email') LinkedIn
|
||||
.col-sm-4
|
||||
@ -150,19 +137,15 @@ block content
|
||||
alert(type='danger')
|
||||
span.ion-close-circled
|
||||
| Please enter a valid URL format (http://www.example.com).
|
||||
|
||||
.form-group
|
||||
.col-sm-offset-5.col-sm-4
|
||||
button.btn.btn-primary.btn-block(type='submit', ng-disabled='profileForm.$invalid')
|
||||
span.ion-edit
|
||||
| Update my Social Links
|
||||
|
||||
.col-sm-4.col-sm-offset-5.negative-bottom
|
||||
h2 Portfolio
|
||||
|
||||
.col-sm-4.col-sm-offset-5.flat-top
|
||||
h3 First Portfolio Project
|
||||
|
||||
.form-group
|
||||
label.col-sm-3.col-sm-offset-2.control-label(for='website1Title') Title
|
||||
.col-sm-4
|
||||
@ -171,20 +154,24 @@ block content
|
||||
alert(type='danger')
|
||||
span.ion-close-circled
|
||||
| Portfolio project title must be fewer than 140 characters.
|
||||
|
||||
.form-group
|
||||
label.col-sm-3.col-sm-offset-2.control-label(for='website1Link') Link
|
||||
.col-sm-4
|
||||
input.form-control(type='text', name='website1Link', id='website1Link', autocomplete="off", ng-model='user.portfolio.website1Link', placeholder='http://')
|
||||
|
||||
input.form-control(type='url', name='website1Link', id='website1Link', autocomplete="off", ng-model='user.portfolio.website1Link', placeholder='http://')
|
||||
.col-sm-4.col-sm-offset-5(ng-show="profileForm.website1Link.$error.url && !profileForm.website1Link.$pristine")
|
||||
alert(type='danger')
|
||||
span.ion-close-circled
|
||||
| Please enter a valid URL format (http://www.example.com).
|
||||
.form-group
|
||||
label.col-sm-3.col-sm-offset-2.control-label(for='website1Image') Image Link (4:3 ratio)
|
||||
.col-sm-4
|
||||
input.form-control(type='text', name='website1Image', id='website1Image', autocomplete="off", ng-model='user.portfolio.website1Image', placeholder='http://')
|
||||
|
||||
input.form-control(type='url', name='website1Image', id='website1Image', autocomplete="off", ng-model='user.portfolio.website1Image', placeholder='http://')
|
||||
.col-sm-4.col-sm-offset-5(ng-show="profileForm.website1Image.$error.url && !profileForm.website1Image.$pristine")
|
||||
alert(type='danger')
|
||||
span.ion-close-circled
|
||||
| Please enter a valid URL format (http://www.example.com).
|
||||
.col-sm-4.col-sm-offset-5.flat-top
|
||||
h3 Second Portfolio Project
|
||||
|
||||
.form-group
|
||||
label.col-sm-3.col-sm-offset-2.control-label(for='website2Title') Title
|
||||
.col-sm-4
|
||||
@ -193,20 +180,24 @@ block content
|
||||
alert(type='danger')
|
||||
span.ion-close-circled
|
||||
| Portfolio project title must be fewer than 140 characters.
|
||||
|
||||
.form-group
|
||||
label.col-sm-3.col-sm-offset-2.control-label(for='website2Link') Link
|
||||
.col-sm-4
|
||||
input.form-control(type='text', name='website2Link', id='website2Link', autocomplete="off", ng-model='user.portfolio.website2Link', placeholder='http://')
|
||||
|
||||
input.form-control(type='url', name='website2Link', id='website2Link', autocomplete="off", ng-model='user.portfolio.website2Link', placeholder='http://')
|
||||
.col-sm-4.col-sm-offset-5(ng-show="profileForm.website2Link.$error.url && !profileForm.website2Link.$pristine")
|
||||
alert(type='danger')
|
||||
span.ion-close-circled
|
||||
| Please enter a valid URL format (http://www.example.com).
|
||||
.form-group
|
||||
label.col-sm-3.col-sm-offset-2.control-label(for='website2Image') Image Link (4:3 ratio)
|
||||
.col-sm-4
|
||||
input.form-control(type='text', name='website2Image', id='website2Image', autocomplete="off", ng-model='user.portfolio.website2Image', placeholder='http://')
|
||||
|
||||
input.form-control(type='url', name='website2Image', id='website2Image', autocomplete="off", ng-model='user.portfolio.website2Image', placeholder='http://')
|
||||
.col-sm-4.col-sm-offset-5(ng-show="profileForm.website2Image.$error.url && !profileForm.website2Image.$pristine")
|
||||
alert(type='danger')
|
||||
span.ion-close-circled
|
||||
| Please enter a valid URL format (http://www.example.com).
|
||||
.col-sm-4.col-sm-offset-5.flat-top
|
||||
h3 Third Portfolio Project
|
||||
|
||||
.form-group
|
||||
label.col-sm-3.col-sm-offset-2.control-label(for='website3Title') Title
|
||||
.col-sm-4
|
||||
@ -215,17 +206,22 @@ block content
|
||||
alert(type='danger')
|
||||
span.ion-close-circled
|
||||
| Portfolio project title must be fewer than 140 characters.
|
||||
|
||||
.form-group
|
||||
label.col-sm-3.col-sm-offset-2.control-label(for='website3Link') Link
|
||||
.col-sm-4
|
||||
input.form-control(type='text', name='website3Link', id='website3Link', autocomplete="off", ng-model='user.portfolio.website3Link', placeholder='http://')
|
||||
|
||||
input.form-control(type='url', name='website3Link', id='website3Link', autocomplete="off", ng-model='user.portfolio.website3Link', placeholder='http://')
|
||||
.col-sm-4.col-sm-offset-5(ng-show="profileForm.website3Link.$error.url && !profileForm.website3Link.$pristine")
|
||||
alert(type='danger')
|
||||
span.ion-close-circled
|
||||
| Please enter a valid URL format (http://www.example.com).
|
||||
.form-group
|
||||
label.col-sm-3.col-sm-offset-2.control-label(for='website3Image') Image Link (4:3 ratio)
|
||||
.col-sm-4
|
||||
input.form-control(type='text', name='website3Image', id='website3Image', autocomplete="off", ng-model='user.portfolio.website3Image', placeholder='http://')
|
||||
|
||||
input.form-control(type='url', name='website3Image', id='website3Image', autocomplete="off", ng-model='user.portfolio.website3Image', placeholder='http://')
|
||||
.col-sm-4.col-sm-offset-5(ng-show="profileForm.website3Image.$error.url && !profileForm.website3Image.$pristine")
|
||||
alert(type='danger')
|
||||
span.ion-close-circled
|
||||
| Please enter a valid URL format (http://www.example.com).
|
||||
.form-group
|
||||
.col-sm-offset-5.col-sm-4
|
||||
button.btn.btn-primary.btn-block(type='submit', ng-disabled='profileForm.$invalid')
|
||||
@ -320,3 +316,4 @@ block content
|
||||
button.btn.btn-danger.btn-block(type='submit')
|
||||
span.ion-trash-b
|
||||
| Yes, Delete my account
|
||||
|
Reference in New Issue
Block a user