Skip to content

Commit

Permalink
Merge branch 'development' into Fix-1950
Browse files Browse the repository at this point in the history
  • Loading branch information
championpaddler authored Jan 23, 2019
2 parents ec62ab7 + 4ebb011 commit c12e075
Show file tree
Hide file tree
Showing 8 changed files with 128 additions and 75 deletions.
6 changes: 5 additions & 1 deletion api/models/badges.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,11 @@ class Badges(db.Model):
id = db.Column(db.String(100), primary_key=True)
image = db.Column(db.String(100), nullable=False)
csv = db.Column(db.String(100), nullable=False)
text_color = db.Column(db.String(100), nullable=False)
font_color_1 = db.Column(db.String(100), nullable=False)
font_color_2 = db.Column(db.String(100), nullable=False)
font_color_3 = db.Column(db.String(100), nullable=False)
font_color_4 = db.Column(db.String(100), nullable=False)
font_color_5 = db.Column(db.String(100), nullable=False)
badge_size = db.Column(db.String(100), nullable=False)
download_link = db.Column(db.String)
image_link = db.Column(db.String)
Expand Down
2 changes: 1 addition & 1 deletion api/requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ rsa==3.4.2
six==1.11.0
SQLAlchemy==1.2.7
tinycss2==0.6.1
urllib3==1.22
urllib3==1.24.1
webencodings==0.5.1
Werkzeug==0.14.1
marshmallow-jsonapi
Expand Down
7 changes: 7 additions & 0 deletions frontend/app/components/forms/signup-form.js
Original file line number Diff line number Diff line change
Expand Up @@ -128,6 +128,13 @@ export default Component.extend({
$('#feedback').html('');
}
}
if (document.getElementById('pwd').value == document.getElementById('pwdConfirm').value) {
document.getElementById('msg').style.color = 'green';
document.getElementById('msg').innerHTML = 'Password match';
} else {
document.getElementById('msg').style.color = 'red';
document.getElementById('msg').innerHTML = 'Passwords do not match';
}
},
keyDown(event) {
if (event.target.name === 'password') {
Expand Down
4 changes: 2 additions & 2 deletions frontend/app/templates/components/forms/signup-form.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -35,14 +35,14 @@
<div class="field required">
<div class="ui left icon input">
<i class="lock icon"></i>
{{input type="password" id="pwdConfirm" value=password_repeat name="password_repeat"
placeholder="Re-enter Password"}}
{{input type="password" id="pwdConfirm" value=password_repeat name="password_repeat" placeholder="Re-enter Password" }}
<div class="ui small basic icon buttons">
<button class="ui button" type="button" id="eye2" {{ action 'showPasswordSignupConfirm'}}>
<i class="eye slash icon"></i>
</button>
</div>
</div>
<div id="msg" style="text-align:center"></div>
<div class="ui center aligned segment basic">
<button disabled id="signUpSubmit" class="ui fluid large submit orange basic button" style="margin-bottom: 10px;"
type="submit">
Expand Down
5 changes: 4 additions & 1 deletion frontend/app/templates/components/overlay-welcome.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,9 @@
<li>
Select from one of the Input Source
</li>
<li>
Select from the logo inputs
</li>
<li>
Select Badge Size
</li>
Expand All @@ -43,4 +46,4 @@
</div>
</div>
</div>
{{/if}}
{{/if}}
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<div class="ui stackable grid">
<div class="row">
<div class="three wide column">
<div class="three wide column" style="text-align:center">
<div class="ui basic aligned segment" >
<div class="ui circular image profile-image">
<img onclick={{action "updateProfileImage"}} src="{{user.photoURL}}">
Expand All @@ -19,7 +19,8 @@
</div>
</div>
</div>
<div class="eleven wide column">
<div class="one wide column"></div>
<div class="ten wide column" style="padding-top: 50px">
<div class="ui active attached tab segment" data-tab="account">
{{user-component/user-account session=session isLoading=isLoadingName user=user sendUserName=(action 'updateUserName')}}
</div>
Expand Down
120 changes: 71 additions & 49 deletions frontend/app/templates/components/user-component/user-guide.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,28 @@
Please check what is the "Correct Format"?
</div>
<div class="ui segments">
<div class="ui segment">
<div class="ui">
<div class="ui header">
<i class="file image icon"></i>
<div class="content">
Logo Format
</div>
</div>
</div>
<div class="ui bulleted list">
<div class="item">The logo can be uploaded in two types.
<div class="ui bulleted list">
<div class="item">Image type logo</div>
<div class="item">Text type logo</div>
</div>
</div>
<div class="item">The image type logo allows you to upload any image as your logo provided it has
dimensions of size(width x height): 749 X 211px & Resolution: 300 DPI</div>
<div class="item">The text type logo allows you to choose any text as your logo. You can also choose
text color and background color</div>
</div>
</div>
<div class="ui segment">
<div class="ui">
<div class="ui header">
Expand All @@ -17,54 +39,54 @@
<div class="item">The CSV must be uploaded with 5 columns of data.</div>
<div class="item">Five comma (',') seperated values should be present in the CSV</div>
<div class="item">See Example Below</div>
<table class="ui celled structured table">
<thead>
<tr>
<th rowspan="2">First Line</th>
<th rowspan="2">Second Line</th>
<th rowspan="2">Third Line</th>
<th rowspan="2">Fourth Line</th>
<th rowspan="2">Fifth Line</th>
</tr>
</thead>
<tbody>
<tr>
<td >First Name</td>
<td >Last Name</td>
<td >Position</td>
<td >Organisation/Project</td>
<td >Social Handle</td>
</tr>
<tr>
<td>Deepjyoti</td>
<td>Mondal</td>
<td>Mentor</td>
<td>FOSSASIA</td>
<td>@djmgit</td>
</tr>
<tr>
<td>Yash</td>
<td>Ladha</td>
<td>Developer</td>
<td>Badgeyay</td>
<td>@yashladha</td>
</tr>
<tr>
<td>Manish</td>
<td>Devgan</td>
<td>Developer</td>
<td>Badgeyay</td>
<td>@gabru-md</td>
</tr>
<tr>
<td>Parth</td>
<td>Shandilya</td>
<td>Developer</td>
<td>Badgeyay</td>
<td>@ParthS007</td>
</tr>
</tbody>
</table>
<table class="ui celled structured table">
<thead>
<tr>
<th rowspan="2">First Line</th>
<th rowspan="2">Second Line</th>
<th rowspan="2">Third Line</th>
<th rowspan="2">Fourth Line</th>
<th rowspan="2">Fifth Line</th>
</tr>
</thead>
<tbody>
<tr>
<td>First Name</td>
<td>Last Name</td>
<td>Position</td>
<td>Organisation/Project</td>
<td>Social Handle</td>
</tr>
<tr>
<td>Deepjyoti</td>
<td>Mondal</td>
<td>Mentor</td>
<td>FOSSASIA</td>
<td>@djmgit</td>
</tr>
<tr>
<td>Yash</td>
<td>Ladha</td>
<td>Developer</td>
<td>Badgeyay</td>
<td>@yashladha</td>
</tr>
<tr>
<td>Manish</td>
<td>Devgan</td>
<td>Developer</td>
<td>Badgeyay</td>
<td>@gabru-md</td>
</tr>
<tr>
<td>Parth</td>
<td>Shandilya</td>
<td>Developer</td>
<td>Badgeyay</td>
<td>@ParthS007</td>
</tr>
</tbody>
</table>
</div>
</div>
<div class="ui segment">
Expand All @@ -89,4 +111,4 @@
</div>
</div>
</div>
</div>
</div>
54 changes: 35 additions & 19 deletions frontend/app/templates/create-badges.hbs
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
<div class="ui stackable grid">
<div class="right floated right aligned two wide column">
<label class="switch" {{action 'togglePreview'}} data-tooltip="Toggle Preview" data-position="left center">
<input type="checkbox" class="checkswitch" >
<input type="checkbox" class="checkswitch">
<span class="slider round"></span>
</label>
</div>
</div>
{{!----Event Listeners For Perview----}}
{{!----Event Listeners For Perview----}}+
{{#create-badge}}
{{/create-badge}}
<div class="ui stackable mobile reversed grid">
Expand Down Expand Up @@ -36,13 +36,13 @@
<div class="ui form width-container">
<p>
<b>Select from one of the Input Sources</b>
<a class="ui right floated icon orange basic button" href="{{href-to 'user-guide'}}" target="_blank" data-tooltip="User Input Guide"
data-position="right center">
<a class="ui right floated icon orange basic button" href="{{href-to 'user-guide'}}" target="_blank"
data-tooltip="User Input Guide" data-position="right center">
<i class="info icon"></i>
</a>
</p>
<div class="ui radio checkbox" onclick="showcsv();">
<input type="radio" name="tab" value="igotnone"/>
<div class="ui radio checkbox" onclick="showcsv();">
<input type="radio" name="tab" value="igotnone" />
<label>Upload CSV</label>
</div>
<div class="content" id="csv" style="display: none">
Expand Down Expand Up @@ -105,7 +105,12 @@
</p>

<div class="ui radio checkbox">
<input type="radio" name="tab1" value="igotnone" onclick={{action 'customlogoimage'}}/>
<input type="radio" name="tab1" value="igotnone" onclick={{action 'defaultlogoimage'}} />
<label>Use default FOSSASIA logo</label>
</div>
<br>
<div class="ui radio checkbox">
<input type="radio" name="tab1" value="igotnone" onclick={{action 'customlogoimage'}} />
<label>Add event logo</label>
</div>
<div class="content" id="custlogoimg" style='display:none;'>
Expand All @@ -115,7 +120,7 @@
</div>
<br>
<div class="ui radio checkbox">
<input type="radio" name="tab1" value="igotnone" onclick={{action 'customlogocol'}}/>
<input type="radio" name="tab1" value="igotnone" onclick={{action 'customlogocol'}} />
<label {{action "customLogoColorClicked"}}>Use event name text</label>
</div>
<div class="content" id="custlogocol" style='display:none;'>
Expand All @@ -125,11 +130,13 @@
</div>
<p>Select a Font Color</p>
<div class="center aligned">
{{ background-component/color-bg-component sendDefColor=(action 'mutateLogoFontColor') backColor=logoFontColor }}
{{ background-component/color-bg-component sendDefColor=(action 'mutateLogoFontColor')
backColor=logoFontColor }}
</div>
<p>Select a Background Color</p>
<div class="center aligned">
{{ background-component/color-bg-component sendDefColor=(action 'mutateLogoBackColor') backColor=logoBackColor }}
{{ background-component/color-bg-component sendDefColor=(action 'mutateLogoBackColor')
backColor=logoBackColor }}
</div>
</div>
</div>
Expand All @@ -146,7 +153,7 @@
</p>

<div class="ui radio checkbox">
<input type="radio" name="tab2" value="igotnone" onclick={{action "mutateCustomImage"}}/>
<input type="radio" name="tab2" value="igotnone" onclick={{action "mutateCustomImage"}} />
<label>Upload a Custom Image</label>
</div>
<div class="content" id="custimg" style="display:none">
Expand All @@ -162,7 +169,8 @@
<br>
<div class="content" id="custbg" style="display: none">
<div class="center aligned">
{{ background-component/def-image-component defImages=defImages sendDefImage=(action 'mutateBackground') }}
{{ background-component/def-image-component defImages=defImages sendDefImage=(action
'mutateBackground') }}
</div>
</div>

Expand All @@ -173,7 +181,8 @@
</div>
<div class="content" id="custcol" style="display: none">
<div class="center aligned">
{{ background-component/color-bg-component sendDefColor=(action 'mutateDefColor') backColor=backColor }}
{{ background-component/color-bg-component sendDefColor=(action 'mutateDefColor')
backColor=backColor }}
</div>
</div>
</div>
Expand All @@ -186,13 +195,16 @@
<div class="ui horizontal divider"></div>
<div class="content">
<div class="center aligned">
{{ text-component/font-size fontsizeall=fontsizeall fonttypeall=fonttypeall sendDefSize=(action 'mutateFontSize') sendDefFontCol=(action 'mutateFontCol') sendDefFont=(action
{{ text-component/font-size fontsizeall=fontsizeall fonttypeall=fonttypeall
sendDefSize=(action 'mutateFontSize') sendDefFontCol=(action 'mutateFontCol')
sendDefFont=(action
'mutateCustomFont')}}
</div>
</div>
</div>
</div>
<button {{action "submitForm"}} class="ui fluid orange {{if authToken.isEmailVerified '' 'disabled'}} button">Create Badges</button>
<button {{action "submitForm"}} class="ui fluid orange {{if authToken.isEmailVerified '' 'disabled'}} button">Create
Badges</button>
{{#each userError as |error|}}
<p>{{error.message}}</p>
{{/each}} {{#if showProgress}}
Expand Down Expand Up @@ -233,11 +245,15 @@
</div>
<div class="{{if previewToggled 'six' 'hide'}} wide column preview">
<!--Add Preview Section here-->
{{ user-component/preview fn=firstName ln=lastName org=organization sh=socialHandle desg=designation defColor=defFontColor
font_fn=defFont1Size font_ln=defFont2Size font_desg=defFont3Size font_org=defFont4Size font_sh=defFont5Size fontcol_fn=defFontCol1
{{ user-component/preview fn=firstName ln=lastName org=organization sh=socialHandle desg=designation
defColor=defFontColor
font_fn=defFont1Size font_ln=defFont2Size font_desg=defFont3Size font_org=defFont4Size font_sh=defFont5Size
fontcol_fn=defFontCol1
fontcol_ln=defFontCol2 fontcol_desg=defFontCol3 fontcol_org=defFontCol4 fontcol_sh=defFontCol5 defFont=defFont
defImageName=defImageName backImg=imageData backColor=backColor custLogoImage=custLogoImage logoImageData=logoImageData
logoBackColor=logoBackColor logoFontColor=logoFontColor logo_text=logo_text defImage=defImage custImage=custImage previewHeight=previewHeight
defImageName=defImageName backImg=imageData backColor=backColor custLogoImage=custLogoImage
logoImageData=logoImageData
logoBackColor=logoBackColor logoFontColor=logoFontColor logo_text=logo_text defImage=defImage
custImage=custImage previewHeight=previewHeight
}}
</div>
</div>{{overlay-welcome user=user removeFTL=(action 'removeFTL')}}
Expand Down

0 comments on commit c12e075

Please sign in to comment.