- Form roughed in
This commit is contained in:
@@ -1,12 +1,33 @@
|
|||||||
<ion-header>
|
<ion-header>
|
||||||
<ion-toolbar>
|
<ion-toolbar>
|
||||||
<ion-buttons right>
|
<ion-buttons left>
|
||||||
<button ion-button icon-only (tap)="close($event)">
|
<button ion-button icon-only (tap)="close($event)">
|
||||||
<ion-icon name="close"></ion-icon>
|
<ion-icon name="arrow-back"></ion-icon>
|
||||||
</button>
|
</button>
|
||||||
</ion-buttons>
|
</ion-buttons>
|
||||||
|
<ion-title>Submit Your Story</ion-title>
|
||||||
</ion-toolbar>
|
</ion-toolbar>
|
||||||
</ion-header>
|
</ion-header>
|
||||||
|
|
||||||
<ion-content>
|
<ion-content>
|
||||||
|
<p class="intro">Submit your story using the following form. Nicholas may be in touch to clarify what you’ve written and he reserves the right to vet stories for accuracy and appropriateness.</p>
|
||||||
|
<form [formGroup]="userSubmissionForm" novalidate>
|
||||||
|
<ion-item>
|
||||||
|
<ion-label>Upload a photo</ion-label>
|
||||||
|
<input type="file" formControlName="pic" name="pic" />
|
||||||
|
</ion-item>
|
||||||
|
<ion-item>
|
||||||
|
<ion-label>Display name</ion-label>
|
||||||
|
<ion-input type="text" formControlName="name" name="name"></ion-input>
|
||||||
|
</ion-item>
|
||||||
|
<ion-item>
|
||||||
|
<ion-label>About you</ion-label>
|
||||||
|
<ion-textarea formControlName="about" name="about"></ion-textarea>
|
||||||
|
</ion-item>
|
||||||
|
<ion-item>
|
||||||
|
<ion-label>Your schtick with #gays</ion-label>
|
||||||
|
<ion-textarea formControlName="messages" name="messages"></ion-textarea>
|
||||||
|
</ion-item>
|
||||||
|
<button ion-button type="submit" block [disabled]="!userSubmissionForm.valid" (click)="saveUserSubmission()">Submit</button>
|
||||||
|
</form>
|
||||||
</ion-content>
|
</ion-content>
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
import { Component } from '@angular/core';
|
import { Component } from '@angular/core';
|
||||||
import { NavController } from 'ionic-angular';
|
import { NavController } from 'ionic-angular';
|
||||||
|
import { FormBuilder, FormGroup, Validators, FormControl } from '@angular/forms';
|
||||||
|
|
||||||
import { ProfileService } from '../../services/profiles';
|
import { ProfileService } from '../../services/profiles';
|
||||||
|
|
||||||
@@ -11,9 +12,17 @@ import { ProfileService } from '../../services/profiles';
|
|||||||
export class TellYourStoryPage {
|
export class TellYourStoryPage {
|
||||||
|
|
||||||
tabNavEl: any;
|
tabNavEl: any;
|
||||||
|
userSubmissionForm: FormGroup;
|
||||||
|
|
||||||
constructor(public navCtrl: NavController) {
|
constructor(public navCtrl: NavController, private formBuilder: FormBuilder, private formControl: FormControl) {
|
||||||
this.tabNavEl = document.querySelector('#tab-nav .tabbar');
|
this.tabNavEl = document.querySelector('#tab-nav .tabbar');
|
||||||
|
|
||||||
|
this.userSubmissionForm = this.formBuilder.group({
|
||||||
|
name: [''],
|
||||||
|
about: [''],
|
||||||
|
pic: [''],
|
||||||
|
messages: ['']
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
ionViewWillEnter() {
|
ionViewWillEnter() {
|
||||||
@@ -23,4 +32,8 @@ export class TellYourStoryPage {
|
|||||||
close(event) {
|
close(event) {
|
||||||
this.navCtrl.pop();
|
this.navCtrl.pop();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
saveUserSubmission() {
|
||||||
|
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user