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 OwnerASI(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==1 class RenterASI(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,OwnerASI,RenterASI,TransitionPage]