recupération de mot de passe + prise de commande
* ResetPassword.txt: Un message pour le mot de passe oublié * style.css: fixe un 404 * UpdatePassword.aspx: Implémente le formulaire de mise à jour du mot de passe, accessible depuis l'e-mail. * Contact.aspx: implémente la page de contact préstataire * UpdatePassword.cs: modèle de la modification de mot de passe au jeton de securité (qui est encore un fake en l'état) * CommandRegistration.cs: un enregistrement de commande * NominativeCommandRegistration.cs: un enregistrement de commande nominative * .gitignore: ignore ma config LuaDebug * NpgsqlMembershipProvider.cs: ne pas crasher à la lecture en base de la question de recupération du mot de passe quand elle est nulle. * BasketController.cs: renvoie l'objet décrivant la prise de commande * Global.asax.cs: ignorer les routes vers App_Data et App_Code * instdbws.sql: passage du type json à jsonb pour les paramètres de la commande * RegistrationMail.txt: un piti message à l'enregistrement * AccountController.cs: Envoi du message du mot de passe oublié, methode de changemnet du mot de passe. * AdminController.cs: xmldoc + refabrication helper Notify * HomeController.cs: * BlogsController.cs: * GoogleController.cs: refabrication helper Notify * FrontOfficeController.cs: Refabrication: Utilisation du nouvel enregistrement de commande. + refabrication helper Notify * YavscHelpers.cs: implémente la methode d'envoi du message de mot de passe oublié + refabrication helper Notify * App.master: Corrige la notification Html * AppAdmin.master: Le lien vers la page de contact était associé à tort à la classe css "thanks" * yavsc.js: message plus parlant en cas de requête Ajax mal formée. * Login.aspx: Implémente le lien vers le formulaire de recupération du mot de passe * UserPost.aspx: . * Booking.aspx: format du code * Performer.ascx: l'e-mail préstataire ne sera jamais fourni par l'application, aussi, on parlera de "prendre contact", d'échanger ... mais pas de donner l'adresse e-mail. L'information "son email" n'est donc pas disponible meme à l'utilisateur autorisé. La prise de contact, ou autre fux de comunication le sont. * Performers.aspx: affiche la notification à l'envoi de la demande de devis * Product.aspx: * Service.aspx: les periodes du catalogue et du calendrier sont fondue. * Contact.aspx: traduction en français * Web.config: * la procédure de recupération du mot de passe est activée * l'e-message envoyé est construit à partir d'un modèle, un fichier texte trouvé dans /App_Data, et indiqué à l'application par le paramêtre applicatif "LostPasswordMessage" * Yavsc.csproj: reference les nouveaux fichiers * Product.cs: utilise la période du calendrier * Commande.cs: renvoie un objet à la prise de commande, indiquant l'identifiant de commande, et les messages envoyés en cas de commande nominative. * GoogleHelpers.cs: icone à la notification mobile * LocalizedText.resx: * LocalizedText.fr.resx: * LocalizedText.Designer.cs: * LocalizedText.fr.Designer.cs: traductions * UserNameBase.cs: fixe la dé-sérialisation * WorkFlowManager.cs: refabrication de la prise de commande * YavscModel.csproj: nouveaux objets du modèle * OtherWebException.aspx: page obsolete * Period.cs: fondre la période: celle du catalogue disparait, au profit de celle du calendrier.
This commit is contained in:
1
.gitignore
vendored
1
.gitignore
vendored
@ -15,6 +15,7 @@ web/App_Themes/style.totem.css
|
||||
web/Web.Debug.config
|
||||
web/Web.Release.config
|
||||
web/Web.Lua.config
|
||||
web/Web.LuaDebug.config
|
||||
web/Web.TotemPre.config
|
||||
web/Web.Totemprod.config
|
||||
.nuget
|
||||
|
@ -1,3 +1,7 @@
|
||||
2015-12-30 Paul Schneider <paul@pschneider.fr>
|
||||
|
||||
* .gitignore: ignore ma config LuaDebug
|
||||
|
||||
2015-12-24 Paul Schneider <paul@pschneider.fr>
|
||||
|
||||
* Makefile:
|
||||
|
@ -1,3 +1,9 @@
|
||||
2015-12-30 Paul Schneider <paul@pschneider.fr>
|
||||
|
||||
* NpgsqlMembershipProvider.cs: ne pas crasher à la lecture en
|
||||
base de la question de
|
||||
recupération du mot de passe quand elle est nulle.
|
||||
|
||||
2015-12-24 Paul Schneider <paul@pschneider.fr>
|
||||
|
||||
* NpgsqlMRPProviders.csproj: ajout d'une configuration de
|
||||
|
@ -633,8 +633,10 @@ namespace Npgsql.Web
|
||||
if (reader.GetBoolean (2))
|
||||
throw new MembershipPasswordException ("The supplied user is locked out.");
|
||||
|
||||
password = reader.GetString (0);
|
||||
passwordAnswer = reader.GetString (1);
|
||||
if (!reader.IsDBNull(0))
|
||||
password = reader.GetString (0);
|
||||
if (!reader.IsDBNull(1))
|
||||
passwordAnswer = reader.GetString (1);
|
||||
} else {
|
||||
throw new MembershipPasswordException ("The supplied user name is not found.");
|
||||
}
|
||||
|
@ -42,7 +42,7 @@ namespace Yavsc.ApiControllers
|
||||
/// <summary>
|
||||
/// Create the specified basket item using specified command parameters.
|
||||
/// </summary>
|
||||
public long Create()
|
||||
public CommandRegistration Create()
|
||||
{
|
||||
return YavscHelpers.CreateCommandFromRequest ();
|
||||
}
|
||||
|
@ -31,6 +31,8 @@ namespace Yavsc
|
||||
routes.IgnoreRoute ("{resource}.axd/{*pathInfo}"); // not used
|
||||
routes.IgnoreRoute ("Scripts/{*pathInfo}"); // web user side scripts
|
||||
routes.IgnoreRoute ("App_Theme/{*pathInfo}"); // sites themes
|
||||
routes.IgnoreRoute ("App_Data/{*pathInfo}"); // sites themes
|
||||
routes.IgnoreRoute ("App_Code/{*pathInfo}"); // sites themes
|
||||
routes.IgnoreRoute ("users/{*pathInfo}"); // user's files
|
||||
routes.IgnoreRoute ("avatars/{*pathInfo}"); // user's avatar
|
||||
routes.IgnoreRoute ("bfiles/{*pathInfo}"); // Blog files
|
||||
|
@ -214,10 +214,11 @@ CREATE TABLE commandes
|
||||
id bigserial NOT NULL, -- Identifiant unique de commande e, cours
|
||||
validation date, -- Date de validation
|
||||
prdref character varying(255) NOT NULL, -- Product reference from the unique valid catalog at the validation date
|
||||
creation timestamp with time zone NOT NULL, -- creation date
|
||||
creation timestamp with time zone NOT NULL DEFAULT now(), -- creation date
|
||||
clientname character varying(255), -- user who created the command, client of this command
|
||||
applicationname character varying(255), -- application concerned by this command
|
||||
params json,
|
||||
class character varying(512), -- Classe de commande:...
|
||||
params jsonb,
|
||||
CONSTRAINT commandes_pkey PRIMARY KEY (id),
|
||||
CONSTRAINT commforeignuser FOREIGN KEY (clientname, applicationname)
|
||||
REFERENCES users (username, applicationname) MATCH SIMPLE
|
||||
@ -226,13 +227,19 @@ CREATE TABLE commandes
|
||||
WITH (
|
||||
OIDS=FALSE
|
||||
);
|
||||
|
||||
ALTER TABLE commandes
|
||||
OWNER TO yavscdev;
|
||||
COMMENT ON COLUMN commandes.id IS 'Identifiant unique de commande e, cours';
|
||||
COMMENT ON COLUMN commandes.validation IS 'Date de validation';
|
||||
COMMENT ON COLUMN commandes.prdref IS 'Product reference from the unique valid catalog at the validation date';
|
||||
COMMENT ON COLUMN commandes.creation IS 'creation date';
|
||||
COMMENT ON COLUMN commandes.clientname IS 'user who created the command, client of this command';
|
||||
COMMENT ON COLUMN commandes.applicationname IS 'application concerned by this command';
|
||||
COMMENT ON COLUMN commandes.class IS 'Classe de commande:
|
||||
Utilisé pour l''instanciation de l''objet du SI,
|
||||
le nom du contrôle Html, et
|
||||
determiner les fournisseurs du Workflow
|
||||
à mettre en oeuvre pour traiter la commande.';
|
||||
|
||||
|
||||
-- Index: fki_commforeignuser
|
||||
|
@ -7,3 +7,7 @@ Pour l'activer, veuillez suivre le lien suivant :
|
||||
<%UserActivatonUrl%>
|
||||
|
||||
Merci d'avoir créé un compte utilisateur.
|
||||
|
||||
Puissiez-vous avoir beaucoup de fun.
|
||||
--
|
||||
L'équipe d'administration
|
15
web/App_Data/ResetPassword.txt
Normal file
15
web/App_Data/ResetPassword.txt
Normal file
@ -0,0 +1,15 @@
|
||||
|
||||
Une demande de mise à jour de votre mot de passe <%SiteName%> a été faite en ligne.
|
||||
|
||||
Vous pouvez changer votre mot de passe en suivant le lien suivant :
|
||||
|
||||
<%UserActivatonUrl%>
|
||||
|
||||
Si vous n'êtes pas à l'origine de cette demande, qu'elle est indésirée,
|
||||
veuillez nous excuser pour la gêne occasionnée, et nous en avertir
|
||||
par retour de ce courrier.
|
||||
|
||||
Que le fun avec vous soit.
|
||||
--
|
||||
l'administration
|
||||
<%SiteName%>
|
1
web/App_Themes/base/style.css
Normal file
1
web/App_Themes/base/style.css
Normal file
@ -0,0 +1 @@
|
||||
|
@ -1,3 +1,87 @@
|
||||
2015-12-30 Paul Schneider <paul@pschneider.fr>
|
||||
|
||||
* ResetPassword.txt: Un message pour le mot de passe oublié
|
||||
|
||||
* style.css: fixe un 404
|
||||
|
||||
* UpdatePassword.aspx: Implémente le formulaire de mise à jour
|
||||
du mot de passe,
|
||||
accessible depuis l'e-mail.
|
||||
|
||||
* Contact.aspx: implémente la page de contact préstataire
|
||||
|
||||
* BasketController.cs: renvoie l'objet décrivant la prise de
|
||||
commande
|
||||
|
||||
* Global.asax.cs: ignorer les routes vers App_Data et App_Code
|
||||
|
||||
* instdbws.sql: passage du type json à jsonb pour les
|
||||
paramètres de la commande
|
||||
|
||||
* RegistrationMail.txt: un piti message à l'enregistrement
|
||||
|
||||
* AccountController.cs: Envoi du message du mot de passe
|
||||
oublié,
|
||||
methode de changemnet du mot de passe.
|
||||
|
||||
* AdminController.cs: xmldoc + refabrication helper Notify
|
||||
|
||||
* HomeController.cs:
|
||||
* BlogsController.cs:
|
||||
* GoogleController.cs: refabrication helper Notify
|
||||
|
||||
* FrontOfficeController.cs: Refabrication: Utilisation du
|
||||
nouvel enregistrement de commande.
|
||||
+ refabrication helper Notify
|
||||
|
||||
* YavscHelpers.cs: implémente la methode d'envoi du message de
|
||||
mot de passe oublié
|
||||
+ refabrication helper Notify
|
||||
|
||||
* App.master: Corrige la notification Html
|
||||
|
||||
* AppAdmin.master: Le lien vers la page de contact était
|
||||
associé
|
||||
à tort à la classe css "thanks"
|
||||
|
||||
* yavsc.js: message plus parlant en cas de requête Ajax mal
|
||||
formée.
|
||||
|
||||
* Login.aspx: Implémente le lien vers le formulaire de
|
||||
recupération du mot de passe
|
||||
|
||||
* UserPost.aspx: .
|
||||
|
||||
* Booking.aspx: format du code
|
||||
|
||||
* Performer.ascx: l'e-mail préstataire ne sera jamais fourni
|
||||
par l'application,
|
||||
aussi, on parlera de "prendre contact", d'échanger ... mais
|
||||
pas de donner l'adresse e-mail.
|
||||
L'information "son email" n'est donc pas disponible meme à
|
||||
l'utilisateur autorisé.
|
||||
La prise de contact, ou autre fux de comunication le sont.
|
||||
|
||||
* Performers.aspx: affiche la notification à l'envoi de la
|
||||
demande de devis
|
||||
|
||||
* Product.aspx:
|
||||
* Service.aspx: les periodes du catalogue et du calendrier
|
||||
sont fondue.
|
||||
|
||||
* Contact.aspx: traduction en français
|
||||
|
||||
* Web.config: * la procédure de recupération du mot de passe
|
||||
est activée
|
||||
* l'e-message envoyé est construit à partir d'un modèle, un
|
||||
fichier texte trouvé dans /App_Data, et indiqué à
|
||||
l'application
|
||||
par le paramêtre applicatif "LostPasswordMessage"
|
||||
|
||||
* Yavsc.csproj: reference les nouveaux fichiers
|
||||
|
||||
* OtherWebException.aspx: page obsolete
|
||||
|
||||
2015-12-24 Paul Schneider <paul@pschneider.fr>
|
||||
|
||||
* App.master: traductions
|
||||
|
@ -18,6 +18,7 @@ using System.Net;
|
||||
using System.Configuration;
|
||||
using Yavsc.Model;
|
||||
using Yavsc.Model.WorkFlow;
|
||||
using Yavsc.Model.Messaging;
|
||||
|
||||
namespace Yavsc.Controllers
|
||||
{
|
||||
@ -62,7 +63,7 @@ namespace Yavsc.Controllers
|
||||
/// <returns>The login.</returns>
|
||||
/// <param name="model">Model.</param>
|
||||
/// <param name="returnUrl">Return URL.</param>
|
||||
[HttpPost,ValidateAntiForgeryToken]
|
||||
[HttpPost,ValidateAntiForgeryToken]
|
||||
public ActionResult Login (LoginModel model, string returnUrl)
|
||||
{
|
||||
if (ModelState.IsValid) {
|
||||
@ -362,7 +363,7 @@ namespace Yavsc.Controllers
|
||||
FormsAuthentication.SetAuthCookie (model.NewUserName, model.RememberMe);
|
||||
model.UserName = model.NewUserName;
|
||||
}
|
||||
YavscHelpers.Notify(ViewData, "Profile enregistré"+((editsTheUserName)?", nom public inclu.":""));
|
||||
ViewData.Notify( "Profile enregistré"+((editsTheUserName)?", nom public inclu.":""));
|
||||
}
|
||||
SetMEACodeViewData (model);
|
||||
SetUIThemeViewData (model);
|
||||
@ -404,8 +405,10 @@ namespace Yavsc.Controllers
|
||||
foreach (string key in errors.Keys)
|
||||
ModelState.AddModelError (key, errors [key]);
|
||||
|
||||
if (user != null && ModelState.IsValid)
|
||||
Url.SendActivationMessage (user);
|
||||
if (user != null && ModelState.IsValid) {
|
||||
YavscHelpers.SendNewPasswordMessage (user);
|
||||
ViewData.Notify ( new Notification () { body = LocalizedText.NewPasswordMessageSent } );
|
||||
}
|
||||
}
|
||||
return View (model);
|
||||
}
|
||||
@ -420,22 +423,69 @@ namespace Yavsc.Controllers
|
||||
{
|
||||
MembershipUser u = Membership.GetUser (id, false);
|
||||
if (u == null) {
|
||||
YavscHelpers.Notify( ViewData,
|
||||
ViewData.Notify(
|
||||
string.Format ("Cet utilisateur n'existe pas ({0})", id));
|
||||
} else if (u.ProviderUserKey.ToString () == key) {
|
||||
if (u.IsApproved) {
|
||||
YavscHelpers.Notify( ViewData,
|
||||
ViewData.Notify(
|
||||
string.Format ("Votre compte ({0}) est déjà validé.", id));
|
||||
} else {
|
||||
u.IsApproved = true;
|
||||
Membership.UpdateUser (u);
|
||||
YavscHelpers.Notify( ViewData,
|
||||
ViewData.Notify(
|
||||
string.Format ("La création de votre compte ({0}) est validée.", id));
|
||||
}
|
||||
} else
|
||||
YavscHelpers.Notify( ViewData, "La clé utilisée pour valider ce compte est incorrecte" );
|
||||
ViewData.Notify( "La clé utilisée pour valider ce compte est incorrecte" );
|
||||
return View ();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Updates the password.
|
||||
/// </summary>
|
||||
/// <returns>The password.</returns>
|
||||
/// <param name="id">Identifier.</param>
|
||||
/// <param name="key">Key.</param>
|
||||
[HttpGet]
|
||||
public ActionResult UpdatePassword (string id, string key)
|
||||
{
|
||||
MembershipUser u = Membership.GetUser (id, false);
|
||||
if (u == null) {
|
||||
return Content(
|
||||
string.Format("Cet utilisateur n'existe pas ({0})", id));
|
||||
}
|
||||
if (u.ProviderUserKey.ToString () != key) {
|
||||
return Content("Clé invalide");
|
||||
}
|
||||
ViewData["UserName"] = id;
|
||||
ViewData["UserKey"] = key;
|
||||
return View ();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Updates the password.
|
||||
/// </summary>
|
||||
/// <returns>The password.</returns>
|
||||
/// <param name="model">Model.</param>
|
||||
[HttpPost]
|
||||
public ActionResult UpdatePassword (UpdatePassword model)
|
||||
{
|
||||
if (ModelState.IsValid) {
|
||||
if (model.Password == model.ConfirmPassword) {
|
||||
MembershipUser u = Membership.GetUser (model.UserName, false);
|
||||
if (u == null) {
|
||||
return Content(
|
||||
string.Format("Cet utilisateur n'existe pas ({0})", model.UserName));
|
||||
}
|
||||
if (u.ProviderUserKey.ToString () != model.UserKey) {
|
||||
return Content("Clé invalide");
|
||||
}
|
||||
u.ChangePassword(u.GetPassword (),model.Password);
|
||||
ViewData.Notify( "La mise à jour du mot de passe a été effectuée.");
|
||||
return View("Index");
|
||||
}
|
||||
}
|
||||
return View();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -27,7 +27,7 @@ namespace Yavsc.Controllers
|
||||
// FIXME do this in a new installation script.
|
||||
if (!Roles.RoleExists (_adminRoleName)) {
|
||||
Roles.CreateRole (_adminRoleName);
|
||||
YavscHelpers.Notify (ViewData, _adminRoleName + " " + LocalizedText.role_created);
|
||||
ViewData.Notify( _adminRoleName + " " + LocalizedText.role_created);
|
||||
}
|
||||
return View ();
|
||||
}
|
||||
@ -159,6 +159,13 @@ namespace Yavsc.Controllers
|
||||
return Redirect(returnUrl);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Adds the user to role.
|
||||
/// </summary>
|
||||
/// <returns>The user to role.</returns>
|
||||
/// <param name="username">Username.</param>
|
||||
/// <param name="rolename">Rolename.</param>
|
||||
/// <param name="returnUrl">Return URL.</param>
|
||||
[Authorize(Roles="Admin")]
|
||||
public ActionResult AddUserToRole(string username, string rolename, string returnUrl)
|
||||
{
|
||||
@ -178,7 +185,7 @@ namespace Yavsc.Controllers
|
||||
ViewData ["usertoremove"] = username;
|
||||
if (submitbutton == "Supprimer") {
|
||||
Membership.DeleteUser (username);
|
||||
YavscHelpers.Notify(ViewData, string.Format("utilisateur \"{0}\" supprimé",username));
|
||||
ViewData.Notify( string.Format("utilisateur \"{0}\" supprimé",username));
|
||||
ViewData ["usertoremove"] = null;
|
||||
}
|
||||
return View ();
|
||||
@ -273,7 +280,7 @@ namespace Yavsc.Controllers
|
||||
public ActionResult AddRole (string rolename)
|
||||
{
|
||||
Roles.CreateRole(rolename);
|
||||
YavscHelpers.Notify(ViewData, LocalizedText.role_created+ " : "+rolename);
|
||||
ViewData.Notify(LocalizedText.role_created+ " : "+rolename);
|
||||
return View ();
|
||||
}
|
||||
|
||||
@ -310,7 +317,7 @@ namespace Yavsc.Controllers
|
||||
ViewData ["useritems"] = users;
|
||||
if (ModelState.IsValid) {
|
||||
Roles.AddUserToRole (model.UserName, _adminRoleName);
|
||||
YavscHelpers.Notify(ViewData, model.UserName + " "+LocalizedText.was_added_to_the_role+" '" + _adminRoleName + "'");
|
||||
ViewData.Notify(model.UserName + " "+LocalizedText.was_added_to_the_role+" '" + _adminRoleName + "'");
|
||||
} else {
|
||||
if (admins.Length > 0) {
|
||||
if (! admins.Contains (Membership.GetUser ().UserName)) {
|
||||
@ -321,7 +328,7 @@ namespace Yavsc.Controllers
|
||||
// No admin, gives the Admin Role to the current user
|
||||
Roles.AddUserToRole (currentUser, _adminRoleName);
|
||||
admins = new string[] { currentUser };
|
||||
YavscHelpers.Notify(ViewData, string.Format (
|
||||
ViewData.Notify( string.Format (
|
||||
LocalizedText.was_added_to_the_empty_role,
|
||||
currentUser, _adminRoleName));
|
||||
}
|
||||
|
@ -289,11 +289,11 @@ namespace Yavsc.Controllers
|
||||
// ensures rights to update
|
||||
BlogManager.GetForEditing (model.Id, true);
|
||||
BlogManager.UpdatePost (model.Id, model.Title, model.Content, model.Visible, model.AllowedCircles);
|
||||
YavscHelpers.Notify (ViewData, LocalizedText.BillUpdated);
|
||||
ViewData.Notify( LocalizedText.BillUpdated);
|
||||
|
||||
} else {
|
||||
model.Id = BlogManager.Post (model.Author, model.Title, model.Content, model.Visible, model.AllowedCircles);
|
||||
YavscHelpers.Notify (ViewData, LocalizedText.BillCreated);
|
||||
ViewData.Notify( LocalizedText.BillCreated);
|
||||
}
|
||||
BlogManager.UpdatePostPhoto (model.Id, model.Photo);
|
||||
}
|
||||
|
@ -207,7 +207,7 @@ namespace Yavsc.Controllers
|
||||
ViewData ["ProdRef"] = pref;
|
||||
Catalog cat = CatalogManager.GetCatalog ();
|
||||
if (cat == null) {
|
||||
YavscHelpers.Notify (ViewData, "Catalog introuvable");
|
||||
ViewData.Notify( "Catalog introuvable");
|
||||
ViewData ["RefType"] = "Catalog";
|
||||
return View ("ReferenceNotFound");
|
||||
}
|
||||
@ -257,10 +257,12 @@ namespace Yavsc.Controllers
|
||||
// * Make the workflow register this command
|
||||
// * Render the resulting basket
|
||||
|
||||
long cmdid = YavscHelpers.CreateCommandFromRequest ();
|
||||
NominativeCommandRegistration cmdreg = YavscHelpers.CreateCommandFromRequest ()
|
||||
as NominativeCommandRegistration;
|
||||
var basket = WorkFlowManager.GetCommands (User.Identity.Name);
|
||||
ViewData["Commanded"] = basket[cmdid];
|
||||
YavscHelpers.Notify (ViewData,
|
||||
ViewData["Commanded"] = basket[cmdreg.CommandId];
|
||||
ViewData["CommandResult"] = cmdreg ;
|
||||
ViewData.Notify(
|
||||
LocalizedText.Item_added_to_basket);
|
||||
return View ("Basket",basket);
|
||||
} catch (Exception e) {
|
||||
@ -315,7 +317,7 @@ namespace Yavsc.Controllers
|
||||
/// <summary>
|
||||
/// Activities the specified search and toPower.
|
||||
/// </summary>
|
||||
/// <param name="search">Search.</param>
|
||||
/// <param name="id">Activity identifier.</param>
|
||||
/// <param name="toPower">If set to <c>true</c> to power.</param>
|
||||
public ActionResult Activities (string id, bool toPower = false)
|
||||
{
|
||||
@ -329,7 +331,7 @@ namespace Yavsc.Controllers
|
||||
/// <summary>
|
||||
/// Activity at the specified id.
|
||||
/// </summary>
|
||||
/// <param name="id">Identifier.</param>
|
||||
/// <param name="MEACode">Identifier.</param>
|
||||
public ActionResult Activity (string MEACode)
|
||||
{
|
||||
return View (WorkFlowManager.GetActivity (MEACode));
|
||||
@ -356,7 +358,7 @@ namespace Yavsc.Controllers
|
||||
// That filters the view in order to only edit the given fieldset
|
||||
|
||||
if (mea == "none")
|
||||
YavscHelpers.Notify (ViewData, "Vous devez choisir une activité avant de pouvoir déclarer vos compétences " +
|
||||
ViewData.Notify( "Vous devez choisir une activité avant de pouvoir déclarer vos compétences " +
|
||||
"(Editez la rubrique <a href=\"" +
|
||||
Url.RouteUrl ("Default", new { controller = "Account", action = "Profile", id = User.Identity.Name, fs="infopub" }) + "\">Informations publiques</a> votre profile)");
|
||||
|
||||
@ -398,7 +400,7 @@ namespace Yavsc.Controllers
|
||||
response = reader.ReadToEnd ();
|
||||
stream.Close ();
|
||||
}
|
||||
YavscHelpers.Notify (ViewData,
|
||||
ViewData.Notify(
|
||||
string.Format (
|
||||
"Google calendar API exception {0} : {1}<br><pre>{2}</pre>",
|
||||
ex.Status.ToString (),
|
||||
@ -498,7 +500,7 @@ namespace Yavsc.Controllers
|
||||
stream.Dispose ();
|
||||
|
||||
}
|
||||
YavscHelpers.Notify (ViewData,
|
||||
ViewData.Notify(
|
||||
string.Format (
|
||||
"{3} exception {0} : {1}<br><pre>{2}</pre>",
|
||||
ex.Status.ToString (),
|
||||
|
@ -109,7 +109,7 @@ namespace Yavsc.Controllers
|
||||
OAuth2 oa = GoogleHelpers.CreateOAuth2 (CalendarGRU);
|
||||
AuthToken gat = oa.GetToken (Request, (string) Session ["state"], out msg);
|
||||
if (gat == null) {
|
||||
YavscHelpers.Notify(ViewData, msg);
|
||||
ViewData.Notify( msg);
|
||||
return View ("Auth");
|
||||
}
|
||||
SaveToken (HttpContext.Profile,gat);
|
||||
@ -147,7 +147,7 @@ namespace Yavsc.Controllers
|
||||
OAuth2 oa = GoogleHelpers.CreateOAuth2 (AuthGRU);
|
||||
AuthToken gat = oa.GetToken (Request, (string)Session ["state"], out msg);
|
||||
if (gat == null) {
|
||||
YavscHelpers.Notify(ViewData, msg);
|
||||
ViewData.Notify(msg);
|
||||
return View ();
|
||||
}
|
||||
string returnUrl = (string)Session ["returnUrl"];
|
||||
|
@ -151,7 +151,7 @@ namespace Yavsc.Controllers
|
||||
using (System.Net.Mail.SmtpClient sc = new SmtpClient())
|
||||
{
|
||||
sc.Send (msg);
|
||||
YavscHelpers.Notify(ViewData, LocalizedText.Message_sent);
|
||||
ViewData.Notify(LocalizedText.Message_sent);
|
||||
return View (new { email=email, reason="", body="" });
|
||||
}
|
||||
}
|
||||
|
@ -20,6 +20,7 @@ using System.Linq;
|
||||
using System.Reflection;
|
||||
using System.Web.Routing;
|
||||
using Yavsc.Model.FrontOffice;
|
||||
using Yavsc.Model.WorkFlow;
|
||||
|
||||
namespace Yavsc.Helpers
|
||||
{
|
||||
@ -51,21 +52,23 @@ namespace Yavsc.Helpers
|
||||
"APPL_PHYSICAL_PATH", "CERT_SECRETKEYSIZE", "CERT_SERVER_ISSUER",
|
||||
"INSTANCE_META_PATH", "SERVER_PORT_SECURE",
|
||||
"CERT_SERVER_SUBJECT", "HTTPS_SECRETKEYSIZE", "HTTPS_SERVER_ISSUER",
|
||||
"HTTP_CONTENT_LENGTH", "HTTPS_SERVER_SUBJECT", "HTTP_ACCEPT_ENCODING", "HTTP_ACCEPT_LANGUAGE"
|
||||
"HTTP_CONTENT_LENGTH", "HTTPS_SERVER_SUBJECT", "HTTP_ACCEPT_ENCODING", "HTTP_ACCEPT_LANGUAGE",
|
||||
"HTTP_CACHE_CONTROL", "__RequestVerificationToken"
|
||||
};
|
||||
public static long CreateCommandFromRequest()
|
||||
public static CommandRegistration CreateCommandFromRequest()
|
||||
{
|
||||
var keys = HttpContext.Current.Request.Params.AllKeys.Where (
|
||||
x => !YavscHelpers.FilteredKeys.Contains (x)).ToArray();
|
||||
var prms = new Dictionary<string,string> ();
|
||||
|
||||
CommandRegistration cmdreg;
|
||||
foreach (var key in keys) {
|
||||
prms.Add (key, HttpContext.Current.Request.Params [key]);
|
||||
}
|
||||
Command cmd = Command.CreateCommand(
|
||||
Command.CreateCommand(
|
||||
prms,
|
||||
HttpContext.Current.Request.Files);
|
||||
return cmd.Id;
|
||||
HttpContext.Current.Request.Files,
|
||||
out cmdreg);
|
||||
return cmdreg;
|
||||
}
|
||||
|
||||
private static string siteName = null;
|
||||
@ -115,7 +118,8 @@ namespace Yavsc.Helpers
|
||||
{
|
||||
SendActivationMessage (
|
||||
string.Format("{2}://{3}/Account/Validate/{1}?key={0}",
|
||||
user.ProviderUserKey.ToString(), user.UserName ,
|
||||
user.ProviderUserKey.ToString(),
|
||||
HttpUtility.UrlEncode(user.UserName),
|
||||
helper.RequestContext.HttpContext.Request.Url.Scheme,
|
||||
helper.RequestContext.HttpContext.Request.Url.Authority
|
||||
)
|
||||
@ -123,13 +127,30 @@ namespace Yavsc.Helpers
|
||||
user);
|
||||
}
|
||||
|
||||
public static void SendNewPasswordMessage(MembershipUser user)
|
||||
{
|
||||
SendActivationMessage (
|
||||
string.Format("{2}://{3}/Account/UpdatePassword/{1}?key={0}",
|
||||
user.ProviderUserKey.ToString(),
|
||||
HttpUtility.UrlEncode(user.UserName),
|
||||
HttpContext.Current.Request.Url.Scheme,
|
||||
HttpContext.Current.Request.Url.Authority
|
||||
)
|
||||
, WebConfigurationManager.AppSettings ["LostPasswordMessage"],
|
||||
user,
|
||||
"Mot de passe {0} perdu"
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Sends the activation message.
|
||||
/// </summary>
|
||||
/// <param name="validationUrl">Validation URL.</param>
|
||||
/// <param name="registrationMessage">Registration message.</param>
|
||||
/// <param name="user">User.</param>
|
||||
public static void SendActivationMessage(string validationUrl, string registrationMessage, MembershipUser user) {
|
||||
public static void SendActivationMessage(string validationUrl,
|
||||
string registrationMessage, MembershipUser user,string title = "Validation de votre compte {0}") {
|
||||
FileInfo fi = new FileInfo (
|
||||
HttpContext.Current.Server.MapPath (registrationMessage));
|
||||
if (!fi.Exists) {
|
||||
@ -148,7 +169,7 @@ namespace Yavsc.Helpers
|
||||
|
||||
using (MailMessage msg = new MailMessage (
|
||||
Admail, user.Email,
|
||||
string.Format ("Validation de votre compte {0}", YavscHelpers.SiteName),
|
||||
string.Format (title, YavscHelpers.SiteName),
|
||||
body)) {
|
||||
using (SmtpClient sc = new SmtpClient ()) {
|
||||
sc.Send (msg);
|
||||
@ -166,6 +187,7 @@ namespace Yavsc.Helpers
|
||||
/// <param name="user">User.</param>
|
||||
public static void ValidatePasswordReset(LostPasswordModel model, out StringDictionary errors, out MembershipUser user)
|
||||
{
|
||||
MembershipUser user1 = null;
|
||||
MembershipUserCollection users = null;
|
||||
errors = new StringDictionary ();
|
||||
user = null;
|
||||
@ -180,23 +202,26 @@ namespace Yavsc.Helpers
|
||||
errors.Add ("UserName", "Found more than one user!(sic)");
|
||||
return ;
|
||||
}
|
||||
foreach (var u in users) user1 = u as MembershipUser;
|
||||
}
|
||||
if (!string.IsNullOrEmpty (model.Email)) {
|
||||
users =
|
||||
Membership.FindUsersByEmail (model.Email);
|
||||
if (string.IsNullOrEmpty (model.Email))
|
||||
errors.Add ("Email", "Please, specify an e-mail");
|
||||
else {
|
||||
users = Membership.FindUsersByEmail (model.Email);
|
||||
if (users.Count < 1) {
|
||||
errors.Add ( "Email", "Email not found");
|
||||
return ;
|
||||
errors.Add ("Email", "Email not found");
|
||||
return;
|
||||
}
|
||||
if (users.Count != 1) {
|
||||
errors.Add ("Email", "Found more than one user!(sic)");
|
||||
return ;
|
||||
}
|
||||
}
|
||||
if (users==null)
|
||||
return;
|
||||
// Assert users.Count == 1
|
||||
foreach (MembershipUser u in users) user = u;
|
||||
MembershipUser user2 = null;
|
||||
foreach (var u in users) user2 = u as MembershipUser;
|
||||
if (user1.UserName != user2.UserName)
|
||||
errors.Add("UserName", "This user is not registered with this e-mail");
|
||||
user = user1;
|
||||
}
|
||||
/// <summary>
|
||||
/// Avatars the URL.
|
||||
@ -267,12 +292,13 @@ namespace Yavsc.Helpers
|
||||
return serializer.Serialize(obj);
|
||||
}
|
||||
|
||||
public static void Notify(ViewDataDictionary ViewData, string message, string click_action=null, string clickActionName="Ok") {
|
||||
public static void Notify(this ViewDataDictionary ViewData, string message, string click_action=null, string clickActionName="Ok") {
|
||||
Notify(ViewData, new Notification { body = YavscAjaxHelper.QuoteJavascriptString(message),
|
||||
click_action = click_action, click_action_name = YavscAjaxHelper.QuoteJavascriptString(clickActionName)} ) ;
|
||||
}
|
||||
|
||||
public static void Notify(ViewDataDictionary ViewData, Notification note) {
|
||||
public static void Notify(this ViewDataDictionary ViewData, Notification note) {
|
||||
|
||||
if (ViewData ["Notifications"] == null)
|
||||
ViewData ["Notifications"] = new List<Notification> ();
|
||||
(ViewData ["Notifications"] as List<Notification>).Add (
|
||||
|
@ -49,7 +49,7 @@ var apiBaseUrl = '<%=Url.Content(Yavsc.WebApiConfig.UrlPrefixRelative)%>';
|
||||
<script>
|
||||
$(document).ready(function(){
|
||||
<% foreach (Notification note in (IEnumerable<Notification>) ViewData ["Notifications"] ) {
|
||||
if (note.click_action == null) {%> Yavsc.notice(<%=note.body%>); <% }
|
||||
if (note.click_action == null) {%> Yavsc.notice(<%=Ajax.JString(note.body)%>); <% }
|
||||
else {%> Yavsc.notice(<%=note.body%>, <%=note.click_action%>, <%=note.click_action_name%>); <% } %>
|
||||
<% } %>
|
||||
});
|
||||
|
@ -99,7 +99,7 @@ Vos billets
|
||||
</main>
|
||||
<footer>
|
||||
|
||||
<%= Html.TranslatedActionLink("Formulaire de contact","Contact","Home",null, new { @class="thanks" }) %>
|
||||
<%= Html.TranslatedActionLink("Contact","Contact","Home") %>
|
||||
|
||||
<div id="copyr">
|
||||
<a href="http://yavsc.pschneider.fr/Blogs/UserPost/paul/License">
|
||||
|
@ -7,13 +7,12 @@ self.apiBaseUrl = (apiBaseUrl || '/api');
|
||||
self.dumpprops = function (obj) {
|
||||
var str = "";
|
||||
for(var k in obj)
|
||||
if (obj.hasOwnProperty(k))
|
||||
str += " "+k + " = " + obj[k] + "\n";
|
||||
return (str); };
|
||||
|
||||
if (obj.hasOwnProperty(k))
|
||||
str += "."+k + " = " + obj[k] + "\n";
|
||||
return str;}
|
||||
self.logObj = function(obj) {
|
||||
console.log('obj:'+obj);
|
||||
console.log('-props:'+self.dumpprops(obj));
|
||||
console.log(self.dumpprops(obj));
|
||||
};
|
||||
|
||||
self.showHide = function () {
|
||||
@ -74,8 +73,8 @@ self.notice = function (msg, callback, msgok) {
|
||||
|
||||
self.onAjaxBadInput = function (data)
|
||||
{
|
||||
if (!data) { Yavsc.notice('no data'); return; }
|
||||
if (!data.responseJSON) { Yavsc.notice('no json data:'+data); return; }
|
||||
if (!data) { Yavsc.notice('Bad input, no data'); return; }
|
||||
if (!data.responseJSON) { Yavsc.notice('Bad input, no json data response'); return; }
|
||||
if (!Array.isArray(data.responseJSON)) { Yavsc.notice('Bad Input: '+data.responseJSON); return; }
|
||||
$.each(data.responseJSON, function (key, value) {
|
||||
var errspanid = "Err_" + value.key;
|
||||
|
@ -19,6 +19,7 @@
|
||||
<%= Html.AntiForgeryToken() %>
|
||||
<!-- Html.AntiForgeryToken() -->
|
||||
<input type="submit"/>
|
||||
<%= Html.TranslatedActionLink("ResetPassword")%>
|
||||
<% } %></div>
|
||||
<div class="panel">
|
||||
<%= Html.TranslatedActionLink("S'enregistrer","GetRegister",new {returnUrl=ViewData["returnUrl"]}, new { @class="actionlink" }) %>
|
||||
|
25
web/Views/Account/UpdatePassword.aspx
Normal file
25
web/Views/Account/UpdatePassword.aspx
Normal file
@ -0,0 +1,25 @@
|
||||
<%@ Page Title="Reset your Password" Language="C#" Inherits="System.Web.Mvc.ViewPage<LostPasswordModel>" MasterPageFile="~/Models/App.master" %>
|
||||
<asp:Content ContentPlaceHolderID="MainContent" ID="MainContentContent" runat="server">
|
||||
<%= Html.ValidationSummary("Modification de mot de passe") %>
|
||||
|
||||
<% using(Html.BeginForm("UpdatePassword", "Account")) { %>
|
||||
<%= Html.ValidationSummary() %>
|
||||
Modifiez votre mot de passe (<%= Html.Encode(ViewData["UserName"]) %>):
|
||||
<ul><li>
|
||||
<label for="Password">Saisissez ci après votre nouveau mot de passe:</label>
|
||||
<%= Html.Password( "Password" ) %>
|
||||
<%= Html.ValidationMessage("Password", "*") %></li>
|
||||
<li>
|
||||
<label for="ConfirmPassword">Confirmez votre nouveau mot de passe:</label>
|
||||
<%= Html.Password( "ConfirmPassword" ) %>
|
||||
<%= Html.ValidationMessage("ConfirmPassword", "*") %>
|
||||
</li>
|
||||
</ul>
|
||||
Puis, actionnez ce bouton:
|
||||
<input type="submit" value="Modifiez mon mot de passe!"/>
|
||||
<%= Html.Hidden("UserKey") %>
|
||||
<%= Html.Hidden("UserName") %>
|
||||
<% } %>
|
||||
</asp:Content>
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
<%@ Page Title="Billet" Language="C#" Inherits="System.Web.Mvc.ViewPage<UUTBlogEntryCollection>" MasterPageFile="~/Models/App.master"%>
|
||||
<%@ Page Title="Post" Language="C#" Inherits="System.Web.Mvc.ViewPage<UUTBlogEntryCollection>" MasterPageFile="~/Models/App.master"%>
|
||||
<asp:Content ContentPlaceHolderID="init" ID="init1" runat="server">
|
||||
<% Title = Model.Title+ " - " + ViewData ["BlogTitle"] ; %>
|
||||
</asp:Content>
|
||||
|
@ -71,7 +71,6 @@ Intervention souhaitée le : <input type="text" id="PreferedDate" name="Prefered
|
||||
|
||||
// $('#PreferedHour').timepicker(tpconfig);
|
||||
$('#PreferedDate').datepicker(dpconfig).zIndex(4);
|
||||
|
||||
});
|
||||
</script>
|
||||
|
||||
|
30
web/Views/FrontOffice/Contact.aspx
Normal file
30
web/Views/FrontOffice/Contact.aspx
Normal file
@ -0,0 +1,30 @@
|
||||
<%@ Page Title="Contact" Language="C#" MasterPageFile="~/Models/App.master" Inherits="System.Web.Mvc.ViewPage" %>
|
||||
|
||||
<asp:Content ContentPlaceHolderID="MainContent" ID="MainContentContent" runat="server">
|
||||
<div class="bigpanel">
|
||||
<p>
|
||||
<%= Html.Translate("ContactThisPerformer") %>
|
||||
</p>
|
||||
<% using (Html.BeginForm("Contact", "Home")) { %>
|
||||
<fieldset style="width:100%">
|
||||
<legend>Message</legend>
|
||||
<p>
|
||||
<%= Html.Label("email",LocalizedText.email) %>:
|
||||
<%= Html.ValidationMessage("email") %><br/>
|
||||
<%= Html.TextBox("email") %>
|
||||
</p>
|
||||
<p>
|
||||
<%= Html.Label("reason",LocalizedText.reason) %>:
|
||||
<%= Html.ValidationMessage("reason") %><br/>
|
||||
<%= Html.TextBox("reason") %>
|
||||
</p>
|
||||
<p>
|
||||
<%= Html.Label("body",LocalizedText.body) %>:
|
||||
<%= Html.ValidationMessage("body") %><br/>
|
||||
<%= Html.TextArea("body",new {@rows="25"}) %>
|
||||
</p>
|
||||
</fieldset>
|
||||
<input type="submit" value="<%=Html.Translate("Submit")%>">
|
||||
<% } %>
|
||||
</div>
|
||||
</asp:Content>
|
@ -20,7 +20,7 @@ data-roles="<%=string.Join (" ",Roles.GetRolesForUser (Model.UserName)) %>"
|
||||
<% } else { %>
|
||||
<i class="fa fa-envelope"></i>
|
||||
<%=Html.LabelFor(m => m.EMail)%>:
|
||||
<%= Html.Translate("AuthenticatedOnly") %>
|
||||
<%= Html.Translate("OnlyAuthorizedMayContact") %>
|
||||
<% }%>
|
||||
</address>
|
||||
|
||||
|
@ -1,9 +1,7 @@
|
||||
<%@ Page Language="C#" Title="Performers" MasterPageFile="~/Models/App.master" Inherits="System.Web.Mvc.ViewPage<IEnumerable<PerformerAvailability>>" %>
|
||||
|
||||
<asp:Content ContentPlaceHolderID="head" ID="headContent" runat="server">
|
||||
|
||||
<script type="text/javascript" src="/Scripts/yavsc.user.js"></script>
|
||||
|
||||
</asp:Content>
|
||||
|
||||
<asp:Content ID="MainContentContent" ContentPlaceHolderID="MainContent" runat="server">
|
||||
@ -11,33 +9,64 @@
|
||||
<div class="panel">
|
||||
<%= Html.Partial("Performer", available.Profile ) %>
|
||||
<div class="availability">
|
||||
<% if (available.DateAvailable) { %>
|
||||
|
||||
<% if (available.DateAvailable) { %><p>
|
||||
<%= Html.Translate("ThisPerformerGivesAccessToHisCalendarAndSeemsToBeAvailableThis") %>
|
||||
<%= available.PerformanceDate.ToString("D") %>
|
||||
<% } else if (available.Profile.HasCalendar()) { %>
|
||||
<%= available.PerformanceDate.ToString("D") %>.</p>
|
||||
<% } else if (available.Profile.HasCalendar()) { %><p>
|
||||
<%= Html.Translate("ThisPerformerGivesAccessToHisCalendarAndItAppearsHeShouldNotBeAvailableThis") %>
|
||||
<%= available.PerformanceDate.ToString("D") %>
|
||||
<% } else {%>
|
||||
<%= Html.Translate("ThisPerformerDoesntGiveAccessToHisCalendar") %>
|
||||
<%= available.PerformanceDate.ToString("D") %>.</p>
|
||||
<% } else {%><p>
|
||||
<%= Html.Translate("ThisPerformerDoesntGiveAccessToHisCalendar") %></p>
|
||||
<% } %>
|
||||
|
||||
<form action="/api/Basket/Create" method="POST">
|
||||
<div id="AskForAnEstimateResult"></div>
|
||||
<% if (User.Identity!=null && User.Identity.IsAuthenticated) { %>
|
||||
|
||||
<form data-ajax-action="Basket/Create" method="post" >
|
||||
<input type="hidden" name="productref" value="main">
|
||||
<input type="hidden" name="clientname" value="<%= ViewBag.ClientName %>">
|
||||
<input type="hidden" name="clientname" value="<%= ViewBag.ClientName %>">
|
||||
<input type="hidden" name="type" value="Yavsc.Model.FrontOffice.NominativeSimpleBookingQuery">
|
||||
<input type="hidden" name="MEACode" value="<%=ViewBag.SimpleBookingQuery.MEACode%>" >
|
||||
<input type="hidden" name="Need" value="<%=ViewBag.SimpleBookingQuery.Need%>" >
|
||||
<input type="hidden" name="PreferedDate" value="<%=ViewBag.SimpleBookingQuery.PreferedDate%>" >
|
||||
<input type="hidden" name="PerformerName" value="<%=available.Profile.UserName%>" >
|
||||
<input type="submit" class="actionlink" value="<%= Html.Translate("AskForAnEstimate") %>">
|
||||
<input type="submit" name="submit" class="actionlink" id="btnAskFAE" value="<%=Html.Translate("AskForAnEstimate")%>">
|
||||
</form>
|
||||
<div id="AskForAnEstimateResult"></div>
|
||||
|
||||
<% } else { %>
|
||||
<p><%= Html.Translate("YouNeedToBeAuthenticatedIOToContact") %></p>
|
||||
<p>
|
||||
<a href="<%= Url.RouteUrl("Default", new { controller = "Account", action = "Login", returnUrl=Request.Url.PathAndQuery}) %>" class="link" accesskey = "C">
|
||||
<i class="fa fa-sign-in"></i> Connexion
|
||||
</a></p>
|
||||
|
||||
<% } %>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<% } %>
|
||||
<script>
|
||||
function receiveCmdRef(response) {
|
||||
var msg = 'Votre commande a été enregistrée sous le numéro '+
|
||||
response.CommandId+' <br>'+
|
||||
(response.NotifiedOnMobile?'Une notification a été poussée sur le mobile du préstataire.<br>':'')+
|
||||
(response.EmailSent?'Un e-mail lui a été envoyé.':'');
|
||||
Yavsc.notice (msg);
|
||||
}
|
||||
$(document).ready(function(){
|
||||
$('form').submit (
|
||||
function(e){
|
||||
e.preventDefault();
|
||||
var jstxta = [];
|
||||
var action = $(this).data("ajax-action");
|
||||
$(this).children('input').each(function(i,elt){
|
||||
jstxta.push ('"'+elt.name+'":'+'"'+elt.value+'"') ;
|
||||
});
|
||||
var jstxt = "{"+jstxta.join(', ')+"}";
|
||||
var data = JSON.parse(jstxt);
|
||||
Yavsc.ajax(action,data,receiveCmdRef);
|
||||
});
|
||||
$("[data-type='user']").user({circles:<%=Ajax.JSonString(ViewData["Circles"])%>});
|
||||
});
|
||||
</script>
|
||||
|
@ -25,8 +25,8 @@ Prix unitaire : <%= Html.Encode(Model.UnitaryPrice.Quantity.ToString())%>
|
||||
<%= Html.CommandForm(Model,"Ajouter au panier") %>
|
||||
|
||||
<% if (Model.CommandValidityDates!=null) { %>
|
||||
Offre valable du <%= Model.CommandValidityDates.StartDate.ToString("dd/MM/yyyy") %> au
|
||||
<%= Model.CommandValidityDates.EndDate.ToString("dd/MM/yyyy") %>.
|
||||
Offre valable du <%= Model.CommandValidityDates.Start.ToString("dd/MM/yyyy") %> au
|
||||
<%= Model.CommandValidityDates.End.ToString("dd/MM/yyyy") %>.
|
||||
<% } %>
|
||||
|
||||
</div>
|
||||
|
@ -23,8 +23,8 @@ Prix horaire de la prestation :
|
||||
<%= Html.CommandForm(Model,"Ajouter au panier") %>
|
||||
|
||||
<% if (Model.CommandValidityDates!=null) { %>
|
||||
Offre valable du <%= Model.CommandValidityDates.StartDate.ToString("dd/MM/yyyy") %> au
|
||||
<%= Model.CommandValidityDates.EndDate.ToString("dd/MM/yyyy") %>.
|
||||
Offre valable du <%= Model.CommandValidityDates.Start.ToString("dd/MM/yyyy") %> au
|
||||
<%= Model.CommandValidityDates.End.ToString("dd/MM/yyyy") %>.
|
||||
<% } %>
|
||||
|
||||
</div>
|
||||
|
@ -1,9 +0,0 @@
|
||||
<%@ Page Title="Google error message" Language="C#" Inherits="System.Web.Mvc.ViewPage<OtherWebException>" MasterPageFile="~/Models/App.master" %>
|
||||
<asp:Content ContentPlaceHolderID="MainContent" ID="MainContentContent" runat="server">
|
||||
<h2><%= Html.Encode(Model.Title)%></h2>
|
||||
<pre>
|
||||
<code>
|
||||
<%= Html.Encode(Model.Content) %>
|
||||
</code></pre>
|
||||
</asp:Content>
|
||||
|
@ -15,23 +15,22 @@ Activité Principalement Exercée (APE) : 5829C Édition de logiciels applicatif
|
||||
<fieldset style="width:100%">
|
||||
<legend>Message</legend>
|
||||
<p>
|
||||
<%= Html.Label("email") %>:
|
||||
<%= Html.Label("email",LocalizedText.email) %>:
|
||||
<%= Html.ValidationMessage("email") %><br/>
|
||||
<%= Html.TextBox("email") %>
|
||||
</p>
|
||||
<p>
|
||||
<%= Html.Label("reason") %>:
|
||||
<%= Html.Label("reason",LocalizedText.reason) %>:
|
||||
<%= Html.ValidationMessage("reason") %><br/>
|
||||
<%= Html.TextBox("reason") %>
|
||||
</p>
|
||||
<p>
|
||||
<%= Html.Label("body") %>:
|
||||
<%= Html.Label("body",LocalizedText.body) %>:
|
||||
<%= Html.ValidationMessage("body") %><br/>
|
||||
<%= Html.TextArea("body",new {@rows="25"}) %>
|
||||
</p>
|
||||
</fieldset>
|
||||
<input type="submit" value="<%=Html.Translate("Submit")%>">
|
||||
|
||||
<% } %>
|
||||
</div>
|
||||
</asp:Content>
|
@ -268,16 +268,16 @@ http://msdn2.microsoft.com/en-us/library/b5ysx397.aspx
|
||||
<add name="yavsc" connectionString="[YOUR_CONNECTION_STRING]" providerName="Npgsql" />
|
||||
</connectionStrings>
|
||||
<appSettings>
|
||||
<!-- <add key="MonoServerDefaultIndexFiles" value="Index,index.html,Index.aspx" /> -->
|
||||
<add key="WorkflowContentProviderClass" value="yavsc.NpgsqlContentProvider" />
|
||||
<add key="AdminEMail" value="[YOUR_ADMIN_EMAIL]" />
|
||||
<add key="OwnerEMail" value="[YOUR_OWNER_EMAIL]" />
|
||||
<add key="Name" value="[YOUR_SITE_NAME]" />
|
||||
<add key="Themes" value="clear,dark,itdark,itclear,blue,green,base" />
|
||||
<add key="DefaultAvatar" value="/App_Themes/images/noavatar.png;image/png" />
|
||||
<add key="RegistrationMessage" value="/RegistrationMail.txt" />
|
||||
<!-- <add key="ClientValidationEnabled" value="true" />
|
||||
<add key="UnobtrusiveJavaScriptEnabled" value="true" /> -->
|
||||
<add key="RegistrationMessage" value="/App_Data/RegistrationMail.txt" />
|
||||
<add key="LostPasswordMessage" value="/App_Data/ResetPassword.txt" />
|
||||
<add key="ClientValidationEnabled" value="false" />
|
||||
<add key="UnobtrusiveJavaScriptEnabled" value="false" />
|
||||
<add key="PayPalLogger" value="PayPal.Log.Log4netLogger" />
|
||||
<add key="GOOGLE_API_KEY" value="[YOUR_GOOGLE_API_KEY]" />
|
||||
<add key="GOOGLE_CLIENT_ID" value="[YOUR_GOOGLE_CLIENT_ID.apps.googleusercontent.com]" />
|
||||
|
@ -285,7 +285,6 @@
|
||||
<Content Include="Views\Admin\Restore.aspx" />
|
||||
<Content Include="Views\Admin\Restored.aspx" />
|
||||
<Content Include="Catalog.xml" />
|
||||
<Content Include="RegistrationMail.txt" />
|
||||
<Content Include="Views\FrontOffice\Writting.ascx" />
|
||||
<Content Include="Scripts\jquery.metadata.js" />
|
||||
<Content Include="Views\Account\Unregister.aspx" />
|
||||
@ -479,7 +478,6 @@
|
||||
<Content Include="Views\Google\Auth.aspx" />
|
||||
<Content Include="Views\Google\ChooseCalendar.aspx" />
|
||||
<Content Include="Views\Google\ChooseADate.aspx" />
|
||||
<Content Include="Views\Google\OtherWebException.aspx" />
|
||||
<Content Include="Models\AppAdmin.master" />
|
||||
<Content Include="Views\Google\Index.aspx" />
|
||||
<Content Include="Views\Admin\RemoveRole.aspx" />
|
||||
@ -781,6 +779,11 @@
|
||||
<Content Include="Scripts\jquery.unobtrusive-ajax.js" />
|
||||
<Content Include="Scripts\jquery.validate.unobtrusive.min.js" />
|
||||
<Content Include="Scripts\jquery.validate.unobtrusive.js" />
|
||||
<Content Include="App_Data\RegistrationMail.txt" />
|
||||
<Content Include="App_Data\ResetPassword.txt" />
|
||||
<Content Include="Views\Account\UpdatePassword.aspx" />
|
||||
<Content Include="App_Themes\base\style.css" />
|
||||
<Content Include="Views\FrontOffice\Contact.aspx" />
|
||||
</ItemGroup>
|
||||
<Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
|
||||
<Import Project="$(MSBuildExtensionsPath)\Microsoft\VisualStudio\v10.0\WebApplications\Microsoft.WebApplication.targets" />
|
||||
@ -819,10 +822,10 @@
|
||||
<None Include="Web.Lua.config" />
|
||||
<None Include="Web.Release.config" />
|
||||
<None Include="Web.TotemPre.config" />
|
||||
<None Include="Web.TotemProd.config" />
|
||||
<None Include="Scripts\jquery.mobile-1.4.5.min.map" />
|
||||
<None Include="App_Themes\images\GitHub.ico" />
|
||||
<None Include="Web.LuaDebug.config" />
|
||||
<None Include="Web.Totemprod.config" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\NpgsqlMRPProviders\NpgsqlMRPProviders.csproj">
|
||||
|
@ -1,3 +1,36 @@
|
||||
2015-12-30 Paul Schneider <paul@pschneider.fr>
|
||||
|
||||
* UpdatePassword.cs: modèle de la modification de mot de passe
|
||||
au
|
||||
jeton de securité (qui est encore un fake en l'état)
|
||||
|
||||
* CommandRegistration.cs: un enregistrement de commande
|
||||
|
||||
* NominativeCommandRegistration.cs: un enregistrement de
|
||||
commande nominative
|
||||
|
||||
* Product.cs: utilise la période du calendrier
|
||||
|
||||
* Commande.cs: renvoie un objet à la prise de commande,
|
||||
indiquant l'identifiant de commande, et les messages envoyés
|
||||
en cas de commande nominative.
|
||||
|
||||
* GoogleHelpers.cs: icone à la notification mobile
|
||||
|
||||
* LocalizedText.resx:
|
||||
* LocalizedText.fr.resx:
|
||||
* LocalizedText.Designer.cs:
|
||||
* LocalizedText.fr.Designer.cs: traductions
|
||||
|
||||
* UserNameBase.cs: fixe la dé-sérialisation
|
||||
|
||||
* WorkFlowManager.cs: refabrication de la prise de commande
|
||||
|
||||
* YavscModel.csproj: nouveaux objets du modèle
|
||||
|
||||
* Period.cs: fondre la période: celle du catalogue disparait,
|
||||
au profit de celle du calendrier.
|
||||
|
||||
2015-12-24 Paul Schneider <paul@pschneider.fr>
|
||||
|
||||
* NominativeEventPub.cs: implémentation du nom de préstataire
|
||||
|
@ -1,29 +0,0 @@
|
||||
using System;
|
||||
|
||||
namespace Yavsc.Model.FrontOffice.Catalog
|
||||
{
|
||||
/// <summary>
|
||||
/// Period.
|
||||
/// </summary>
|
||||
public class Period
|
||||
{
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the <see cref="Yavsc.Model.FrontOffice.Period"/> class.
|
||||
/// </summary>
|
||||
public Period ()
|
||||
{
|
||||
}
|
||||
/// <summary>
|
||||
/// Gets or sets the start date.
|
||||
/// </summary>
|
||||
/// <value>The start date.</value>
|
||||
public DateTime StartDate { get; set; }
|
||||
/// <summary>
|
||||
/// Gets or sets the end date.
|
||||
/// </summary>
|
||||
/// <value>The end date.</value>
|
||||
public DateTime EndDate { get; set; }
|
||||
|
||||
}
|
||||
}
|
||||
|
@ -1,5 +1,6 @@
|
||||
using System;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using Yavsc.Model.Calendar;
|
||||
|
||||
namespace Yavsc.Model.FrontOffice.Catalog
|
||||
{
|
||||
|
@ -7,6 +7,7 @@ using System.Web;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using System.Reflection;
|
||||
using Yavsc.Model.WorkFlow;
|
||||
|
||||
namespace Yavsc.Model.FrontOffice
|
||||
{
|
||||
@ -62,6 +63,11 @@ namespace Yavsc.Model.FrontOffice
|
||||
public Command()
|
||||
{
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Sets the parameters.
|
||||
/// </summary>
|
||||
/// <param name="collection">Collection.</param>
|
||||
public void SetParameters(Dictionary<string,string> collection)
|
||||
{
|
||||
Parameters.Clear ();
|
||||
@ -88,7 +94,7 @@ namespace Yavsc.Model.FrontOffice
|
||||
/// </summary>
|
||||
/// <param name="collection">Collection.</param>
|
||||
/// <param name="files">Files.</param>
|
||||
private void FromPost(Dictionary<string,string> collection, NameObjectCollectionBase files)
|
||||
private CommandRegistration FromPost(Dictionary<string,string> collection, NameObjectCollectionBase files)
|
||||
{
|
||||
// string catref=collection["catref"]; // Catalog Url from which formdata has been built
|
||||
ProductRef = collection ["productref"];
|
||||
@ -104,13 +110,16 @@ namespace Yavsc.Model.FrontOffice
|
||||
Status = CommandStatus.Inserted;
|
||||
// stores the parameters:
|
||||
SetParameters(collection);
|
||||
WorkFlowManager.RegisterCommand (this); // gives a value to this.Id
|
||||
var registration = WorkFlowManager.RegisterCommand (this); // gives a value to this.Id
|
||||
UserFileSystemManager.Put(Path.Combine("commandes",Id.ToString ()),files);
|
||||
return registration;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Creates a command using the specified collection
|
||||
/// as command parameters, handles the files upload.
|
||||
/// as command parameters, handles the files upload,
|
||||
/// ans register the command in db, positionning the
|
||||
/// command id.
|
||||
///
|
||||
/// Required values in the command parameters :
|
||||
///
|
||||
@ -118,21 +127,27 @@ namespace Yavsc.Model.FrontOffice
|
||||
/// * type: the command concrete class name.
|
||||
///
|
||||
/// </summary>
|
||||
/// <returns>The command.</returns>
|
||||
/// <param name="collection">Collection.</param>
|
||||
/// <param name="files">Files.</param>
|
||||
public static Command CreateCommand (Dictionary<string,string> collection, NameObjectCollectionBase files)
|
||||
/// <param name="cmdreg">Cmdreg.</param>
|
||||
public static Command CreateCommand (
|
||||
Dictionary<string,string> collection,
|
||||
NameObjectCollectionBase files,
|
||||
out CommandRegistration cmdreg)
|
||||
{
|
||||
string type = collection ["type"];
|
||||
if (type == null)
|
||||
throw new InvalidOperationException (
|
||||
"A command type cannot be blank");
|
||||
var cmd = CreateCommand (type);
|
||||
cmd.FromPost (collection, files);
|
||||
cmdreg = cmd.FromPost (collection, files);
|
||||
return cmd;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Creates the command.
|
||||
/// Creates the command, for deserialisation,
|
||||
/// do not register it in database.
|
||||
/// </summary>
|
||||
/// <returns>The command.</returns>
|
||||
/// <param name="className">Class name.</param>
|
||||
@ -152,6 +167,11 @@ namespace Yavsc.Model.FrontOffice
|
||||
var cmd = ci.Invoke (new object[]{ });
|
||||
return cmd as Command;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets the command textual description.
|
||||
/// </summary>
|
||||
/// <returns>The description.</returns>
|
||||
public abstract string GetDescription ();
|
||||
}
|
||||
}
|
||||
|
@ -153,7 +153,7 @@ namespace Yavsc.Model.Google.Api
|
||||
if (regid == null)
|
||||
throw new NotImplementedException ("Notification via e-mail");
|
||||
var msg = new MessageWithPayload<YaEvent> () {
|
||||
notification = new Notification() { title = evpub.Title, body = evpub.Description, icon = "event" },
|
||||
notification = new Notification() { title = evpub.Title, body = evpub.Description, icon = "icon" },
|
||||
data = evpub, registration_ids = new string[] { regid } };
|
||||
return r.Invoke (msg);
|
||||
}
|
||||
|
104
yavscModel/LocalizedText.Designer.cs
generated
104
yavscModel/LocalizedText.Designer.cs
generated
@ -46,6 +46,12 @@ namespace Yavsc.Model {
|
||||
}
|
||||
}
|
||||
|
||||
public static string Private_circle {
|
||||
get {
|
||||
return ResourceManager.GetString("Private_circle", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
public static string Comment {
|
||||
get {
|
||||
return ResourceManager.GetString("Comment", resourceCulture);
|
||||
@ -106,9 +112,9 @@ namespace Yavsc.Model {
|
||||
}
|
||||
}
|
||||
|
||||
public static string Welcome {
|
||||
public static string User_name {
|
||||
get {
|
||||
return ResourceManager.GetString("Welcome", resourceCulture);
|
||||
return ResourceManager.GetString("User_name", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
@ -124,6 +130,12 @@ namespace Yavsc.Model {
|
||||
}
|
||||
}
|
||||
|
||||
public static string YourNeed {
|
||||
get {
|
||||
return ResourceManager.GetString("YourNeed", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
public static string ExistantDB {
|
||||
get {
|
||||
return ResourceManager.GetString("ExistantDB", resourceCulture);
|
||||
@ -202,12 +214,30 @@ namespace Yavsc.Model {
|
||||
}
|
||||
}
|
||||
|
||||
public static string email {
|
||||
get {
|
||||
return ResourceManager.GetString("email", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
public static string EndDate {
|
||||
get {
|
||||
return ResourceManager.GetString("EndDate", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
public static string body {
|
||||
get {
|
||||
return ResourceManager.GetString("body", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
public static string ResetPassword {
|
||||
get {
|
||||
return ResourceManager.GetString("ResetPassword", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
public static string DoSpecifyCircles {
|
||||
get {
|
||||
return ResourceManager.GetString("DoSpecifyCircles", resourceCulture);
|
||||
@ -292,6 +322,12 @@ namespace Yavsc.Model {
|
||||
}
|
||||
}
|
||||
|
||||
public static string YouNeedToBeAuthenticatedIOToContact {
|
||||
get {
|
||||
return ResourceManager.GetString("YouNeedToBeAuthenticatedIOToContact", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
public static string Unitary_cost {
|
||||
get {
|
||||
return ResourceManager.GetString("Unitary_cost", resourceCulture);
|
||||
@ -412,9 +448,15 @@ namespace Yavsc.Model {
|
||||
}
|
||||
}
|
||||
|
||||
public static string YourNeed {
|
||||
public static string Description {
|
||||
get {
|
||||
return ResourceManager.GetString("YourNeed", resourceCulture);
|
||||
return ResourceManager.GetString("Description", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
public static string was_added_to_the_role {
|
||||
get {
|
||||
return ResourceManager.GetString("was_added_to_the_role", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
@ -436,9 +478,15 @@ namespace Yavsc.Model {
|
||||
}
|
||||
}
|
||||
|
||||
public static string Private_circle {
|
||||
public static string ContactThisPerformer {
|
||||
get {
|
||||
return ResourceManager.GetString("Private_circle", resourceCulture);
|
||||
return ResourceManager.GetString("ContactThisPerformer", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
public static string OnlyAuthorizedMayContact {
|
||||
get {
|
||||
return ResourceManager.GetString("OnlyAuthorizedMayContact", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
@ -520,12 +568,6 @@ namespace Yavsc.Model {
|
||||
}
|
||||
}
|
||||
|
||||
public static string User_name {
|
||||
get {
|
||||
return ResourceManager.GetString("User_name", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
public static string Item_added_to_basket {
|
||||
get {
|
||||
return ResourceManager.GetString("Item_added_to_basket", resourceCulture);
|
||||
@ -538,6 +580,12 @@ namespace Yavsc.Model {
|
||||
}
|
||||
}
|
||||
|
||||
public static string Welcome {
|
||||
get {
|
||||
return ResourceManager.GetString("Welcome", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
public static string YourEstimates {
|
||||
get {
|
||||
return ResourceManager.GetString("YourEstimates", resourceCulture);
|
||||
@ -580,9 +628,9 @@ namespace Yavsc.Model {
|
||||
}
|
||||
}
|
||||
|
||||
public static string YourMEACode {
|
||||
public static string PhotoUpdated {
|
||||
get {
|
||||
return ResourceManager.GetString("YourMEACode", resourceCulture);
|
||||
return ResourceManager.GetString("PhotoUpdated", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
@ -706,18 +754,6 @@ namespace Yavsc.Model {
|
||||
}
|
||||
}
|
||||
|
||||
public static string PhotoUpdated {
|
||||
get {
|
||||
return ResourceManager.GetString("PhotoUpdated", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
public static string Description {
|
||||
get {
|
||||
return ResourceManager.GetString("Description", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
public static string from {
|
||||
get {
|
||||
return ResourceManager.GetString("from", resourceCulture);
|
||||
@ -814,9 +850,9 @@ namespace Yavsc.Model {
|
||||
}
|
||||
}
|
||||
|
||||
public static string was_added_to_the_role {
|
||||
public static string reason {
|
||||
get {
|
||||
return ResourceManager.GetString("was_added_to_the_role", resourceCulture);
|
||||
return ResourceManager.GetString("reason", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
@ -826,6 +862,12 @@ namespace Yavsc.Model {
|
||||
}
|
||||
}
|
||||
|
||||
public static string YourMEACode {
|
||||
get {
|
||||
return ResourceManager.GetString("YourMEACode", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
public static string ReadMore {
|
||||
get {
|
||||
return ResourceManager.GetString("ReadMore", resourceCulture);
|
||||
@ -898,6 +940,12 @@ namespace Yavsc.Model {
|
||||
}
|
||||
}
|
||||
|
||||
public static string NewPasswordMessageSent {
|
||||
get {
|
||||
return ResourceManager.GetString("NewPasswordMessageSent", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
public static string SiteSkills {
|
||||
get {
|
||||
return ResourceManager.GetString("SiteSkills", resourceCulture);
|
||||
|
84
yavscModel/LocalizedText.fr.Designer.cs
generated
84
yavscModel/LocalizedText.fr.Designer.cs
generated
@ -118,6 +118,12 @@ namespace Yavsc.Model {
|
||||
}
|
||||
}
|
||||
|
||||
public static string YourNeed {
|
||||
get {
|
||||
return ResourceManager.GetString("YourNeed", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
public static string ExistantDB {
|
||||
get {
|
||||
return ResourceManager.GetString("ExistantDB", resourceCulture);
|
||||
@ -196,12 +202,30 @@ namespace Yavsc.Model {
|
||||
}
|
||||
}
|
||||
|
||||
public static string email {
|
||||
get {
|
||||
return ResourceManager.GetString("email", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
public static string EndDate {
|
||||
get {
|
||||
return ResourceManager.GetString("EndDate", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
public static string body {
|
||||
get {
|
||||
return ResourceManager.GetString("body", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
public static string ResetPassword {
|
||||
get {
|
||||
return ResourceManager.GetString("ResetPassword", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
public static string DoSpecifyCircles {
|
||||
get {
|
||||
return ResourceManager.GetString("DoSpecifyCircles", resourceCulture);
|
||||
@ -292,6 +316,12 @@ namespace Yavsc.Model {
|
||||
}
|
||||
}
|
||||
|
||||
public static string YouNeedToBeAuthenticatedIOToContact {
|
||||
get {
|
||||
return ResourceManager.GetString("YouNeedToBeAuthenticatedIOToContact", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
public static string Unitary_cost {
|
||||
get {
|
||||
return ResourceManager.GetString("Unitary_cost", resourceCulture);
|
||||
@ -406,9 +436,15 @@ namespace Yavsc.Model {
|
||||
}
|
||||
}
|
||||
|
||||
public static string YourNeed {
|
||||
public static string Description {
|
||||
get {
|
||||
return ResourceManager.GetString("YourNeed", resourceCulture);
|
||||
return ResourceManager.GetString("Description", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
public static string was_added_to_the_role {
|
||||
get {
|
||||
return ResourceManager.GetString("was_added_to_the_role", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
@ -436,6 +472,18 @@ namespace Yavsc.Model {
|
||||
}
|
||||
}
|
||||
|
||||
public static string ContactThisPerformer {
|
||||
get {
|
||||
return ResourceManager.GetString("ContactThisPerformer", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
public static string OnlyAuthorizedMayContact {
|
||||
get {
|
||||
return ResourceManager.GetString("OnlyAuthorizedMayContact", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
public static string AnIMessageHasbeenSent {
|
||||
get {
|
||||
return ResourceManager.GetString("AnIMessageHasbeenSent", resourceCulture);
|
||||
@ -574,9 +622,9 @@ namespace Yavsc.Model {
|
||||
}
|
||||
}
|
||||
|
||||
public static string YourMEACode {
|
||||
public static string PhotoUpdated {
|
||||
get {
|
||||
return ResourceManager.GetString("YourMEACode", resourceCulture);
|
||||
return ResourceManager.GetString("PhotoUpdated", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
@ -694,18 +742,6 @@ namespace Yavsc.Model {
|
||||
}
|
||||
}
|
||||
|
||||
public static string PhotoUpdated {
|
||||
get {
|
||||
return ResourceManager.GetString("PhotoUpdated", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
public static string Description {
|
||||
get {
|
||||
return ResourceManager.GetString("Description", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
public static string from {
|
||||
get {
|
||||
return ResourceManager.GetString("from", resourceCulture);
|
||||
@ -808,9 +844,15 @@ namespace Yavsc.Model {
|
||||
}
|
||||
}
|
||||
|
||||
public static string was_added_to_the_role {
|
||||
public static string reason {
|
||||
get {
|
||||
return ResourceManager.GetString("was_added_to_the_role", resourceCulture);
|
||||
return ResourceManager.GetString("reason", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
public static string YourMEACode {
|
||||
get {
|
||||
return ResourceManager.GetString("YourMEACode", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
@ -886,6 +928,12 @@ namespace Yavsc.Model {
|
||||
}
|
||||
}
|
||||
|
||||
public static string NewPasswordMessageSent {
|
||||
get {
|
||||
return ResourceManager.GetString("NewPasswordMessageSent", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
public static string SiteSkills {
|
||||
get {
|
||||
return ResourceManager.GetString("SiteSkills", resourceCulture);
|
||||
|
@ -24,12 +24,13 @@
|
||||
<data name="available"><value>disponible</value></data>
|
||||
<data name="AuthenticatedOnly"><value>Seuls les utilisateurs authentifiés peuvent accèder à cette information.</value></data>
|
||||
<data name="Basket"><value>Panier</value></data>
|
||||
<data name="Bill_edition"><value>Édition d'un billet</value></data>
|
||||
<data name="Bill_removal"><value>Suppression d'un billet</value></data>
|
||||
<data name="BillAccessControl"><value>Contrôle d'accès au Billet</value></data>
|
||||
<data name="BillCreated"><value>Billet créé</value></data>
|
||||
<data name="BillSourceCode"><value>Code source du billet</value></data>
|
||||
<data name="BillUpdated"><value>Billet mis à jour</value></data>
|
||||
<data name="Bill_edition"><value>Édition d'un article</value></data>
|
||||
<data name="Bill_removal"><value>Suppression d'un article</value></data>
|
||||
<data name="BillAccessControl"><value>Contrôle d'accès à l'article</value></data>
|
||||
<data name="BillCreated"><value>Article créé</value></data>
|
||||
<data name="BillSourceCode"><value>Code source de l'article</value></data>
|
||||
<data name="BillUpdated"><value>Article mis à jour</value></data>
|
||||
<data name="body"><value>corps de texte</value></data>
|
||||
<data name="BookingTitleArtiste"><value>Reserver les services d'un artiste</value></data>
|
||||
<data name="BookingTitle6829C"><value>Reserver les services d'un éditeur de logiciel</value></data>
|
||||
<data name="Catalog"><value>Catalogue</value></data>
|
||||
@ -38,8 +39,9 @@
|
||||
<data name="ChooseADateInTheFutur"><value>S'il vous plait, choisissez une date dans le futur</value></data>
|
||||
<data name="Ciffer"><value>Chiffre</value></data>
|
||||
<data name="Circles"><value>Cercles</value></data>
|
||||
<data name="Consultant"><value>Consultant</value></data>
|
||||
<data name="Comment"><value>Commentaire</value></data>
|
||||
<data name="Consultant"><value>Consultant</value></data>
|
||||
<data name="ContactThisPerformer"><value>Contactez ce préstataire</value></data>
|
||||
<data name="Count"><value>Nombre</value></data>
|
||||
<data name="Create"><value>Créer</value></data>
|
||||
<data name="Date_search"><value>Demande de rendez-vous</value></data>
|
||||
@ -58,6 +60,7 @@
|
||||
<data name="EditRelatedSkills"><value>Editer les compétences associées</value></data>
|
||||
<data name="EndDate"><value>Date de fin</value></data>
|
||||
<data name="EndHour"><value>Heure de fin</value></data>
|
||||
<data name="email"><value>e-mail</value></data>
|
||||
<data name="entries"><value>entrées</value></data>
|
||||
<data name="Estimate_not_found"><value>Devis non trouvé</value></data>
|
||||
<data name="EventWebPage"><value>Page web de l'événement</value></data>
|
||||
@ -67,7 +70,7 @@
|
||||
<data name="Google_calendar"><value>Agenda Google</value></data>
|
||||
<data name="Google_error"><value>Erreur Google : {0}</value></data>
|
||||
<data name="Google_registration_id"><value>Identifiant d'enregistrement Google</value></data>
|
||||
<data name="Hide_source"><value>Cacher le texte source du billet</value></data>
|
||||
<data name="Hide_source"><value>Cacher le texte source de l'article</value></data>
|
||||
<data name="Home"><value>Accueil</value></data>
|
||||
<data name="Hide"><value>Cacher</value></data>
|
||||
<data name="hidden"><value>caché</value></data>
|
||||
@ -92,14 +95,17 @@
|
||||
<data name="Needs"><value>Besoins</value></data>
|
||||
<data name="Need"><value>Besoin</value></data>
|
||||
<data name="New_Tag"><value>Nouveau Tag</value></data>
|
||||
<data name="NewPasswordMessageSent"><value>Un e-mail vient de vous être envoyé, il contient le lien à suivre
|
||||
pour pouvoir mettre à jour votre mot de passe.</value></data>
|
||||
<data name="no_content"><value>pas de contenu</value></data>
|
||||
<data name="NoSkillforthisactivity"><value>Aucune compétence n'a été enregistrée par aucun préstataire pour cette activité</value></data>
|
||||
<data name="NoSkillforthisactivity"><value>Aucune compétence n'a été enregistrée par aucun préstataire pour cette activité.</value></data>
|
||||
<data name="none"><value>aucun(e)</value></data>
|
||||
<data name="Non_existent_user"><value>Non existent user</value></data>
|
||||
<data name="Not Approuved"><value>Non approuvé</value></data>
|
||||
<data name="No_calendar_for_this_user"><value>Le préstataire n'a pas de calendrier associé.</value></data>
|
||||
<data name="Offline"><value>Hors ligne</value></data>
|
||||
<data name="Online"><value>En ligne</value></data>
|
||||
<data name="OnlyAuthorizedMayContact"><value>Seuls les utilisateurs authorisés peuvent contacter un préstataire par courrier.</value></data>
|
||||
<data name="Pdf_version"><value>Version Pdf</value></data>
|
||||
<data name="PerformanceDate"><value>Date de la prestation</value></data>
|
||||
<data name="Performers"><value>Perstataires</value></data>
|
||||
@ -112,6 +118,7 @@
|
||||
<data name="Profile_edition"><value>Édition du profile</value></data>
|
||||
<data name="Product_reference"><value>Référence produit</value></data>
|
||||
<data name="ReadMore"><value>Lire la suite ...</value></data>
|
||||
<data name="reason"><value>réson</value></data>
|
||||
<data name="Role"><value>Rôle</value></data>
|
||||
<data name="prestation"><value>prestation</value></data>
|
||||
<data name="ProviderId"><value>Identifiant du fournisseur</value></data>
|
||||
@ -119,12 +126,13 @@
|
||||
<data name="Register"><value>Enregistez-vous</value></data>
|
||||
<data name="Remember_me"><value>Se souvenir du mot de passe</value></data>
|
||||
<data name="Remove"><value>Supprimer</value></data>
|
||||
<data name="ResetPassword"><value>Ré-initialiser votre mot de passe</value></data>
|
||||
<data name="role_created"><value>Rôle créé</value></data>
|
||||
<data name="Search"><value>Chercher</value></data>
|
||||
<data name="SiteSkills"><value>Talents/Compétences/Spécialités gérés sur ce site</value></data>
|
||||
<data name="Skill"><value>Compétence</value></data>
|
||||
<data name="Skills"><value>Talents/Compétences/Spécialités</value></data>
|
||||
<data name="SomeoneAskingYouForAnEstimate"><value>{0} would want you to establish an estimate concerning {1}</value></data>
|
||||
<data name="SomeoneAskingYouForAnEstimate"><value>{0} désirerait un devis concernant {1}</value></data>
|
||||
<data name="StartDate"><value>Date de début</value></data>
|
||||
<data name="StartDateAfterEndDate"><value>La date de fin doit être postérieure à la date de début.</value></data>
|
||||
<data name="StartHour"><value>Heure de début</value></data>
|
||||
@ -143,19 +151,21 @@
|
||||
<data name="UsersInRole">Liste des utilisateurs assumant le rôle "{0}"</data>
|
||||
<data name="UserSkills"><value>Talents/compétences/spécialités utilisateur</value></data>
|
||||
<data name="UserNotInThisRole"><value>Le rôle demandé n'est pas assumé par ce préstataire</value></data>
|
||||
<data name="View_source"><value>Voir le texte source du billet</value></data>
|
||||
<data name="View_source"><value>Voir le texte source de l'article</value></data>
|
||||
<data name="was_added_to_the_role"><value>a été ajouté au rôle</value></data>
|
||||
<data name="was_added_to_the_empty_role"><value>Il n'y avait pas d'utilisateur dans le rôle "{1}". Vous ({0}) avez été ajouté au rôle "{1}".</value></data>
|
||||
<data name="Welcome"><value>Bienvenue</value><comment></comment></data>
|
||||
<data name="XHasBeenNotified"><value>{0} à été notifié de votre demande, vous devriez être contacté rapidement</value></data>
|
||||
<data name="Xshouldbeavailable"><value>Au vu de son calendrier,
|
||||
{0} devrait être disponible pour ce rendez-vous</value></data>
|
||||
<data name="YouNeedToBeAuthenticatedIOToContact"><value>Vous devez vous authentifier pour pouvoir demander un devis
|
||||
à un préstataire.</value></data>
|
||||
<data name="younotadmin"><value>Vous n'êtes pas administrateur</value></data>
|
||||
<data name="YourEstimates"><value>Vos Devis</value></data>
|
||||
<data name="YourMEACode"><value>Votre activité</value></data>
|
||||
<data name="YourNeed"><value>Votre besoin</value></data>
|
||||
<data name="yourquerytransmitted"><value>Votre demande a été transmise</value></data>
|
||||
<data name="YourSkills"><value>Vos talents, vos spécialités, le domaine de vos activités</value></data>
|
||||
<data name="YourPosts"><value>Vos posts</value></data>
|
||||
<data name="YourPosts"><value>Vos publications</value></data>
|
||||
<data name="YourProfile"><value>Votre profile</value></data>
|
||||
</root>
|
||||
|
@ -31,10 +31,12 @@
|
||||
<data name="BillCreated"><value>Bill created</value></data>
|
||||
<data name="BillSourceCode"><value>Bill source code</value></data>
|
||||
<data name="BillUpdated"><value>Bill updated</value></data>
|
||||
<data name="body"><value>body</value></data>
|
||||
<data name="BookingTitleArtiste"><value>Book an artiste</value></data>
|
||||
<data name="BookingTitle6829C"><value>Book a software editor</value></data>
|
||||
<data name="Catalog"><value>Catalog</value></data>
|
||||
<data name="Create"><value>Create</value></data>
|
||||
<data name="ContactThisPerformer"><value>Contact this performer</value></data>
|
||||
<data name="Count"><value>Count</value></data>
|
||||
<data name="ChooseADescription"><value>Please, choose a description</value></data>
|
||||
<data name="ChooseATitle"><value>Please, choose a title</value></data>
|
||||
@ -61,6 +63,7 @@
|
||||
<data name="EditRelatedSkills"><value>Edit related skills</value></data>
|
||||
<data name="EndHour"><value>End hour</value></data>
|
||||
<data name="EndDate"><value>End date</value></data>
|
||||
<data name="email"><value>e-mail</value></data>
|
||||
<data name="entries"><value>entries</value></data>
|
||||
<data name="Estimate_not_found"><value>Estimate not found</value></data>
|
||||
<data name="EventWebPage"><value>Event Web page</value></data>
|
||||
@ -96,6 +99,8 @@
|
||||
<data name="Needs"><value>Needs</value></data>
|
||||
<data name="Need"><value>Need</value></data>
|
||||
<data name="New_Tag"><value>New Tag</value></data>
|
||||
<data name="NewPasswordMessageSent"><value>A message had been sent, containing a link to follow in order
|
||||
to update your password.</value></data>
|
||||
<data name="no_content"><value>no content</value></data>
|
||||
<data name="NoSkillforthisactivity"><value>No skill was informed by any performer for this activity</value></data>
|
||||
<data name="none"><value>none</value></data>
|
||||
@ -103,6 +108,7 @@
|
||||
<data name="Not_Approuved"><value>Not Approuved</value></data>
|
||||
<data name="No_calendar_for_this_user"><value>No calendar was associated to this user.</value></data>
|
||||
<data name="Online"><value>Online</value></data>
|
||||
<data name="OnlyAuthorizedMayContact"><value>Only authorized users may contact a performer by mail.</value></data>
|
||||
<data name="Offline"><value>Offline</value></data>
|
||||
<data name="Pdf_version"><value>Pdf version</value></data>
|
||||
<data name="PerformanceDate"><value>Performance Date</value></data>
|
||||
@ -119,9 +125,11 @@
|
||||
<data name="ProviderName"><value>Provider name</value></data>
|
||||
<data name="Product_reference"><value>Product_reference</value></data>
|
||||
<data name="ReadMore"><value>Read more ...</value></data>
|
||||
<data name="reason"><value>reason</value></data>
|
||||
<data name="Register"><value>Register</value></data>
|
||||
<data name="Remember_me"><value>Remember me</value></data>
|
||||
<data name="Remove"><value>Remove</value></data>
|
||||
<data name="ResetPassword"><value>Reset your password</value></data>
|
||||
<data name="Role"><value>Role</value></data>
|
||||
<data name="role_created"><value>role created</value></data>
|
||||
<data name="Search"><value>Search</value></data>
|
||||
@ -155,6 +163,7 @@
|
||||
<data name="XHasBeenNotified"><value>{0} has been notified of your query, you should be fast contacted</value></data>
|
||||
<data name="Xshouldbeavailable"><value>regarding his calendar,
|
||||
{0} should be available for this booking</value></data>
|
||||
<data name="YouNeedToBeAuthenticatedIOToContact"><value>You need to be authenticated in order to contact a performer</value></data>
|
||||
<data name="younotadmin"><value>You're not administrator</value></data>
|
||||
<data name="YourEstimates"><value>Your estimates</value></data>
|
||||
<data name="YourMEACode"><value>Your activity</value></data>
|
||||
|
41
yavscModel/RolesAndMembers/UpdatePassword.cs
Normal file
41
yavscModel/RolesAndMembers/UpdatePassword.cs
Normal file
@ -0,0 +1,41 @@
|
||||
//
|
||||
// UpdatePassword.cs
|
||||
//
|
||||
// Author:
|
||||
// Paul Schneider <paul@pschneider.fr>
|
||||
//
|
||||
// Copyright (c) 2015 GNU GPL
|
||||
//
|
||||
// This program is free software: you can redistribute it and/or modify
|
||||
// it under the terms of the GNU Lesser General Public License as published by
|
||||
// the Free Software Foundation, either version 3 of the License, or
|
||||
// (at your option) any later version.
|
||||
//
|
||||
// This program is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
// GNU Lesser General Public License for more details.
|
||||
//
|
||||
// You should have received a copy of the GNU Lesser General Public License
|
||||
// along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
using System;
|
||||
using System.ComponentModel;
|
||||
|
||||
namespace Yavsc.Model.RolesAndMembers
|
||||
{
|
||||
public class UpdatePassword: UserNameBase
|
||||
{
|
||||
public string UserKey {get; set; }
|
||||
|
||||
[DisplayName("Mot de passe")]
|
||||
public string Password {get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the confirm password.
|
||||
/// </summary>
|
||||
/// <value>The confirm password.</value>
|
||||
[DisplayName("Confirmation du mot de passe")]
|
||||
public string ConfirmPassword { get; set; }
|
||||
}
|
||||
}
|
||||
|
@ -47,7 +47,7 @@ namespace Yavsc.Model.RolesAndMembers
|
||||
return UserName;
|
||||
}
|
||||
set {
|
||||
throw new NotImplementedException ();
|
||||
UserName = value;
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
|
46
yavscModel/WorkFlow/CommandRegistration.cs
Normal file
46
yavscModel/WorkFlow/CommandRegistration.cs
Normal file
@ -0,0 +1,46 @@
|
||||
//
|
||||
// CommandRegistration.cs
|
||||
//
|
||||
// Author:
|
||||
// Paul Schneider <paul@pschneider.fr>
|
||||
//
|
||||
// Copyright (c) 2015 GNU GPL
|
||||
//
|
||||
// This program is free software: you can redistribute it and/or modify
|
||||
// it under the terms of the GNU Lesser General Public License as published by
|
||||
// the Free Software Foundation, either version 3 of the License, or
|
||||
// (at your option) any later version.
|
||||
//
|
||||
// This program is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
// GNU Lesser General Public License for more details.
|
||||
//
|
||||
// You should have received a copy of the GNU Lesser General Public License
|
||||
// along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
using System;
|
||||
using Yavsc.Model.WorkFlow;
|
||||
using System.Configuration;
|
||||
using System.Collections.Specialized;
|
||||
using Yavsc.Model.FrontOffice;
|
||||
using System.Configuration.Provider;
|
||||
using Yavsc.Model.FrontOffice.Catalog;
|
||||
using System.Collections.Generic;
|
||||
using Yavsc.Model.Skill;
|
||||
using System.Linq;
|
||||
using Yavsc.Model.Calendar;
|
||||
using Yavsc.Model.Google.Api;
|
||||
using System.Net.Mail;
|
||||
using System.Web.Security;
|
||||
using System.Web.Configuration;
|
||||
using System.Net;
|
||||
using System.IO;
|
||||
|
||||
namespace Yavsc.Model.WorkFlow
|
||||
{
|
||||
public class CommandRegistration {
|
||||
public long CommandId {get; set; }
|
||||
}
|
||||
|
||||
}
|
48
yavscModel/WorkFlow/NominativeCommandRegistration.cs
Normal file
48
yavscModel/WorkFlow/NominativeCommandRegistration.cs
Normal file
@ -0,0 +1,48 @@
|
||||
//
|
||||
// NominativeCommandRegistration.cs
|
||||
//
|
||||
// Author:
|
||||
// Paul Schneider <paul@pschneider.fr>
|
||||
//
|
||||
// Copyright (c) 2015 GNU GPL
|
||||
//
|
||||
// This program is free software: you can redistribute it and/or modify
|
||||
// it under the terms of the GNU Lesser General Public License as published by
|
||||
// the Free Software Foundation, either version 3 of the License, or
|
||||
// (at your option) any later version.
|
||||
//
|
||||
// This program is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
// GNU Lesser General Public License for more details.
|
||||
//
|
||||
// You should have received a copy of the GNU Lesser General Public License
|
||||
// along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
using System;
|
||||
using Yavsc.Model.WorkFlow;
|
||||
using System.Configuration;
|
||||
using System.Collections.Specialized;
|
||||
using Yavsc.Model.FrontOffice;
|
||||
using System.Configuration.Provider;
|
||||
using Yavsc.Model.FrontOffice.Catalog;
|
||||
using System.Collections.Generic;
|
||||
using Yavsc.Model.Skill;
|
||||
using System.Linq;
|
||||
using Yavsc.Model.Calendar;
|
||||
using Yavsc.Model.Google.Api;
|
||||
using System.Net.Mail;
|
||||
using System.Web.Security;
|
||||
using System.Web.Configuration;
|
||||
using System.Net;
|
||||
using System.IO;
|
||||
|
||||
namespace Yavsc.Model.WorkFlow
|
||||
{
|
||||
|
||||
public class NominativeCommandRegistration : CommandRegistration {
|
||||
public bool NotifiedOnMobile { get; set; }
|
||||
public bool EmailSent { get; set; }
|
||||
}
|
||||
|
||||
}
|
@ -18,7 +18,8 @@ using System.IO;
|
||||
|
||||
namespace Yavsc.Model.WorkFlow
|
||||
{
|
||||
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Work flow manager.
|
||||
/// It takes orders store them and raise some events for modules
|
||||
@ -75,16 +76,20 @@ namespace Yavsc.Model.WorkFlow
|
||||
/// <value>The catalog.</value>
|
||||
public static Catalog Catalog { get; set; }
|
||||
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Registers the command.
|
||||
/// </summary>
|
||||
/// <returns>The command.</returns>
|
||||
/// <param name="com">COM.</param>
|
||||
public static long RegisterCommand (Command com)
|
||||
public static CommandRegistration RegisterCommand (Command com)
|
||||
{
|
||||
long cmdid = DefaultProvider.RegisterCommand (com);
|
||||
string errorMsgGCM=null;
|
||||
if (com.GetType ().GetInterface ("INominative") != null) {
|
||||
var result = new NominativeCommandRegistration ();
|
||||
result.CommandId = cmdid;
|
||||
INominative cmdn = com as INominative;
|
||||
NominativeEventPub ev = new NominativeEventPub ();
|
||||
ev.PerformerName = cmdn.PerformerName;
|
||||
@ -92,9 +97,13 @@ namespace Yavsc.Model.WorkFlow
|
||||
ev.Description = desc;
|
||||
// TODO send a location
|
||||
try {
|
||||
|
||||
var gnresponse = GoogleHelpers.NotifyEvent (ev);
|
||||
}
|
||||
catch (WebException ex) {
|
||||
if (gnresponse.failure > 0 || gnresponse.success <=0)
|
||||
result.NotifiedOnMobile = false;
|
||||
else result.NotifiedOnMobile = true;
|
||||
|
||||
} catch (WebException ex) {
|
||||
|
||||
using (var respstream = ex.Response.GetResponseStream ()) {
|
||||
using (StreamReader rdr = new StreamReader (respstream)) {
|
||||
@ -103,30 +112,32 @@ namespace Yavsc.Model.WorkFlow
|
||||
}
|
||||
respstream.Close ();
|
||||
}
|
||||
if (errorMsgGCM==null)
|
||||
errorMsgGCM = "No response";
|
||||
if (errorMsgGCM == null)
|
||||
throw;
|
||||
|
||||
throw new Exception (errorMsgGCM);
|
||||
throw new Exception (errorMsgGCM,ex);
|
||||
}
|
||||
string errorEMail = null;
|
||||
try {
|
||||
var pref = Membership.GetUser (cmdn.PerformerName);
|
||||
using (System.Net.Mail.MailMessage msg =
|
||||
new MailMessage (
|
||||
WebConfigurationManager.AppSettings.Get ("OwnerEMail"),
|
||||
pref.Email,
|
||||
"[Demande de devis] " + com.ClientName,
|
||||
desc)) {
|
||||
using (System.Net.Mail.SmtpClient sc = new SmtpClient ()) {
|
||||
sc.Send (msg);
|
||||
var pref = Membership.GetUser (cmdn.PerformerName);
|
||||
using (System.Net.Mail.MailMessage msg =
|
||||
new MailMessage (
|
||||
WebConfigurationManager.AppSettings.Get ("OwnerEMail"),
|
||||
pref.Email,
|
||||
"[Demande de devis] " + com.ClientName,
|
||||
desc)) {
|
||||
using (System.Net.Mail.SmtpClient sc = new SmtpClient ()) {
|
||||
sc.Send (msg);
|
||||
result.EmailSent = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
catch (Exception ex) {
|
||||
} catch (Exception ex) {
|
||||
errorEMail = ex.Message;
|
||||
result.EmailSent = false;
|
||||
}
|
||||
}
|
||||
return cmdid;
|
||||
return result;
|
||||
} else
|
||||
throw new NotImplementedException ();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
@ -129,7 +129,6 @@
|
||||
<Compile Include="FrontOffice\Catalog\Link.cs" />
|
||||
<Compile Include="FrontOffice\Catalog\Note.cs" />
|
||||
<Compile Include="FrontOffice\Catalog\Option.cs" />
|
||||
<Compile Include="FrontOffice\Catalog\Period.cs" />
|
||||
<Compile Include="FrontOffice\Catalog\PhysicalProduct.cs" />
|
||||
<Compile Include="FrontOffice\Catalog\Product.cs" />
|
||||
<Compile Include="FrontOffice\Catalog\ProductCategory.cs" />
|
||||
@ -253,6 +252,9 @@
|
||||
<Compile Include="RolesAndMembers\IUserName.cs" />
|
||||
<Compile Include="Calendar\EventCirclesPub.cs" />
|
||||
<Compile Include="Calendar\NominativeEventPub.cs" />
|
||||
<Compile Include="WorkFlow\CommandRegistration.cs" />
|
||||
<Compile Include="WorkFlow\NominativeCommandRegistration.cs" />
|
||||
<Compile Include="RolesAndMembers\UpdatePassword.cs" />
|
||||
</ItemGroup>
|
||||
<Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
|
||||
<ItemGroup>
|
||||
|
Reference in New Issue
Block a user