1
0
mirror of https://github.com/etesync/android synced 2024-11-16 04:49:06 +00:00

Login: add a "forgot password" link.

This commit is contained in:
Tom Hacohen 2017-03-24 16:11:24 +00:00
parent d21a498925
commit 9ba84109b2
4 changed files with 21 additions and 2 deletions

View File

@ -34,6 +34,7 @@ public class Constants {
public static final Uri dashboard = webUri.buildUpon().appendEncodedPath("dashboard/").build();
public static final Uri faqUri = webUri.buildUpon().appendEncodedPath("faq/").build();
public static final Uri helpUri = webUri.buildUpon().appendEncodedPath("user-guide/").build();
public static final Uri forgotPassword = webUri.buildUpon().appendEncodedPath("accounts/password/reset/").build();
public static final Uri serviceUrl = Uri.parse((DEBUG_REMOTE_URL == null) ? "https://api.etesync.com/" : DEBUG_REMOTE_URL);

View File

@ -18,6 +18,7 @@ import android.view.View;
import android.view.ViewGroup;
import android.widget.Button;
import android.widget.EditText;
import android.widget.TextView;
import com.etesync.syncadapter.Constants;
import com.etesync.syncadapter.R;
@ -68,6 +69,14 @@ public class LoginCredentialsFragment extends Fragment {
}
});
final TextView forgotPassword = (TextView) v.findViewById(R.id.forgot_password);
forgotPassword.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
WebViewActivity.openUrl(getContext(), Constants.forgotPassword);
}
});
return v;
}
@ -88,5 +97,4 @@ public class LoginCredentialsFragment extends Fragment {
return valid ? new LoginCredentials(userName, password) : null;
}
}

View File

@ -45,7 +45,16 @@
android:id="@+id/url_password"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:hint="@string/login_password"/>
android:layout_marginBottom="7dp"
android:hint="@string/login_password" />
<TextView
android:id="@+id/forgot_password"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginLeft="4dp"
android:text="@string/login_forgot_password"
android:textColor="@color/orangeA700"/>
</LinearLayout>
</ScrollView>

View File

@ -121,6 +121,7 @@
<string name="login_enter_encryption_details">Secret Encryption Password</string>
<string name="login_encryption_account_label">Account:</string>
<string name="login_service_details_description">This is your login password, *not* your encryption password!</string>
<string name="login_forgot_password">Forgot password?</string>
<string name="login_configuration_detection">Configuration detection</string>
<string name="login_querying_server">Please wait, querying server…</string>