Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 12 additions & 7 deletions src/Bidcoz/Bundle/CoreBundle/Entity/Address.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,45 +2,50 @@

namespace Bidcoz\Bundle\CoreBundle\Entity;

use Doctrine\ORM\Mapping as ORM;
use JMS\Serializer\Annotation as Serialize;
use Symfony\Component\Validator\Constraints as Assert;

/**
* A Value object for an address.
*
* @ORM\Embeddable
* @Serialize\ExclusionPolicy("all")
*/
class Address
{
/**
* @ORM\Column(type="string", length=255, nullable=true)
* @Assert\NotBlank(groups={"Profile"})
* @Assert\Length(max=255, groups={"Profile"})
* @Serialize\Expose
* @Serialize\SerializedName("address1")
*/
protected $address1;

/**
* @ORM\Column(type="string", length=255, nullable=true)
* @Serialize\Expose
* @Serialize\SerializedName("address2")
*/
protected $address2;

/**
* @ORM\Column(type="string", length=128, nullable=true)
* @Assert\NotBlank(groups={"Profile"})
* @Assert\Length(max=128, groups={"Profile"})
* @Serialize\Expose
* @Serialize\SerializedName("city")
*/
protected $city;

/**
* @ORM\Column(type="string", length=2, nullable=true)
* @Assert\NotBlank(groups={"Profile"})
* @Serialize\Expose
* @Serialize\SerializedName("state")
*/
protected $state;

/**
* @ORM\Column(type="string", length=5, nullable=true)
* @Assert\NotBlank(groups={"Profile"})
* @Assert\Regex(pattern="/\d{5}/", groups={"Profile"})
* @Serialize\Expose
* @Serialize\SerializedName("zip")
*/
protected $zip;

Expand Down
2 changes: 2 additions & 0 deletions src/Bidcoz/Bundle/CoreBundle/Entity/User.php
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,8 @@ class User

/**
* @Assert\Valid
* @Serialize\Expose
* @Serialize\SerializedName("address")
*/
protected $address;

Expand Down
4 changes: 4 additions & 0 deletions src/Bidcoz/Bundle/CoreBundle/Entity/UserRepository.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,10 @@ public function getUser() : User

$address = new Address();
$address->setAddress1('123 ABC Street');
$address->setAddress2('floor 1, apartment 1');
$address->setCity('New York');
$address->setState('New York');
$address->setZip('10000');

$user->setAddress($address);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,14 @@
<div class="panel h-100">
<div class="panel-body">
<h4>Welcome to the CausePilot Playground</h4>

<p class="lead">
{{ truncateText('Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut
labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco
laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in
voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat
non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.', 350) }}
</p>
</div>
</div>
</div>
Expand All @@ -16,17 +24,18 @@
<div class="panel h-100">
<div class="panel-body">
<h4 class="mb-5 p-1">Interested in becoming a CausePilot?</h4>

<div class="actions pt-5">
<a
id="learn-more"
class="btn full-width"
type="button"
href="https://www.causepilot.com"
target="_blank"
data-toggle="modal"
data-target="#learn-more-modal"
>
Learn More
</a>
{% include 'BidcozFrontendBundle:Modals:learnMore.html.twig' %}
</div>
</div>
</div>
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
{# TODO: The existing modal macro and the BidcozCoreBundle::_modal.html.twig template did not look good.
That's why I created a new modal for the test.
#}
<div id="learn-more-modal" class="modal">
<div class="modal-dialog">
<div class="modal-content mx-auto">
<div class="modal-close float-right" data-dismiss="modal" aria-label="Close" aria-hidden="true">
{% include 'BidcozCoreBundle:Components:icon.html.twig' with { icon: 'close' } %}
</div>
<div class="modal-header py-0">
<h4 class="modal-title mt-0">Learn More</h4>
<h5 class="modal-subtitle">Take your mission to new heights</h5>
</div>
<div class="modal-body">
The auction & event fundraising software that helps you raise money on the fly and makes the most of every giving opportunity.
</div>
<div class="modal-footer pb-0">
<button type="button" class="btn btn-clear modal-close" data-dismiss="modal">Cancel</button>
</div>
</div>
</div>
</div>
3 changes: 2 additions & 1 deletion web/css/causepilot/variables.scss
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ $color-gray-60: $color-black;
// Primaries
$color-power-blue: #1c2b44;
$color-maximum-blue: #39a0ca;
$color-sky-blue: #87ceeb;
$color-purple: #731dd8;

// Secondaries
Expand Down Expand Up @@ -58,4 +59,4 @@ $btn-font-weight: 700;

// Padding overrides
$padding-small-vertical: 2px;
$padding-small-horizontal: 5px;
$padding-small-horizontal: 5px;
2 changes: 1 addition & 1 deletion web/css/interface.css

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion web/css/interface/interface.scss
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
@import "../causepilot/globals.scss";

body {
background-color: $color-maximum-blue;
background-color: $color-sky-blue;
}

header.header {
Expand Down