from otree.api import Currency as c, currency_range from ._builtin import Page, WaitPage from .models import Constants class NegQues(Page): form_model = 'player' form_fields = ['women_negotiator','men_negotiator'] class OwnerQuestion(Page): form_model = 'player' form_fields = ['S11Score','S12Score','S13Score','S14Score','S15Score','S16Score','S17Score','S18Score','S19Score','S20Score'] def is_displayed(self): return self.player.id_in_group==1 class RenterQuestion(Page): form_model = 'player' form_fields =['S1score','S2score','S3Score','S4Score','S5Score','S6Score','S7Score','S8Score','S9Score','S10Score'] def is_displayed(self): return self.player.id_in_group==2 class TransitionPage(Page): form_model = 'player' form_fields = ['DebInt'] def vars_for_template(self): return dict(total_points1=self.participant.payoff_plus_participation_fee(), total_points2=self.participant.payoff_plus_participation_fee()) class Waitforothers(WaitPage): pass page_sequence = [Waitforothers,NegQues,OwnerQuestion,RenterQuestion,TransitionPage]