@@ -64,9 +64,13 @@ var TutorialConfig = (function (_super) {
6464 }
6565 } ;
6666 TutorialConfig . prototype . onSubmit = function ( values ) {
67- var name = values . name , language = values . language , runner = values . runner ;
67+ var name = values . name , language = values . language , runner = values . runner , repo = values . repo ;
6868 this . props . pjSave ( Object . assign ( { } , this . props . packageJson , {
6969 name : name ,
70+ repositiory : repo || '' ,
71+ bugs : {
72+ url : repo || '' ,
73+ } ,
7074 config : {
7175 language : language , runner : runner
7276 }
@@ -77,13 +81,14 @@ var TutorialConfig = (function (_super) {
7781 this . props . routeSet ( 'page' ) ;
7882 } ;
7983 TutorialConfig . prototype . render = function ( ) {
80- var _a = this . props , pristine = _a . pristine , submitting = _a . submitting , handleSubmit = _a . handleSubmit , valid = _a . valid ;
84+ var _a = this . props , pristine = _a . pristine , submitting = _a . submitting , handleSubmit = _a . handleSubmit , invalid = _a . invalid ;
8185 return ( React . createElement ( "section" , { className : 'cr-page' } ,
8286 React . createElement ( Card_1 . Card , { style : styles . card } ,
8387 React . createElement ( Card_1 . CardTitle , { title : 'Tutorial Configuration' } ) ,
8488 React . createElement ( Card_1 . CardText , null ,
8589 React . createElement ( "form" , { onSubmit : handleSubmit ( this . onSubmit . bind ( this ) ) } ,
8690 React . createElement ( redux_form_1 . Field , { id : 'name' , name : 'name' , component : textField_1 . default . bind ( null , {
91+ floatingLabelText : 'Tutorial Name' ,
8792 hintText : 'coderoad-tutorial-name' ,
8893 } ) , tabIndex : '1' } ) ,
8994 React . createElement ( redux_form_1 . Field , { name : 'language' , component : selectField_1 . default . bind ( null , {
@@ -96,8 +101,12 @@ var TutorialConfig = (function (_super) {
96101 floatingLabelText : 'Test Runner' ,
97102 id : 'runner' ,
98103 } ) , tabIndex : '3' } ) ,
104+ React . createElement ( redux_form_1 . Field , { id : 'repo' , name : 'repo' , component : textField_1 . default . bind ( null , {
105+ floatingLabelText : 'Path to Repo (optional)' ,
106+ hintText : 'http://github.com/path/to/repo' ,
107+ } ) , tabIndex : '4' } ) ,
99108 React . createElement ( RaisedButton_1 . default , { type : 'submit' , style : styles . button , label : 'Save' , primary : true , disabled : submitting } ) ,
100- React . createElement ( RaisedButton_1 . default , { style : styles . button , label : 'Continue' , secondary : true , disabled : valid , onTouchTap : this . routeToPage . bind ( this ) } ) )
109+ React . createElement ( RaisedButton_1 . default , { style : styles . button , label : 'Continue' , secondary : true , disabled : invalid , onTouchTap : this . routeToPage . bind ( this ) } ) )
101110 ) )
102111 ) ) ;
103112 } ;
0 commit comments