Пример #1
0
        public ProjectCreateModel()
        {
            Title = Localizer.Localize("project_create_title");

            NameInput        = new InputModel("Name", "name", true);
            UrlInput         = new UrlInputModel("Url", "url");
            DescriptionInput = new LongInputModel("Description", "description");
        }
Пример #2
0
        public void UrlInputModel(string name, string labelKey, bool isRequired, string value)
        {
            var model = new UrlInputModel(name, labelKey, isRequired, value);

            Assert.AreEqual(name, model.Name);
            Assert.AreEqual(labelKey, model.LabelKey);
            Assert.AreEqual(isRequired, model.IsRequired);
            Assert.AreEqual(value, model.Value);
        }
Пример #3
0
        public ProjectCreateModel()
        {
            Title = "project_create_title";

            OrganizationUidInput = new HiddenInputModel("OrganizationUid");

            NameInput        = new InputModel("Name", "name", true);
            UrlInput         = new UrlInputModel("Url", "url");
            DescriptionInput = new LongInputModel("Description", "description");
        }
Пример #4
0
        public MvcHtmlString Url <TProperty>(Expression <Func <TModel, TProperty> > expression, string placeholder = null, string label = null)
        {
            ModelMetadata modelMetadata = ModelMetadata.FromLambdaExpression(expression, Helper.ViewData);
            UrlInputModel urlInputModel = new UrlInputModel(Helper,
                                                            modelMetadata,
                                                            ExpressionHelper.GetExpressionText(expression),
                                                            label,
                                                            placeholder);

            return(Helper.Partial("EditorTemplates/Forms/Input", urlInputModel));
        }
Пример #5
0
        public ProjectCloneModel()
        {
            Title = "project_clone_title";

            OrganizationUidInput   = new HiddenInputModel("OrganizationUid");
            CloningProjectUidInput = new HiddenInputModel("CloningProjectUid");
            NameInput = new InputModel("Name", "name");

            UrlInput         = new UrlInputModel("Url", "url");
            DescriptionInput = new LongInputModel("Description", "description");

            LabelCountInput            = new HiddenInputModel("LabelCount");
            LabelTranslationCountInput = new HiddenInputModel("LabelTranslationCount");
            IsSuperProjectInput        = new CheckboxInputModel("IsSuperProject", "is_super_project");
        }