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