mirror of
https://github.com/anteo/redmine_custom_workflows.git
synced 2026-01-26 00:04:20 +00:00
#1: Accept only emails in author field
This commit is contained in:
parent
092ea3282d
commit
f3425f4dcb
@ -15,6 +15,7 @@ class CustomWorkflow < ActiveRecord::Base
|
|||||||
|
|
||||||
validates_presence_of :name
|
validates_presence_of :name
|
||||||
validates_uniqueness_of :name, :case_sensitive => false
|
validates_uniqueness_of :name, :case_sensitive => false
|
||||||
|
validates_format_of :author, :with => /\A([^@\s]+)@((?:[-a-z0-9]+\.)+[a-z]{2,})\z/i, :allow_blank => true
|
||||||
validate :validate_syntax
|
validate :validate_syntax
|
||||||
|
|
||||||
default_scope { order(:position => :asc) }
|
default_scope { order(:position => :asc) }
|
||||||
|
|||||||
@ -24,7 +24,7 @@
|
|||||||
<tr class="<%= cycle("odd", "even") %>">
|
<tr class="<%= cycle("odd", "even") %>">
|
||||||
<td class="name"><%= link_to(workflow.name, edit_custom_workflow_path(workflow)) %></td>
|
<td class="name"><%= link_to(workflow.name, edit_custom_workflow_path(workflow)) %></td>
|
||||||
<td class="description"><%= textilizable(workflow.description) %></td>
|
<td class="description"><%= textilizable(workflow.description) %></td>
|
||||||
<td class="author"><%= workflow.author %></td>
|
<td class="author"><%= mail_to workflow.author if workflow.author.present? %></td>
|
||||||
<td>
|
<td>
|
||||||
<% if workflow.is_for_all? %>
|
<% if workflow.is_for_all? %>
|
||||||
<%= l(:field_enabled_for_all_projects) %>
|
<%= l(:field_enabled_for_all_projects) %>
|
||||||
|
|||||||
@ -16,7 +16,7 @@ en:
|
|||||||
field_before_save: "Workflow script executable before saving the issue"
|
field_before_save: "Workflow script executable before saving the issue"
|
||||||
field_is_enabled: "Enabled"
|
field_is_enabled: "Enabled"
|
||||||
field_enabled_for_all_projects: "Enabled for all projects"
|
field_enabled_for_all_projects: "Enabled for all projects"
|
||||||
field_custom_workflow_author: "Custom workflow's author"
|
field_custom_workflow_author: "Author's e-mail"
|
||||||
field_custom_workflow_file: "Select the XML file previously exported process"
|
field_custom_workflow_file: "Select the XML file previously exported process"
|
||||||
field_custom_workflow:
|
field_custom_workflow:
|
||||||
script: "Workflow script"
|
script: "Workflow script"
|
||||||
|
|||||||
@ -16,7 +16,7 @@ ru:
|
|||||||
field_before_save: "Сценарий выполняемый перед сохранением задачи"
|
field_before_save: "Сценарий выполняемый перед сохранением задачи"
|
||||||
field_is_enabled: "Разрешено"
|
field_is_enabled: "Разрешено"
|
||||||
field_enabled_for_all_projects: "Разрешен для всех проектов"
|
field_enabled_for_all_projects: "Разрешен для всех проектов"
|
||||||
field_custom_workflow_author: "Автор рабочего процесса"
|
field_custom_workflow_author: "E-Mail адрес автора"
|
||||||
field_custom_workflow_file: "Выберите XML файл ранее экспортированного процесса"
|
field_custom_workflow_file: "Выберите XML файл ранее экспортированного процесса"
|
||||||
field_custom_workflow:
|
field_custom_workflow:
|
||||||
script: "Сценарий"
|
script: "Сценарий"
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user