<scenario begin="generic_info">

	<screen type="Sum" sum="sum-important"/>
	
	<screen type="Void" id="generic_info">
	    <actions>
           <action type="Next" title="INAINTE">
				<set key="#nextgen" key-title="nextgen" value="file://generic_info.html" value-title=""/>
				<goto target="nextgen_start"/>                 	
			</action>
		</actions>
	</screen>
	
	<screen type="Info" title="PRIN CONTINUAREA TRANZACTIEI:" id="nextgen_start">
		<field key="#nextgen" />
        <actions>
            <action type="Next" title="CONFIRMARE">
                <goto target="input_code"/> 
            </action>
            <action type="Prev" title="INAPOI">
                <goto target="previos"/>	                
            </action>
            <action type="Exit" title="MENIU">
                <goto target="exit"/>
            </action>
        </actions>
    </screen>
	
    <screen type="numeric/comunal" title="INTRODUCETI CODUL DE CLIENT" id="input_code" sound="input_payment_indent.mp3">
        <fields>
            <text-field id="id1" title="COD DE CLIENT" max-len="7" keyboard="Digital">
                <validator type="regex">
                    <rules>
                        <rule regex="^\d{7}$" />
                    </rules>
				</validator>
                <help>file://helps/info_general.png</help>
            </text-field>
        </fields>
        <actions>
            <action type="Next" title="INAINTE">
                <goto target="input_bill"/>                
            </action>
            <action type="Prev" title="INAPOI">
                <goto target="nextgen_start"/>
            </action>
            <action type="Exit" title="MENIU">
                <goto target="exit"/>
            </action>
        </actions>
    </screen>
	
    <screen type="numeric/comunal" title="INTRODUCETI NUMARUL DE FACTURA" id="input_bill" sound="input_payment_indent.mp3">
        <fields>
            <text-field id="id2" title="NUMAR FACTURA" max-len="7" keyboard="Digital">
                <validator type="regex">
                    <rules>
                        <rule regex="^\d{5,7}$"/>
                    </rules>
				</validator>
                <help>file://helps/info_general.png</help>
            </text-field>
        </fields>
        <actions>
            <action type="Next" title="INAINTE">
                <goto target="input_phone"/>                
            </action>
            <action type="Prev" title="INAPOI">
                <goto target="input_code"/>
            </action>
            <action type="Exit" title="MENIU">
                <goto target="exit"/>
            </action>
        </actions>
    </screen>
	
    <screen type="numeric/info" title="INTRODUCETI NUMARUL DE TELEFON" id="input_phone" sound="input_phone.mp3">
        <fields>
            <text-field id="id3" title="TELEFON" max-len="10" prefix="07" keyboard="Digital">
                <validator type="regex">
                    <rules>
                        <rule regex="^\d{10}$"/>
                    </rules>
				</validator>
            </text-field>
        </fields>
        <actions>
            <action type="Next" title="INAINTE">
                <goto target="confirm"/>                
            </action>
            <action type="Prev" title="INAPOI">
                <goto target="input_bill"/>
            </action>
            <action type="Exit" title="MENIU">
                <goto target="exit"/>
            </action>
        </actions>
    </screen>
	
    <screen type="confirm/comunal" title="VERIFICATI CORECTITUDINEA DATELOR INTRODUSE" id="confirm" sound="validate_phone.mp3" message="&lt;html&gt;&lt;b&gt;&lt;center&gt;Apasati CONFIRMARE pentru a avansa.&lt;br&gt;Apasati INAPOI pentru a corecta datele.">
	<fields list="id1,id2"/>
        <actions>
            <action type="Next" title="CONFIRMARE">
                <goto target="prepay"/>
            </action>
            <action type="Prev" title="INAPOI">
                <goto target="input_phone"/>	                
            </action>
            <action type="Exit" title="MENIU">
                <goto target="exit"/>
            </action>
        </actions>
    </screen>
    
    <screen type="Void" id="prepay">
        <actions>
            <action type="Next" title="NEXT">
                <if condition="is-not-null #back">
                    <then>
                        <clear keys="#back"/>
                        <goto target="input_code"/>
                    </then>
                    <else>
                        <set key="#back" value="1"/>
                        <modify src-key="id1" t-key-title="^(.*)$" v-key-title="CODUL DE CLIENT"/>
                        <modify src-key="id2" t-key-title="^(.*)$" v-key-title="NUMAR FACTURA"/>
                        <modify src-key="id3" t-key-title="^(.*)$" v-key-title="TELEFON"/>
                        <goto target="pay"/>
                    </else>
                </if>
            </action>
        </actions>
    </screen>         
    
</scenario>
