mozillahispano/openwapp — pull request #64 by duesenfranz (2014-12-08 00:50:41+00:00)
Title: Handle Multisim / having the right sim card not inserted gracefully

Also see #54

Introduction
---------------

Until now, the login page consisted of two pages, ``init`` and ``confirm``. I basically added a third page, ``network``, where users select their carriers if they
* Don't have any sim-card inserted
* Selected a country that is explicitely not the country the sim-card is from

Since the ``login.js`` file got bigger, I decided to reorder some functions for clarification.
"Normal" usage with exactly one sim-card should not be affected, except the user changes the country.

Images
----------
*My computer has some font issues today, thats just locally :)*

**If no sim-card is inserted / the country could not be detected, the next button is disabled until the user selects a country**
![no-sim](https://cloud.githubusercontent.com/assets/8686371/5333558/6ff36ea8-7e7b-11e4-82ec-1992f688fd27.png)

**The screen the users see if they have no sim / selected another county (note that the next button is also disabled until a carrier is selected), with a back button**
![select-carrier](https://cloud.githubusercontent.com/assets/8686371/5333559/768bc594-7e7b-11e4-88f7-aa5ae771642d.png)

**After selecting a carrier**
![carrier-selected](https://cloud.githubusercontent.com/assets/8686371/5333561/7f109f0a-7e7b-11e4-9d8e-0a039a1446f5.png)

**Warning message after user selected carrier manually**
![warning](https://cloud.githubusercontent.com/assets/8686371/5333562/85ea3cbe-7e7b-11e4-8f34-abd0a5ebb118.png)

**On the confirmation screen, the prefix cannot be changed anymore; instead there is a back-button**
![confirm](https://cloud.githubusercontent.com/assets/8686371/5333565/92394c44-7e7b-11e4-9e5b-0e7789e6b1bd.png)

**If multiple sim-cards are inserted, the sim card has to be selected first**
![sim-before](https://cloud.githubusercontent.com/assets/8686371/5333589/512a6656-7e7c-11e4-99c2-118d87eafe57.png)

**After selecting a sim-card, the country is auto-selected**
![sim-after](https://cloud.githubusercontent.com/assets/8686371/5333591/631b94ac-7e7c-11e4-850f-004c666fbc58.png)

Notes
--------

* Translations have been changed, have to be adapted
* Has been tested with
* Simulator 1.3 - 2.2
* Flame 2.0
* Multi-sim testing can be done by adding

`` this.possibleSimCards = [
{mcc: '262', mnc: '03', slotNr: 1},
{mcc: '262', mnc: '07', slotNr: 2}
];``

[here](https://github.com/duesenfranz/openwapp/blob/17fdb14eb6944c5d161eb432314156f6a6002aa5/app/scripts/views/login.js#L172)