[teacher.view] create card with same design as others [data.teacher] created handler 'ic_reset' + added button 'CANCEL' to reset form & untoggle

This commit is contained in:
xdrm-brackets 2018-03-30 17:32:12 +02:00
parent 365e1eb567
commit 9bd58eb460
2 changed files with 16 additions and 1 deletions

View File

@ -33,6 +33,10 @@
</h1>
<div class='table'>
<div title='équivalents TD'>
<span>0</span>
<span>HETD</span>
</div>
<div>
<span><input type='text' placeholder='???' v-model='gstore.create_h'></span>
<span>heures à faire</span>
@ -43,6 +47,7 @@
<div class='footer'>
<button class='valid' @click='gstore.ic_handler()'>Créer l'enseignant</button>
<button class='neutral' @click='gstore.ic_reset(); gstore.create_card=false'>Annuler</button>
</div>
</section>

View File

@ -281,7 +281,17 @@ gstore.add('create_h', '');
gstore.add('create_err_valid', false);
gstore.add('create_err', '');
/* (4) Define create handler */
/* (4) Define reset handler */
gstore.add('ic_reset', function(){
gstore.add('create_cat', '-');
gstore.add('create_name', '');
gstore.add('create_cas', '');
gstore.add('create_h', '');
gstore.add('create_err_valid', false);
gstore.add('create_err', '');
});
/* (5) Define create handler */
gstore.add('ic_handler', function(prof_id){
/* (4.1) Trim text input */