diff --git a/.gitignore b/.gitignore index 8a0c8f1..89d1fe5 100644 --- a/.gitignore +++ b/.gitignore @@ -1,5 +1,5 @@ /app/config/parameters.yml -/build/ +/build/dist/ /phpunit.xml /var/* !/var/cache @@ -16,6 +16,7 @@ /web/bundles/ /web/js/ /web/css/ +/web/images/ *~ /lib .idea diff --git a/Gruntfile.js b/Gruntfile.js index d29e7cd..757cab6 100644 --- a/Gruntfile.js +++ b/Gruntfile.js @@ -17,7 +17,8 @@ module.exports = function (grunt) { src: [ './vendor/bower/jquery/dist/jquery.js', './vendor/bower/uikit/dist/js/uikit.js', - './vendor/bower/uikit/dist/js/uikit-icons.js' + './vendor/bower/uikit/dist/js/uikit-icons.js', + './vendor/bower/select2/dist/js/select2.full.min.js' ], dest: 'build/dist/js/vendor.min.js' } @@ -97,6 +98,18 @@ module.exports = function (grunt) { cwd: './vendor/bower/uikit/dist/images', src: ['**'], dest: 'web/images' + }, + { + expand:true, + cwd: './vendor/bower/select2/dist/css', + src: ['select2.min.css'], + dest: 'web/css' + }, + { + expand: true, + cwd: 'build/images', + src: ['*'], + dest: 'web/images' } ] } diff --git a/app/Resources/FOSUserBundle/views/Registration/register.html.twig b/app/Resources/FOSUserBundle/views/Registration/register.html.twig index 92b6878..460926f 100644 --- a/app/Resources/FOSUserBundle/views/Registration/register.html.twig +++ b/app/Resources/FOSUserBundle/views/Registration/register.html.twig @@ -1,5 +1,5 @@ -{% extends "@FOSUser/layout.html.twig" %} +{% extends "base.html.twig" %} -{% block fos_user_content %} +{% block body %} {% include "@FOSUser/Registration/register_content.html.twig" %} -{% endblock fos_user_content %} +{% endblock body %} diff --git a/app/Resources/FOSUserBundle/views/Registration/register_content.html.twig b/app/Resources/FOSUserBundle/views/Registration/register_content.html.twig index ecedeb9..c28cb96 100644 --- a/app/Resources/FOSUserBundle/views/Registration/register_content.html.twig +++ b/app/Resources/FOSUserBundle/views/Registration/register_content.html.twig @@ -1,8 +1,83 @@ {% trans_default_domain 'FOSUserBundle' %} - -{{ form_start(form, {'method': 'post', 'action': path('fos_user_registration_register'), 'attr': {'class': 'fos_user_registration_register'}}) }} - {{ form_widget(form) }} -
- +
+ {{ form_errors(form) }} +
+{{ form_start(form, {'method': 'post', 'action': path('fos_user_registration_register'), 'attr': {'class': 'fos_user_registration_register uk-form'}}) }} +
+ + Register account + +
+ +
+ {{ form_widget(form.email, { 'attr': {'placeholder':'Email address', 'class':'uk-input uk-form-large uk-padding-small'} }) }} +
+
+ +
+ {{ form_widget(form.username, { 'attr': {'placeholder':'Username', 'class':'uk-input uk-form-large uk-padding-small'} }) }} +
+
+
+ +
+ {{ form_widget(form.first_name, { 'attr': {'placeholder':'First name', 'class':'uk-input uk-form-large uk-padding-small'} }) }} +
+
+
+ +
+ {{ form_widget(form.last_name, { 'attr': {'placeholder':'Last name', 'class':'uk-input uk-input uk-form-large uk-padding-small'} }) }} +
+
+
+
+ {{ form_label(form.familyside) }} +
+
+
+ {{ form_widget(form.familyside) }} +
+
+
+
+
+ {{ form_label(form.family) }} +
+
+ + {{ form_widget(form.family, { 'attr': {'class':'uk-checkbox'} }) }} + +
+
+
+ +
+ {{ form_widget(form.rsvp) }} +
+
+ +
+ {{ form_widget(form.plainPassword.first, { 'attr': {'placeholder':'Password', 'class':'uk-input uk-form-large uk-padding-small'} }) }} +
+ +
+ +
+ {{ form_widget(form.plainPassword.second, { 'attr': {'placeholder':'Repeat Password', 'class':'uk-input uk-form-large uk-padding-small'} }) }} +
+
+ +
+
+ +
+
+
Already have an account? Login here.
+
Already have an account? Login here.
+
+
+
{{ form_end(form) }} + diff --git a/app/Resources/views/base.html.twig b/app/Resources/views/base.html.twig index fa3ed10..dd283b9 100644 --- a/app/Resources/views/base.html.twig +++ b/app/Resources/views/base.html.twig @@ -8,6 +8,7 @@ Title + @@ -17,6 +18,8 @@
{% include 'flash_messages.html.twig' %} {% block body %}{% endblock %} + {% include "social_login.html.twig" %} + {% block footer %}{% endblock %}
diff --git a/app/Resources/views/default/index.html.twig b/app/Resources/views/default/index.html.twig index 1ce2bac..94cb36f 100644 --- a/app/Resources/views/default/index.html.twig +++ b/app/Resources/views/default/index.html.twig @@ -1,76 +1,19 @@ + {% extends 'base.html.twig' %} {% block body %} -
-
-
-

Welcome to Symfony {{ constant('Symfony\\Component\\HttpKernel\\Kernel::VERSION') }}

+
+
+
- -
-

- - - Your application is now ready. You can start working on it at: - {{ base_dir }} -

-
- - - +
Small2
+
+
+
Medium
+
+
+
Large
-{% endblock %} - -{% block stylesheets %} - + {% endblock %} diff --git a/app/Resources/views/default/index_user.html.twig b/app/Resources/views/default/index_user.html.twig deleted file mode 100644 index ddca00a..0000000 --- a/app/Resources/views/default/index_user.html.twig +++ /dev/null @@ -1,10 +0,0 @@ -{% extends 'base.html.twig' %} - -{% block body %} - -{% endblock %} - -{% block stylesheets %} - -{% endblock %} - diff --git a/app/Resources/views/social_login.html.twig b/app/Resources/views/social_login.html.twig new file mode 100644 index 0000000..31ed025 --- /dev/null +++ b/app/Resources/views/social_login.html.twig @@ -0,0 +1,17 @@ + +{% if(is_granted('IS_AUTHENTICATED_ANONYMOUSLY') and hide_social is not defined ) %} +
+

Login

+
    +
  • + +
  • +
  • +
  • +
  • +
  • + +
  • +
+
+{% endif %} \ No newline at end of file diff --git a/app/config/config.yml b/app/config/config.yml index c4d6b38..2764085 100644 --- a/app/config/config.yml +++ b/app/config/config.yml @@ -185,3 +185,5 @@ fos_user: form: type: Sikofitt\DoughnutWeddingBundle\Form\RegistrationType +sikofitt_doughnut_wedding: + max_rsvps: ~ \ No newline at end of file diff --git a/app/config/routing.yml b/app/config/routing.yml index b650138..c3f82e5 100644 --- a/app/config/routing.yml +++ b/app/config/routing.yml @@ -1,33 +1,51 @@ hwi_oauth_redirect: resource: "@HWIOAuthBundle/Resources/config/routing/redirect.xml" - prefix: /user/connect + prefix: /connect hwi_oauth_connect: resource: "@HWIOAuthBundle/Resources/config/routing/connect.xml" - prefix: /user/connect + prefix: /connect hwi_oauth_login: resource: "@HWIOAuthBundle/Resources/config/routing/login.xml" - prefix: /user/oauth + prefix: /login/oauth facebook_login: - path: /user/login/callback/facebook + path: /login/callback/facebook google_login: - path: /user/login/callback/google + path: /login/callback/google twitter_login: - path: /user/login/callback/twitter + path: /login/callback/twitter windows_login: - path: /user/login/callback/windows + path: /login/callback/windows instagram_login: - path: /user/login/callback/instagram + path: /login/callback/instagram amazon_login: - path: /user/login/callback/amazon + path: /login/callback/amazon yahoo_login: - path: /user/login/callback/yahoo + path: /login/callback/yahoo -fos_user: - resource: "@FOSUserBundle/Resources/config/routing/all.xml" - prefix: /user +os_user_security: + resource: "@FOSUserBundle/Resources/config/routing/security.xml" +#paths +# /login +# /login_check +# /logout +fos_user_profile: + resource: "@FOSUserBundle/Resources/config/routing/profile.xml" + prefix: /user/profile + +fos_user_register: + resource: "@FOSUserBundle/Resources/config/routing/registration.xml" + prefix: /register + +fos_user_resetting: + resource: "@FOSUserBundle/Resources/config/routing/resetting.xml" + prefix: /resetting + +fos_user_change_password: + resource: "@FOSUserBundle/Resources/config/routing/change_password.xml" + prefix: /user/profile sikofitt_doughnut_wedding: resource: "@SikofittDoughnutWeddingBundle/Controller/" diff --git a/app/config/security.yml b/app/config/security.yml index 095d896..01f13b8 100644 --- a/app/config/security.yml +++ b/app/config/security.yml @@ -5,13 +5,9 @@ security: FOS\UserBundle\Model\UserInterface: algorithm: bcrypt cost: 14 - # http://symfony.com/doc/current/security.html#b-configuring-how-users-are-loaded providers: - #in_memory: - # memory: ~ fos_userbundle: - id: fos_user.user_provider.username - #id: fos_user.user_manager + id: fos_user.user_provider.username_email firewalls: # disables authentication for assets and the profiler, adapt it according to your needs dev: @@ -21,40 +17,31 @@ security: pattern: ^/ form_login: provider: fos_userbundle - login_path: /user/connect/ - check_path: /login/login_check + login_path: /login + check_path: /login_check logout: - path: /user/logout + path: /logout target: / anonymous: true oauth: resource_owners: - facebook: /user/login/callback/facebook - google: /user/login/callback/google - twitter: /user/login/callback/twitter - windows: /user/login/callback/windows - instagram: /user/login/callback/instagram - amazon: /user/login/callback/amazon - yahoo: /user/login/callback/yahoo - login_path: /user/oauth + facebook: /login/callback/facebook + google: /login/callback/google + twitter: /login/callback/twitter + windows: /login/callback/windows + instagram: /login/callback/instagram + amazon: /login/callback/amazon + yahoo: /login/callback/yahoo + login_path: /login use_forward: false - failure_path: /user/oauth + failure_path: /login oauth_user_provider: service: hwi_oauth.user.provider.fosub_bridge - #oauth_user_provider: - # service: my.oauth_aware.user_provider.service - - main: - anonymous: ~ - # activate different ways to authenticate - - # http://symfony.com/doc/current/security.html#a-configuring-how-your-users-will-authenticate - #http_basic: ~ - - # http://symfony.com/doc/current/cookbook/security/form_login_setup.html - #form_login: ~ access_control: - - { path: ^/user/login$, role: IS_AUTHENTICATED_ANONYMOUSLY } - - { path: ^/user/register, role: IS_AUTHENTICATED_ANONYMOUSLY } - - { path: ^/user/resetting, role: IS_AUTHENTICATED_ANONYMOUSLY } + - { path: ^/login$, role: IS_AUTHENTICATED_ANONYMOUSLY } + - { path: ^/register, role: IS_AUTHENTICATED_ANONYMOUSLY } + - { path: ^/resetting, role: IS_AUTHENTICATED_ANONYMOUSLY } + - { path: ^/user, role: ROLE_USER } + - { path: ^/gallery/upload, role: ROLE_USER } + - { path: ^/gallery, role: IS_AUTHENTICATED_ANONYMOUSLY } - { path: ^/admin/, role: ROLE_ADMIN } \ No newline at end of file diff --git a/bower.json b/bower.json index 7276b06..1588a44 100644 --- a/bower.json +++ b/bower.json @@ -22,6 +22,7 @@ "dependencies": { "uikit": "3", "jquery": "^3.1.1", - "parsleyjs": "^2.7.0" + "parsleyjs": "^2.7.0", + "select2": "^4.0.3" } } diff --git a/build/images/amazon.svg b/build/images/amazon.svg new file mode 100644 index 0000000..49b7289 --- /dev/null +++ b/build/images/amazon.svg @@ -0,0 +1,34 @@ + + + + + + image/svg+xml + + + + + + + + diff --git a/build/images/yahoo.svg b/build/images/yahoo.svg new file mode 100644 index 0000000..7cf226c --- /dev/null +++ b/build/images/yahoo.svg @@ -0,0 +1,3 @@ + + + diff --git a/build/js/doughnut.js b/build/js/doughnut.js index 3593c78..94f9c89 100644 --- a/build/js/doughnut.js +++ b/build/js/doughnut.js @@ -1,3 +1,13 @@ -jQuery.ready(function($) { - +jQuery(document).ready(function($) { + if(null !== document.querySelector('select') && document.querySelector('select').length > 0) { + var selectPlaceholder = 'Choose an option.'; + if(document.querySelector('select').hasAttribute('placeholder')) { + selectPlaceholder = document.querySelector('select').getAttribute('placeholder'); + } + jQuery('select').prepend('